JBoss Community

Re: Logging node-level variable info

created by Maciej Swiderski in jBPM - View the full discussion

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...

 

HTH

Reply to this message by going to Community

Start a new discussion in jBPM at Community