[jboss-user] [jBPM] - Re: How to get a process instance id within a sequence flow "condition expression"?

Dmitry Erkin do-not-reply at jboss.com
Mon Jan 21 14:08:06 EST 2013

Dmitry Erkin [https://community.jboss.org/people/dmitry.erkin] 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/793337#793337

Hello, Maciej!

yes I have my process instances inserted as facts:

package defaultPackage
dialect "mvel"

import defaultPackage.Request;
import java.util.Map;
import java.util.HashMap;
import org.drools.runtime.process.ProcessInstance;
import org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl;

rule "start"
        not(WorkflowProcessInstanceImpl($request: variables["request"]) and (Request(this == $rq) from $request))
        System.out.println(" >>> The approveRequest process will be started!");
        Map params = new HashMap();
        params.put("request", $rq); 
        ProcessInstance pi = kcontext.getKnowledgeRuntime().createProcessInstance("defaultPackage.approveRequest", params);

What I do not get is how to get a certain process instance attribute's value in a sequence flow's condition expression. By certain instance I mean the instance which is created to approve certain request. I have a request pocess variable, a request.id attribute for that variable and I want to make an inference over facts which relate to that certain request. A relation between facts stored in a session and certain request is set up through a request.id value.

Dmitry Erkin

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/20130121/c834da9f/attachment.html 

More information about the jboss-user mailing list