flowable / flowable-engine

A compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.
https://www.flowable.org
Apache License 2.0
8.01k stars 2.63k forks source link

Adding MapException to a Delegate, ScriptTask, UserTask element #1121

Open keshavbohra opened 6 years ago

keshavbohra commented 6 years ago

I’m trying to add MapExceptionEntry to my tasks and delegates when I’m trying to publish the application. The log shows that the task contains the entry but after publishing the application the bpmn 2.0 xml does not contain the required tags(flowable:mapException) in the extentionElements tag. The version we use is 6.1.2.

tijsrademakers commented 6 years ago

Can you elaborate a bit more about how you exactly added the MapExceptionEntry and in which step it's not there anymore? Please name the applications that you are using for this like the Flowable Modeler, Flowable Eclipse Designer etc.

keshavbohra commented 6 years ago

We have our own process publish system where we use spring-flowable integration. So whenever we create a process using our service, we encapsulate the process in a subprocess so that we can use exception handling of flowable. In the userguide there is a topic on exceptionMapping in a task given in the below link: So when we try use call the ServiceTaskObject.setMapExceptions to a task object, the resultant xml doesn't contain the in the . Is there any other way to implement the following? Also I tried to use a workaround by using try-catch in our Delegate/Listener classes which gets executed in the process execution but when I throw the BpmnError, instead of going to the boundary event and ending the process, the engine gets stuck.

keshavbohra commented 6 years ago

If this helps: `<?xml version="1.0" encoding="UTF-8"?>

` I'm getting a null pointer exception in the **execution listener**. So instead of creating the final output of the exception(as expected in the custom process definition and execution code) it just retries. I also checked the history table for the process instance, it didn't contain any data for the final output.