[jboss-user] [jBPM] - Re: Logging node-level variable info

Maciej Swiderski do-not-reply at jboss.com
Fri Jul 13 10:54:46 EDT 2012

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

"Re: Logging node-level variable info"

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

ProcessEventListener is designed to provide you with such capability, so you can build your custom implementation of that interface and register it on the session. It will trigger all enter/exit nodes and you can get quite some information out of it including variables and process instance.

About unique ids of process instance, I believe you recreate session for each process and if that's the case you'll get ids of the process instances to be reset and they will start with 1... so if you enable persistence you'll get ids generated by db so they will be unique. Alternatively you could implement you own ProcessInstanceManager and ProcessInstanceManagerFactory that can be registered on the session which will be responsible for generating unique ids of process instances (org.jbpm.process.instance.ProcessInstanceManager, org.jbpm.process.instance.ProcessInstanceManagerFactory).

if you like to go this way once you have your implementation you can register it like this:
sessionProperties.put("drools.processInstanceManagerFactory", "YOUR CUSTOM CLASSNAME");
KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(sessionProperties);
kbase.newStatefulKnowledgeSession(config, environment);

There could be need to implement SignalManager and SignalManagerFactory as well...


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/20120713/d1993250/attachment.html 

More information about the jboss-user mailing list