1 2 Previous Next 15 Replies Latest reply on Mar 21, 2016 8:15 AM by amit upadhyay

    How to get a process instance id within a sequence flow "condition expression"?

    Dmitry Erkin Newbie


      My process has a gateway and two outgoing sequence flows. For each flow I want to set up a condition based on facts stored in a session. The problem is that I can not get a process instance id:


      code like this does not work:


      WorkflowProcessInstanceImpl(id == kcontext.processInstance.id, $request: variables["request"])

      Request($id:id) from $request

      not exists(Issue(requestid == $id))


      sample code from "jbpm5 developer guide":


      WorkflowProcessInstanceImpl( $person: variables["person"])

      Person( age< 18 ) from $person


      looks like it chooses a particular process instance rather by person's age than by instance id


      easier speaking I have zero or more Issue() facts inserted into a session for each Request(). an issue has a requestid. In case there are no issues for particular request the process must go one way.

      so rule  must look like


      not exists(Issue(requestid == $id))


      any ideas?




      Dmitry Erkin

        1 2 Previous Next