[jboss-user] [jBPM] - Re: Not able to start a process through the Java API

Maciej Swiderski do-not-reply at jboss.com
Fri Feb 8 12:11:35 EST 2013


Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: Not able to start a process through the Java API"

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

--------------------------------------------------------------
> Jose Miguel Loor wrote:
> 
> 
> private StatefulKnowledgeSession getKSession(final String changeSetUrl)  throws ProcessRulesException {
>      StatefulKnowledgeSession ksession = getKBase(changeSetUrl).newStatefulKnowledgeSession();
>       ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());
>      return ksession;
> }
> 
Here you have two issues:
1. you create non persistence session and thus nothing ends up in data base
2. use SystemOutWorkItemHandler as handler for human tasks so it will simply print its properties and move on with the next nodes, most likely ending up as completed process instance

Take a look in the docs on how to setup persistent sessions and make sure that it's configured towards the same db as console.

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/796801#796801]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

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


More information about the jboss-user mailing list