1 Reply Latest reply on May 26, 2015 3:37 AM by Abhijit Humbe

    How to call Multiple BPMN files at runtime

    kalesha sheik Newbie



      Can someone suggest, how to achieve below..


      1. Is it possible to load BPMN file at runtime in Jboss which is placed in external location in the system (Consider in some place in D/E drive) ?  I mean BPMN file is NOT a part of JBMN application  deployed war file..


      2. Is it possible to call multiple BPMN files at runtime based on user request? If yes, can u help on this..



      Thanks In Advance,


        • 1. Re: How to call Multiple BPMN files at runtime
          Abhijit Humbe Master


          1.Yes, we can load BPMN files from local filesystem as well, like as:


          File ruleflowFile = new File("/vaid/path/to/ProcessDefinition.bpmn");

          Resource resourceRuleflow = kieServices.getResources().newFileSystemResource(ruleflowFile).setResourceType(ResourceType.BPMN2);

          kfs.write( resourceRuleflow    );        

          KieBuilder kb = kieServices.newKieBuilder(kfs);




          2. Do you want to load BPMN files into classpath at runtime ? If yes then its not possible, we cant modify classpath at runtime.To add new resource into classpath we have restart JVM porcess.

          Hope it helps...