Package dev.dsf.bpe.v2.error.impl
Class DefaultMessageSendTaskErrorHandler
java.lang.Object
dev.dsf.bpe.v2.error.impl.AbstractErrorHandler
dev.dsf.bpe.v2.error.impl.AbstractMessageActivityErrorHandler
dev.dsf.bpe.v2.error.impl.DefaultMessageSendTaskErrorHandler
- All Implemented Interfaces:
ErrorBoundaryEventErrorHandler,ErrorHandler,ExceptionErrorHandler,MessageActivityErrorHandler,MessageSendTaskErrorHandler
public class DefaultMessageSendTaskErrorHandler
extends AbstractMessageActivityErrorHandler
implements MessageSendTaskErrorHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandleException(ProcessPluginApi api, Variables variables, SendTaskValues sendTaskValues, Exception exception) Single instance message send task (Targetsvariables not set or empty):protected ExceptionhandleMultiInstance(ProcessPluginApi api, Variables variables, SendTaskValues sendTaskValues, Exception exception, Targets targets) protected ExceptionhandleSingleInstance(ProcessPluginApi api, Variables variables, SendTaskValues sendTaskValues, Exception exception) Methods inherited from class dev.dsf.bpe.v2.error.impl.AbstractMessageActivityErrorHandler
createErrorMessage, getExceptionMessageMethods inherited from class dev.dsf.bpe.v2.error.impl.AbstractErrorHandler
createErrorMessageFromException, createTaskErrorOutput, getTasks, handleErrorBoundaryEvent, handleException, updateFailedIfInprogress, updateTaskAndHandleExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.dsf.bpe.v2.error.ErrorBoundaryEventErrorHandler
handleErrorBoundaryEvent
-
Constructor Details
-
DefaultMessageSendTaskErrorHandler
public DefaultMessageSendTaskErrorHandler()
-
-
Method Details
-
handleException
public Exception handleException(ProcessPluginApi api, Variables variables, SendTaskValues sendTaskValues, Exception exception) Single instance message send task (Targetsvariables not set or empty):Logs the given
Exception, updates all receivedTaskresource withTask.TaskStatus.INPROGRESStoTask.TaskStatus.FAILEDand adds aTask.TaskOutputComponentof typeCodeSystems.BpmnMessage.error().Exceptions thrown while updating the
Taskresources to status failed are logged. Returns the givenExceptionresulting in a deleted i.e. stopped process instance.Multi instance message send task (
Targetsvariables set and not empty):Removes the current
Targetfrom theTargetsvariable and logs the error. Returnsnullresulting in a continuing process instance.- Specified by:
handleExceptionin interfaceMessageActivityErrorHandler- Parameters:
api- notnullvariables- notnullsendTaskValues- notnullexception- notnull- Returns:
nullto prevent the process from being stopped
-
handleMultiInstance
protected Exception handleMultiInstance(ProcessPluginApi api, Variables variables, SendTaskValues sendTaskValues, Exception exception, Targets targets) -
handleSingleInstance
protected Exception handleSingleInstance(ProcessPluginApi api, Variables variables, SendTaskValues sendTaskValues, Exception exception)
-