JBoss Community

Re: How can I take process definitions from Guvnor with jBPM5 API?

created by liliana.iovanovici in jBPM - View the full discussion

                    KnowledgeAgentConfiguration aconf = KnowledgeAgentFactory.newKnowledgeAgentConfiguration();

                    KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("testKAgent", aconf);   

                    String fileName = "http://localhost:8180/guvnor-5.3.0.Final-jboss-as-7.0/rest/packages/test/assets/";

                    kagent.applyChangeSet(ResourceFactory.newFileResource(fileName));

                    KnowledgeBase kbase2 = kagent.getKnowledgeBase();

                    StatefulKnowledgeSession ksession2 = kbase2.newStatefulKnowledgeSession();

                    ProcessInstance processInstance = ksession2.startProcess("myProcessTest.bpmn");

Reply to this message by going to Community

Start a new discussion in jBPM at Community