I have the attached BPMN in our solution. There are two error boundary events one from Get Images service task and another from Create Jobs service task. Now using the ‘Aggregate jobOutput on exception’ service task I have to take a different action based on the type of error.
Can you please help how can we identify what type of error was thrown in the handler(Aggregate jobOutput on exception).
you can use the errorCodeVariable and/or errorMessageVariable and push the content from the error (code or message) into seperate variables. These can be used in the final task.
the value of errorCodeVariable is a variable name which will carry the code.
If you define errorCodeVariable as imagesError in the first task and as jobsError in the second task, you can access either imagesError or jobsError as process variable in the next task.
The variable content will be 100 in your example in both cases.
Another option would be to use different error codes and map the to the same process variable. Then you differentiate on the value afterwards.
If I put errorCodeVariable in the input in the next task, I get the error failed to evaluate expression ‘{errorCodeVariable:errorCodeVariable}’: no variable found for name ‘errorCodeVariable’.