How can I get the exception name or exception code from ERROR BOUNDARY EVENT.

Hi @Ramazan
and welcome to your forums!
When you throw an error for a job, you can pass variables along. You can merge the variables into your process using output mappings on the catching error boundary event.
@ korthout And how can I get this variable in the following service task in the input?My task is to get the exception name or code to recognise which process gave the error boundary.

@Ramazan You can achieve this in multiple steps. Note that I’ve renamed the variable in each step to clarify what each mapping achieves:
- First, you throw an error with a variable, e.g.
my_exception. - Then, use an output mapping on the error boundary event to merge this variable into the process, e.g.
target: caught_AML_errorandsource: = my_exception(it now exists at the process instance level which makes it visible to any element in the process) - Then, use an input mapping on the service task to pass the variable to the job handler, e.g.
target: error_to_handleandsource: = caught_AML_error - You can now use the variable
error_to_handlein your job worker.
Note that the error message and error code cannot be directly extracted from the caught error yet. You need to explicitly pass them as variables in order to use them in variable mappings and your job worker. There is an open feature request to allow this: Use Expression Contexts to provide caught error code and message to expressions · Issue #11459 · camunda/zeebe · GitHub