Custom Call activity behavior
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2016 11:23 AM
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 ?
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 ?
Labels:
- Labels:
-
Archive
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2016 11:36 AM
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>
<code>
runtimeService.startProcessInstanceByKey("processKey",execution.getVariables());
</code>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2016 11:41 AM
I want super execution to wait until the subprocess is completely ended and continue the original process afterwards.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2016 04:15 PM
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>
At the end of your subprocess, you can send the message to your super execution:
<code>runtimeService.messageEventReceived("message_name", executionId, variables);</code>
