Call Activity - How to make the parent process not to wait until the sub process is finished.

1,560 views
Skip to first unread message

Gopan Sugathan

unread,
Feb 12, 2015, 4:20:25 AM2/12/15
to camunda-...@googlegroups.com
Hi,


I am trying to spawn sub process from a main process using multi instance call activity.

However I have requirement for the main process not to wait for completion of the sub process and want the main process to continue further.

Is this possible in camunda ?


Kind regards,
Gopan

thorben....@camunda.com

unread,
Feb 12, 2015, 4:26:21 AM2/12/15
to camunda-...@googlegroups.com
Hi Gopan,

In this case, the call activity is not suitable I think. According to the BPMN specification, a call activity ends when the called process ends. There is no asynchronous call activity.

One way of implementing your use case is via message events. Your called process would have a message start event and instead of a multi-instance call activity, you would use a multi-instance send task.

Best regards,
Thorben

Gopan Sugathan

unread,
Feb 12, 2015, 7:13:23 AM2/12/15
to camunda-...@googlegroups.com
Hi Thorben,


Thank You very much that works. I have another question. I am trying to respond from each of  the sub process to main process using send Task from sub process and  receiveTask from main process at the same instant.

runtime.createMessageCorrelation("ZoneTestMessage").processInstanceId(parentPI).correlate();

The correlation is successful but I am getting an error 

rror] o.c.b.e.i.i.CommandContext - Error while closing command context
org.camunda.bpm.engine.impl.pvm.PvmException: already taking a transition
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:518) ~[camunda-engine-7.1.0-Final.jar:7.1.0-Final]
at org.camunda.bpm.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:102) ~[camunda-engine-7.1.0-Final.jar:7.1.0-Final]
at org.camunda.bpm.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:51) ~[camunda-engine-7.1.0-Final.jar:7.1.0-Final]
at org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44) ~[camunda-engine-7.1.0-Final.jar:7.1.0-Final]
at org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.leave(AbstractBpmnActivityBehavior.java:47) ~[camunda-engine-7.1.0-Final.jar:7.1.0-Final]


 

Kind regards,
Gopan

--
You received this message because you are subscribed to a topic in the Google Groups "camunda BPM users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/camunda-bpm-users/XKwn5Sgonc0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/354e45ec-c0b5-45e8-9b5c-c78ba5226c7f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

thorben....@camunda.com

unread,
Feb 12, 2015, 7:19:59 AM2/12/15
to camunda-...@googlegroups.com
Hi Gopan,

This sounds like a bug. It would be great if you could share your (simplified) process models or even better provide a failing test case. For the latter, you can use the unit testing template of link [1].

Cheers,
Thorben

[1] https://github.com/camunda/camunda-engine-unittest

Ingo Richtsmeier

unread,
Feb 12, 2015, 10:08:09 AM2/12/15
to camunda-...@googlegroups.com
Hi Gopan,

I did it recently on project with this approach:


Have a look at the JUnit-Test for further clarification.

Kind Regards,

Ingo

Gopan Sugathan

unread,
Feb 20, 2015, 12:00:01 AM2/20/15
to camunda-...@googlegroups.com
Thank You very much Ingo and Thorben. I solved this using multi instance Send Activity and some custom intermediate queuing using scala.

--
You received this message because you are subscribed to a topic in the Google Groups "camunda BPM users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/camunda-bpm-users/XKwn5Sgonc0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages