JBoss Community

Re: jbpm5 integrtation through api

created by Kris Verlaenen in jBPM - View the full discussion

You can use the integration api as defined in the gwt modules (which would be a very good idea if you actually want to offer these APIs using a REST service), or you could just use the underlying api to get the information you need (just like the gwt implementations are doing).  But the gwt implementation is a fully functional example, so you can definitely take a look at that.

 

There are numerous APIs that you can use to do what you are describing.  I would suggest looking through the documentation; examples and API to see how they are done.  Some pointers:

 

Everything related to loading process definitions:

        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
        kbuilder.add(ResourceFactory.newClassPathResource("BPMN2-MinimalProcess.bpmn2"), ResourceType.BPMN2);

        KnowledgeBase kbase = kbuilder.newKnowledgeBase();

 

Creating a session:

        StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

 

Starting a process instance:

        ksession.startProcess(processId)

 

Everything about monitoring your process instances, use a history logger:

https://hudson.jboss.org/hudson/job/jBPM5/lastSuccessfulBuild/artifact/target/jbpm-5.0-SNAPSHOT-docs-build/jbpm-docs/html/ch07.html#d0e1687

 

Everything related to task management, use a task client:

https://hudson.jboss.org/hudson/job/jBPM5/lastSuccessfulBuild/artifact/target/jbpm-5.0-SNAPSHOT-docs-build/jbpm-docs/html/ch.Human_Tasks.html#d0e1446

 

If you have specific questions, just let us know ;)

 

Kris

Reply to this message by going to Community

Start a new discussion in jBPM at Community