
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2016 05:21 AM
Hi,
we have the following setting:
We've tried parallel gateways in the child but it didn't work. So we tried to define the async part of the child in an subprocess of the child and made the subprocess ativity and the start event of the subprocess async. dind't work either. So we tried to combine parallel gateways and subprocess but it didn't work either.
We could create a new process definition for the asynchronous part of the child and start a new process instance for it for example via camel. But we'd like to keep it in the child because it's related from the business view.
I added two example processes in the hope the clearify the idea.
we have the following setting:
- A Parent process which calls another process (the child) via call activiti and defined out parameters for this call because we need an result from the child in the parent
- After the child has created the needed result we want to pass this to the parent and continue with some other activities in the child
We've tried parallel gateways in the child but it didn't work. So we tried to define the async part of the child in an subprocess of the child and made the subprocess ativity and the start event of the subprocess async. dind't work either. So we tried to combine parallel gateways and subprocess but it didn't work either.
We could create a new process definition for the asynchronous part of the child and start a new process instance for it for example via camel. But we'd like to keep it in the child because it's related from the business view.
I added two example processes in the hope the clearify the idea.
Labels:
- Labels:
-
Archive
Parent.bpmn_.txt.zip
1 KB
Child.bpmn_.txt.zip
2 KB
1 ACCEPTED ANSWER
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 05:44 AM
You can set parent process variables from child process. It looks like execution.getParent().setVariable("a","a-value")
You can send signals/messages to parent process. To avoid transaction context nesting you may need async signals, but it's up to you.
So, you can make parallel gateway in parent process, top line waits on signal, bottom line does call activity. Child process sets variables of parent process, then sends signal and continues its work as needed.
You can send signals/messages to parent process. To avoid transaction context nesting you may need async signals, but it's up to you.
So, you can make parallel gateway in parent process, top line waits on signal, bottom line does call activity. Child process sets variables of parent process, then sends signal and continues its work as needed.
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 02:45 AM
Ok after more searches in the forums i found this thread.
Basically it's stating that a CallActiviti must always wait for the called process instance to finish.
As far as i understood subprocesses and CallActivity's are not very different in the way there are executed. Actually The CallActivityBehavoiur is implementation of the SubprocessBehavior. The CallActivity will not leave until the called is finished.
I assume that the called process is not finished until all end states are reached.
Basically it's stating that a CallActiviti must always wait for the called process instance to finish.
As far as i understood subprocesses and CallActivity's are not very different in the way there are executed. Actually The CallActivityBehavoiur is implementation of the SubprocessBehavior. The CallActivity will not leave until the called is finished.
I assume that the called process is not finished until all end states are reached.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 05:44 AM
You can set parent process variables from child process. It looks like execution.getParent().setVariable("a","a-value")
You can send signals/messages to parent process. To avoid transaction context nesting you may need async signals, but it's up to you.
So, you can make parallel gateway in parent process, top line waits on signal, bottom line does call activity. Child process sets variables of parent process, then sends signal and continues its work as needed.
You can send signals/messages to parent process. To avoid transaction context nesting you may need async signals, but it's up to you.
So, you can make parallel gateway in parent process, top line waits on signal, bottom line does call activity. Child process sets variables of parent process, then sends signal and continues its work as needed.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 07:57 AM
Hi,
thanks for the answer. I already had a look at events and stuff and now connected parent and child through a message event.
The parent call activiti get's an non interupting message boundary catch event which leads to an service task which will sent a message to an external system. The child process has a script task which will sent a message event to the parent and then proceed which the remainder of the process.
The CallActiviti will still wait for the subprocess to complete but that's ok. So it would also be possible to to more things in the parent if necessary.
If you're interested or if anybody has the same issue i uploaded a test project to github which contains the processes and a junit test to show the usage.
thanks for the answer. I already had a look at events and stuff and now connected parent and child through a message event.
The parent call activiti get's an non interupting message boundary catch event which leads to an service task which will sent a message to an external system. The child process has a script task which will sent a message event to the parent and then proceed which the remainder of the process.
The CallActiviti will still wait for the subprocess to complete but that's ok. So it would also be possible to to more things in the parent if necessary.
If you're interested or if anybody has the same issue i uploaded a test project to github which contains the processes and a junit test to show the usage.
