cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Call activity behavior

drk02981
Champ in-the-making
Champ in-the-making
Instead of defining as input parameters in Call Activity, is there a way to add all the parent process variables to subprocess using execution listener ?
At runtime there might be a new variable created in parent process and want to send even the new variables to subprocess which I cannot define during design time in Call Activity. So I want to use execution.getVariables() and send all the variable to subprocess. Can this be achieved ?
3 REPLIES 3

elozada
Champ in-the-making
Champ in-the-making
I had the same situation, so I just replaced the call activiti with a service task and use the API to create a new process.

<code>
runtimeService.startProcessInstanceByKey("processKey",execution.getVariables());
</code>

drk02981
Champ in-the-making
Champ in-the-making
I want super execution to wait until the subprocess is completely ended and continue the original process afterwards. 

elozada
Champ in-the-making
Champ in-the-making
In your super execution you can use an <a href="http://www.activiti.org/userguide/#bpmnIntermediateMessageEvent">intermediate event</a>, e.g. message catching event. That will stop the process.

At the end of your subprocess, you can send the message to your super execution:

<code>runtimeService.messageEventReceived("message_name", executionId, variables);</code>