CallActivity which signals the result and catch with boundary events not working (NPE)

273 views
Skip to first unread message

Markus Schulz

unread,
Dec 8, 2014, 4:41:47 AM12/8/14
to camunda-...@googlegroups.com
hello,

i have a (main) process which looks like following (only the relevant snippet):

and the called process looks like


But this don't work. I got a NullPointerException in
org.camunda.bpm.engine.impl.bpmn.behavior.BpmnActivityBehavior#performOutgoingBehavior from 

String defaultSequenceFlow = (String) execution.getActivity().getProperty("default");

because the subprocess activity is already deleted (execution.deleteReason is "Cancel scope activity Activity(BoundaryEvent_3) executed." and execution.activity is null).

Is this in general a broken process design? Or what is the best way to deliver a result from a callactivity to the parent process? 
Is this only with process variables possible?


regards
msc

Markus Schulz

unread,
Dec 8, 2014, 5:13:54 AM12/8/14
to camunda-...@googlegroups.com
i've changed to BPMN-Error-Events (instead of signals) and now it works.

Is this the only working way to signal the parent process something?

thorben....@camunda.com

unread,
Dec 9, 2014, 4:20:16 AM12/9/14
to camunda-...@googlegroups.com
Hi Markus,

Regarding the exception: If that's a bug is hard to tell. A unit test could be helpful or the complete stacktrace including at which activity behavior the exception is thrown.

In general, I think error events are better suited here. Keep in mind that signal events are broadcasts, meaning that all process instances of that process definition receive the signal. If you only want to notify the parent process instance, I would not recommend signal events.
If you indeed want to model a successful result of the called process instead of an error or exceptional condition, process variables and the camunda:in and camunda:out extensions should be used [1]. I am curious, why would you want to use specific event types for that scenario?

Best regards,
Thorben

[1] http://docs.camunda.org/latest/api-references/bpmn20/#subprocesses-call-activity-passing-variables

Markus Schulz

unread,
Dec 11, 2014, 2:48:59 AM12/11/14
to camunda-...@googlegroups.com
okay, thanks for clarification. 
I've the same thoughts as i see the process model, but it was not designed by me, i'm only the deployer of the process model.
i hope i find the time to build a testcase for this potential bug. 
But currently i'm trying to upgrade from 7.1.0 to 7.2 with some other problems (as you can see from my NullpointerException posting)
Reply all
Reply to author
Forward
0 new messages