[jboss-user] [jBPM] - How to deploy a BPMN process file by using the JBPM API ?

pichunhan pi do-not-reply at jboss.com
Tue Jan 22 01:58:37 EST 2013

pichunhan pi [https://community.jboss.org/people/miniservice] created the discussion

"How to deploy a BPMN process file by using the JBPM API ?"

To view the discussion, visit: https://community.jboss.org/message/793402#793402

there's some questions for me .

In my project , i use the spring to manage the KnowledgeBase and the StatefulKnowledgeSession , and the config XML is follow .

<drools:kbase id="kbase">
                <drools:resource type="BPMN2" source="classpath:Evaluation.bpmn" />
                <drools:resource type="BPMN2" source="classpath:WorkTrip.bpmn" />
                <drools:resource type="BPMN2" source="classpath:HR_WorkTrip.bpmn" />
                <drools:resource type="BPMN2" source="classpath:Common_WorkTrip.bpmn" />
                <drools:resource type="BPMN2" source="classpath:Performance.bpmn" />

          <drools:ksession id="sSession" type="stateful" kbase="kbase">
        <drools:transaction-manager ref="txManager" />
          ref="entityManagerFactory" />

but when i need to add a new BPMN process resource , i need to add a drools:resource config and restart the web server to deploy it into the  KnowledgeBase which is used in my project .
is there a JBPM API for me to deploy it into the KnowledgeBase without using the guvnor ? Like the way in JBPM4.x .

in the JBPM demo , i know that the BPMN resource can be deployed by using this code :

private static KnowledgeBase readKnowledgeBase() throws Exception {
                    KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
                    return kbuilder.newKnowledgeBase();

but when i used the spring , i can't do this to deploy now . because if i use this way , the KnowledgeBase and the StatefulKnowledgeSession are the new instance different with the one in spring IOC .

how can i do ? is there any way to do without using the guvnor web ? just using the JBPM API .

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130122/ea7de124/attachment.html 

More information about the jboss-user mailing list