I’d like to know which is the recommended method to generate an Exception from Python/Jython Script in a Script Task so it can be Used with Error Boundary Event + Event SubProcess
After reading Camunda Forum Messages
Handle ScriptEvaluationException with Error Boundary Event]
How can I get the Exception object when using a boundary error event?
Raise BPMN error from a user task as a boundary event
About 'Error Boundary Event' handle with sub process
I have tried
Option1
raise org.camunda.bpm.engine.delegate.BpmnError("ErrorCode1")
Option2
raise java.lang.Exception("ErrorCode1")
Option3
raise Exception("ErrorCode1")
Option1 Log Message
Option1 Log Message
05-Jul-2020 21:40:47.525 WARNING [http-nio-8080-exec-6] org.camunda.commons.logging.BaseLogger.logWarn ENGINE-REST-HTTP500 org.camunda.bpm.engine.rest.exception.RestException: Cannot complete task 22e72b02-bf08-11ea-b64e-0242ac130007: Unable to evaluate script while executing activity ‘T10’ in the process definition with id ‘a0P10:15:9f326e98-bf07-11ea-b64e-0242ac130007’: org.camunda.bpm.engine.delegate.BpmnError: org.camunda.bpm.engine.delegate.BpmnError: Este es el mensaje de ErrorCode1 Desde Jython Inline Script (errorCode=‘ErrorCode1’) in at line number 57
Option2 Log Message
Option2 Log Message
05-Jul-2020 22:12:44.637 SEVERE [http-nio-8080-exec-5] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: Unable to evaluate script while executing activity ‘T10’ in the process definition with id ‘a0P10:18:8d975791-bf0c-11ea-b64e-0242ac130007’: java.lang.Exception: java.lang.Exception: ErrorCode1 in at line number 58
Option3 Log Message
Option3 Log Message
05-Jul-2020 22:08:49.763 SEVERE [http-nio-8080-exec-8] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: Unable to evaluate script while executing activity ‘T10’ in the process definition with id ‘a0P10:17:0aa15740-bf0c-11ea-b64e-0242ac130007’: Exception: ErrorCode1 in at line number 57
WorkFlow Snapshot. Error Boundary Event.Properties Panel
WorkFlow Snapshot. Error Boundary Event.Properties Panel