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 (Targets
variables not set or empty):protected Exception
handleMultiInstance
(ProcessPluginApi api, Variables variables, SendTaskValues sendTaskValues, Exception exception, Targets targets) protected Exception
handleSingleInstance
(ProcessPluginApi api, Variables variables, SendTaskValues sendTaskValues, Exception exception) Methods inherited from class dev.dsf.bpe.v2.error.impl.AbstractMessageActivityErrorHandler
createErrorMessage, getExceptionMessage
Methods inherited from class dev.dsf.bpe.v2.error.impl.AbstractErrorHandler
createErrorMessageFromException, createTaskErrorOutput, getTasks, handleErrorBoundaryEvent, handleException, updateFailedIfInprogress, updateTaskAndHandleException
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 (Targets
variables not set or empty):Logs the given
Exception
, updates all receivedTask
resource withTask.TaskStatus.INPROGRESS
toTask.TaskStatus.FAILED
and adds aTask.TaskOutputComponent
of typeCodeSystems.BpmnMessage.error()
.Exceptions thrown while updating the
Task
resources to status failed are logged. Returns the givenException
resulting in a deleted i.e. stopped process instance.Multi instance message send task (
Targets
variables set and not empty):Removes the current
Target
from theTargets
variable and logs the error. Returnsnull
resulting in a continuing process instance.- Specified by:
handleException
in interfaceMessageActivityErrorHandler
- Parameters:
api
- notnull
variables
- notnull
sendTaskValues
- notnull
exception
- notnull
- Returns:
null
to 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)
-