camunda-platform-7-reactor
camunda-platform-7-reactor copied to clipboard
java.lang.NullPointerException: null at org.camunda.bpm.extension.reactor.bus.SelectorBuilder.extractTypeName(SelectorBuilder.java:223)
Hello I have a multi instance sub process and when i attach a boundary error catch event I get the following exception:
java.lang.NullPointerException: null
at org.camunda.bpm.extension.reactor.bus.SelectorBuilder.extractTypeName(SelectorBuilder.java:223)
Exact code:
static String extractTypeName(BpmnModelExecutionContext bpmnModelExecutionContext) {
FlowElement bpmnModelElementInstance = bpmnModelExecutionContext.getBpmnModelElementInstance();
return bpmnModelElementInstance.getElementType().getTypeName();
}
This doesn't seem to be an issue if I attach a boundary timer event. According to the Camunda docs I should be able to attach a catch boundary error event on a multi instance sub process. Has anyone else noticed this issue?
Thanks
Did not encounter this so far. I will create a test case to confirm.
Hello @jangalinski , I was wondering if you were able to reproduce this issue?
sorry, did not get to this point. Could you provide a reproducable example/snippet?
Hi I get the same exception, this is an example bpmn file:
<?xml version="1.0" encoding="UTF-8" ?>
<bpmn:definitions
xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
id="Definition_1"
targetNamespace="http://bpmn.io/schema/bpmn">
<bpmn:error id="Error" errorCode="error" name="error" />
<bpmn:process id="TestMultiInstanceCallActivity" name="TestMultiInstanceCallActivity" isExecutable="true">
<bpmn:startEvent id="Start" name="Start" />
<bpmn:callActivity id="EmptyProcesses" name="Empty Processes" calledElement="EmptyProcess" >
<bpmn:multiInstanceLoopCharacteristics isSequential="false"
camunda:collection="${ids}" camunda:elementVariable="id" >
</bpmn:multiInstanceLoopCharacteristics>
</bpmn:callActivity>
<bpmn:boundaryEvent id="EmptyProcessesError" attachedToRef="EmptyProcesses">
<bpmn:errorEventDefinition errorRef="Error" />
</bpmn:boundaryEvent>
<bpmn:sequenceFlow id="FromEmptyProcessesErrorToEnd" name=""
sourceRef="EmptyProcessesError"
targetRef="End" />
<bpmn:endEvent id="End" name="End" />
<bpmn:sequenceFlow id="ToEmptyProcesses" name=""
sourceRef="Start"
targetRef="EmptyProcesses" />
<bpmn:sequenceFlow id="ToEnd" name=""
sourceRef="EmptyProcesses"
targetRef="End" />
</bpmn:process>
</bpmn:definitions>
The EmptyProcess is just a start event and an end event connected by a sequence flow. I use the following java code to start the process:
Set<String> ids = new HashSet<>();
ids.add("id1");
ids.add("id2");
Map<String,Object> variables = new HashMap<>();
variables.put("ids", ids);
processEngine.getRuntimeService().startProcessInstanceByKey("TestMultiInstanceCallActivity", variables);