-1

Environment: JBPM 6 want to achieve: Reusable Sub Process facing challenges in : a. Passing variables values, from parent subprocess to child subprocess and vice versa b. Sequence flow condition, using only one object variable for condition check

I am trying to create a reusable sub process in JBPM. This sub process will be called only in one condition, that is when the "userid" variable is empty. I facing two challenges

1.Gateway Condition, a. If userid variable of object user is empty then sub process will be called. b. If userid variable of object user is not empty then it will not call the sub process.

I have achieved the above using the variables type of string(without using the object) in sequence flow conditions, but when I try to do the same with objects variables from the data modeler, only one option is available that is: "if object is null" in sequence flow condition.

My requirement: Instead of checking the complete object only one variable(userid) of object "User" will be checked.

  1. how to pass the child subprocess variables values back to the parent subprocess and vice versa

Please help

asp
  • 1
  • 1

1 Answers1

1

The constraint "editor" only allows basic conditions and currently doesn't allow you to specify constraints on custom objects (other than is null). For more advanced constraints like the one you mention, you can switch to the script tab and type the expression yourself.

For mapping data input and output between parent and sub-process, you simply need to define input and output mappings on the call activity in the parent process. Note that you might have to define additional data inputs / outputs first for the variables you would like to map. A simple example: https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/resources/BPMN2-CallActivity.bpmn2h

Kris Verlaenen
  • 2,918
  • 1
  • 15
  • 5