Maciej Swiderski
2013-01-21 09:17:22 UTC
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion
"Re: How to get a process instance id within a sequence flow "condition expression"?"
To view the discussion, visit: https://community.jboss.org/message/793184#793184
--------------------------------------------------------------
I can see you use rules as the condition language, so you need to insert process instance into working memory (ksession) before you can access it inside the rule. So you can do it in two ways:
- first createProcessInstance, then insert it into ksession, and start the process instance
- employ process event listener to do it for you, take a look https://github.com/droolsjbpm/jbpm/blob/master/jbpm-flow/src/main/java/org/jbpm/process/instance/impl/RuleAwareProcessEventLister.java here for sample on how it can be done
HTH
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/793184#793184]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
"Re: How to get a process instance id within a sequence flow "condition expression"?"
To view the discussion, visit: https://community.jboss.org/message/793184#793184
--------------------------------------------------------------
I can see you use rules as the condition language, so you need to insert process instance into working memory (ksession) before you can access it inside the rule. So you can do it in two ways:
- first createProcessInstance, then insert it into ksession, and start the process instance
- employ process event listener to do it for you, take a look https://github.com/droolsjbpm/jbpm/blob/master/jbpm-flow/src/main/java/org/jbpm/process/instance/impl/RuleAwareProcessEventLister.java here for sample on how it can be done
HTH
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/793184#793184]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]