Hi,
It seems that my thrown bpmnError from JavaDelegate is no longer catched by the Error Boundary Event. This occurs after my upgrade from camunda 7.5 to 7.8. Has there been a change in the api / bpmn syntax that could have this effect on an existing bpmn file?
Process with Boundary Event
Settings in Modeler
Java Code that throws the error.
catch (Exception e) {
if (errorCounter == 3) {
if (throwErrors) {
logger.warn("THROWS BPMN Error MI_100");
throw new BpmnError("MI_100", e.getMessage());
}
}
}
I can see in my log the the logger message → logger.warn(“THROWS BPMN Error MI_100”); will be executed after the third try. Then the “cmd:114 - ENGINE-13011 closing existing command context” error appears.
> 2018-07-10 14:25:57 WARN GeneratePlot:225 - Number of PLOT_ERROR_TRIES for Process ID [14443] is = 3
> 2018-07-10 14:25:57 WARN GeneratePlot:239 - THROWS BPMN Error MI_100
> 2018-07-10 14:25:57 DEBUG GeneratePlot:246 - FINAL BLOCK OF GENERATE PLOT
> 2018-07-10 14:25:57 ERROR context:156 - ENGINE-16006 BPMN Stack Trace:
> [name_replaced]_generatePlots (activity-execute, ScopeExecution[14497])
> [name_replaced]_generatePlots, name=Generierung Plots
>
> 2018-07-10 14:25:57 DEBUG cmd:114 - ENGINE-13011 closing existing command context
> 2018-07-10 14:25:57 ERROR context:156 - ENGINE-16004 Exception while closing command context: Error Message is null
> org.camunda.bpm.engine.ProcessEngineException: Error Message is null
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> at org.camunda.bpm.engine.impl.util.EnsureUtil.generateException(EnsureUtil.java:344)
> at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:49)
> at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty(EnsureUtil.java:95)
> at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty(EnsureUtil.java:91)
> at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty(EnsureUtil.java:83)
> at org.camunda.bpm.engine.delegate.BpmnError.setMessage(BpmnError.java:67)
> at org.camunda.bpm.engine.delegate.BpmnError.<init>(BpmnError.java:50)
> at [name_replaced].GeneratePlot.execute(GeneratePlot.java:240)
The only thing I have changed during the update was to comment out the FoxFailedJobParseListener , as mentioned in the update guide.
<bean class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration"
id="processEngineConfiguration">
<property name="processEngineName" value="default" />
<property name="dataSource" ref="dataSourceCamundaBpm" />
<property name="transactionManager" ref="transactionManagerCamundaBpm" />
<property name="databaseSchemaUpdate" value="false" />
<property name="jobExecutorActivate" value="true" />
<property name="jobExecutor" ref="cbpmSpringJobExecutor" />
<property name="jobExecutorAcquireByPriority" value="true" />
<property name="jobExecutorAcquireByDueDate" value="false" />
<property name="jobExecutorPreferTimerJobs" value="false" />
<!-- <property name="customPostBPMNParseListeners">
<list>
<bean
class="org.camunda.bpm.engine.impl.bpmn.parser.FoxFailedJobParseListener" />
</list>
</property>
<property name="failedJobCommandFactory" ref="foxFailedJobCommandFactory" /> -->
<property name="dmnEngineConfiguration">
<bean class="org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration">
<property name="defaultInputExpressionExpressionLanguage"
value="juel" />
</bean>
</property>
<property name="deploymentResources"
value="#{camundaDeployService.readBpmDeploymentFiles()}" />
<!-- is used instead of <property name="deploymentResources" value="classpath*:bpmn/*/*.bpmn"/> -->
</bean>
Anybody an idea why it is no longer working?