Tobias Wittur [http://community.jboss.org/people/tob1as] created the discussion
"Re: What does "Build package" do? How to deploy in running engine" To view the discussion, visit: http://community.jboss.org/message/621173#621173 -------------------------------------------------------------- Ok, do not mind about the second question. Found an answer here: http://community.jboss.org/thread/163523 http://community.jboss.org/thread/163523 Hi Julio, If you want to upload a knowledge base which includes the process definitions from guvnor repository the code you require is the following: ProcessBuilderFactory.setProcessBuilderFactoryService(new ProcessBuilderFactoryServiceImpl()); ProcessMarshallerFactory.setProcessMarshallerFactoryService(new ProcessMarshallerFactoryServiceImpl()); ProcessRuntimeFactory.setProcessRuntimeFactoryService(new ProcessRuntimeFactoryServiceImpl()); BPMN2ProcessFactory.setBPMN2ProcessProvider(new BPMN2ProcessProviderImpl()); KnowledgeAgentConfiguration aconf = KnowledgeAgentFactory.newKnowledgeAgentConfiguration(); KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("testKAgent", aconf); kagent.applyChangeSet( ResourceFactory.newUrlResource( " http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor" + "/package/defaultPackage/LATEST/ChangeSet.xml")); And then you take the knowledgeBase from the KnowledgeAgent like this : KnowledgeBase kbase = kagent.getKnowledgeBase(); In order to take the process you want from within the knowledgeBase you create a knowledgeSession : StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, config, env); And finally something like "ksession.getProcessInstances()" will gine you the collection of all the processes that lie inside the guvnor repository. Regards, Vasiliki. -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/621173#621173] Start a new discussion in jBPM at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
