Package dev.dsf.bpe.v2.error.impl
Class AbstractErrorHandler
java.lang.Object
dev.dsf.bpe.v2.error.impl.AbstractErrorHandler
- All Implemented Interfaces:
ErrorBoundaryEventErrorHandler,ErrorHandler,ExceptionErrorHandler
- Direct Known Subclasses:
AbstractMessageActivityErrorHandler,DefaultExecutionListenerErrorHandler,DefaultServiceTaskErrorHandler,DefaultUserTaskListenerErrorHandler
public abstract class AbstractErrorHandler
extends Object
implements ErrorBoundaryEventErrorHandler, ExceptionErrorHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcreateErrorMessageFromException(ProcessPluginApi api, Variables variables, Exception exception) protected org.hl7.fhir.r4.model.Task.TaskOutputComponentcreateTaskErrorOutput(ProcessPluginApi api, Variables variables, String errorMessage) protected List<org.hl7.fhir.r4.model.Task> getTasks(ProcessPluginApi api, Variables variables, Exception exception) handleErrorBoundaryEvent(ProcessPluginApi api, Variables variables, ErrorBoundaryEvent event) Logs the givenErrorBoundaryEventand returns the event without modification.handleException(ProcessPluginApi api, Variables variables, Exception exception) Logs the givenException, updates all receivedTaskresource withTask.TaskStatus.INPROGRESStoTask.TaskStatus.FAILEDand adds aTask.TaskOutputComponentof typeCodeSystems.BpmnMessage.error().protected voidupdateFailedIfInprogress(ProcessPluginApi api, Variables variables, String errorMessage, List<org.hl7.fhir.r4.model.Task> tasks) protected voidupdateTaskAndHandleException(ProcessPluginApi api, Variables variables, org.hl7.fhir.r4.model.Task task)
-
Constructor Details
-
AbstractErrorHandler
public AbstractErrorHandler()
-
-
Method Details
-
handleErrorBoundaryEvent
public ErrorBoundaryEvent handleErrorBoundaryEvent(ProcessPluginApi api, Variables variables, ErrorBoundaryEvent event) Logs the givenErrorBoundaryEventand returns the event without modification.- Specified by:
handleErrorBoundaryEventin interfaceErrorBoundaryEventErrorHandler- Parameters:
api- notnullvariables- notnullevent- notnull- Returns:
nullto stop event propagation
-
handleException
Logs the givenException, 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 given
Exceptionresulting in a deleted i.e. stopped process instance.- Specified by:
handleExceptionin interfaceExceptionErrorHandler- Parameters:
api- notnullvariables- notnullexception- notnull- Returns:
nullto prevent the process from being stopped
-
getTasks
protected List<org.hl7.fhir.r4.model.Task> getTasks(ProcessPluginApi api, Variables variables, Exception exception) -
updateFailedIfInprogress
protected void updateFailedIfInprogress(ProcessPluginApi api, Variables variables, String errorMessage, List<org.hl7.fhir.r4.model.Task> tasks) -
createTaskErrorOutput
protected org.hl7.fhir.r4.model.Task.TaskOutputComponent createTaskErrorOutput(ProcessPluginApi api, Variables variables, String errorMessage) -
createErrorMessageFromException
protected String createErrorMessageFromException(ProcessPluginApi api, Variables variables, Exception exception) -
updateTaskAndHandleException
protected void updateTaskAndHandleException(ProcessPluginApi api, Variables variables, org.hl7.fhir.r4.model.Task task)
-