Class AbstractSuccessAbruptCompletionException
- All Implemented Interfaces:
de.xima.cmn.i18n.ILocalizedMessageProvider, IXfcException, IBaseCompletionResult, ISuccessResultData, Serializable
- Direct Known Subclasses:
NodeReturnedException, NodeTransferredControlException
- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAbstractSuccessAbruptCompletionException.Builder<Self extends AbstractSuccessAbruptCompletionException.Builder<Self>>A simple builder for configuring aNodeReturnedException. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSuccessAbruptCompletionException(AbstractSuccessAbruptCompletionException.Builder<?> builder) Creates a new exception that should be thrown when a node wishes to complete abruptly in a successful manner. -
Method Summary
Modifier and TypeMethodDescriptionfinal List<NodeSoftErrorException> Business logic might need to distinguish between hard errors and soft errors.final ObjectMethods inherited from class AbstractAbruptCompletionException
getAlwaysValue, getAttachmentValue, getFileValue, getNodeMethods inherited from class WorkflowProcessingException
getDefaultErrorCode, getDefaultMessageKeyMethods inherited from class AbstractXfcException
getErrorCode, getExceptionData, getLocalizedMessage, getMessageKey, getMessageParamsMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface IBaseCompletionResult
getAlwaysValue, getAttachmentValue, getFileValue, getNode
-
Constructor Details
-
AbstractSuccessAbruptCompletionException
protected AbstractSuccessAbruptCompletionException(AbstractSuccessAbruptCompletionException.Builder<?> builder) Creates a new exception that should be thrown when a node wishes to complete abruptly in a successful manner.- Parameters:
builder- Builder with the data to set.
-
-
Method Details
-
getSoftErrors
Description copied from interface:ISuccessResultDataBusiness logic might need to distinguish between hard errors and soft errors. A hard error is anexceptionthat results in the workflow failing when not caught by an error handler. These are for example technical errors such as a missing database connection, or when a file cannot be read form the file system due to missing permissions.Soft errors are similar to warnings in that not all of the the business logic could be performed or that some the business logic had to be skipped. In contrast with hard errors, however, the node itself still completes normally and does not cause the workflow to fail. This method can be used to check if any soft errors occurred.
Soft errors are similar to
hard errorsin that both provide an error code, an error message, as well as custom additional data.Common examples of soft errors include missing files from optional upload form elements, or a
4xxHTTP return code. However, the exact definition of what constitutes a soft error must be decided on a case-by-case basis by each individualnode implementation. This method is meant to be a uniform interface for nodes to provide information about soft errors. This method can also be used to check whether a node was "successful", by checking whether the list of soft errors is empty. Implementations are encouraged to provide more details about their completion status viaISuccessResultData.getSuccessValue().Soft errors are purely informational. Workflow execution is not affected in any way by whether or not soft error occurred. The node still either completes normally or returns, and the next node or trigger is processed as if no soft errors were present.
@implNote This interface provides a default implementation that returns an empty list for backwards compatibility so as not to break existing implementation. However, all existing implementations are strongly advised to override and implement this method. The default implementation may be removed at some point.
- Specified by:
getSoftErrorsin interfaceISuccessResultData- Returns:
- A list of soft errors that did occur during the execution of the workflow node.
-
getSuccessValue
- Specified by:
getSuccessValuein interfaceISuccessResultData- Returns:
- The value that is returned when node completed normally. Must conform to the
IExecutionResultDescriptor.getSuccessValueDescriptor(IValueDescriptorFactory)IExecutionResultDescriptor#getSuccessValueDescriptor.
-