I have a process "A" that is calling another process "B" through a call activity. Process "A" sets some variables in process "B" but not all of them. If process "B" is started as a stand alone process then all the info is filled out in the form. If process "B" is started by process "A" then it is missing some information.
I have a gateway right after the start of process "B" that check for a value of a variable that needs to be filled out before continuing. If the variable does not have a value then it is sent to a task to finish filling out process "B" information. The problem is that when I test for a value of the variable (topPrinted) that was not set by process "A" then I get the following error:
<blockcode>Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'topPrinted' at org.activiti.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:83) at org.activiti.engine.impl.juel.AstBinary$SimpleOperator.eval(AstBinary.java:27) at org.activiti.engine.impl.juel.AstBinary.eval(AstBinary.java:106)</blockcode>
What is a reliable way to detect if a process is started by a call activity of another process?
The best way to do this is in a script task or service task. For example in a service task you can check if a variable is set or not and then set another value that tells if it's started from standalone or as a child process.