Interface IWorkflowNodeResult
-
- All Known Implementing Classes:
WorkflowNodeResult
public interface IWorkflowNodeResult
Represents the result obtained when a workflow node was executed. The execution may have- completed normally, in which case
getNormalCompletionResult()
is available - completed abruptly by throwing an exception, in which case
getAbruptCompletionException()
is available and returns aNodeThrewException
. - completed abruptly by requesting a return, in which case
getAbruptCompletionException()
is available and returns aNodeReturnedException
.
- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description AbstractAbruptCompletionException
getAbruptCompletionException()
default Object
getAlwaysResultValue()
ENodeCompletionType
getCompletionType()
default List<? extends IErrorResultData>
getErrorResultData()
default IWorkflowFileValue
getFileValue()
default WorkflowNode
getNode()
Finds the workflow node that created this result.INormalCompletionResult
getNormalCompletionResult()
default NodeReturnedException
getReturningException()
default List<NodeSoftErrorException>
getSoftErrors()
default ISuccessResultData
getSuccessResultData()
default Object
getSuccessResultValue()
default NodeThrewException
getThrowingException()
default boolean
isHasHardError()
Checks whether a hard error occurred during the node's execution, i.e. whether the node completed abruptly by throwing an exception.default boolean
isHasSoftErrors()
Checks whether any soft errors occurred during the node's execution, i.e. whether the node completed normally or by issuing a return statements and at least one soft error was provided.default boolean
isHasSoftOrHardErrors()
Checks whether any error occurred during the node's execution, including hard and soft errors.default boolean
isWasSuccessful()
Checks whether the node was executed successfully, i.e. whether it completed normally or by issuing a return statement.
-
-
-
Method Detail
-
getAbruptCompletionException
@Nullable AbstractAbruptCompletionException getAbruptCompletionException()
- Returns:
- The exception that was thrown by the workflow node, or
null
when the node did not complete abruptly. - See Also:
getCompletionType()
-
getAlwaysResultValue
default Object getAlwaysResultValue()
- Returns:
- The value of the result that is always available. May be
null
if the node provides no result.
-
getCompletionType
ENodeCompletionType getCompletionType()
- Returns:
- How the execution of the workflow node completed.
-
getErrorResultData
default List<? extends IErrorResultData> getErrorResultData()
- Returns:
- Returns a list of error results provided by the node. When
isWasSuccessful()
istrue
, this returns thesoft errors
. Otherwise, whenisWasSuccessful()
isfalse
, this returns a singleton list withgetThrowingException()
. - Since:
- 7.0.7
-
getFileValue
default IWorkflowFileValue getFileValue()
- Returns:
- If
isWasSuccessful()
istrue
, this returns the files created by the node when it was executed successfully.
-
getNode
default WorkflowNode getNode()
Finds the workflow node that created this result.- Returns:
- The workflow node that creates this result.
-
getNormalCompletionResult
@Nullable INormalCompletionResult getNormalCompletionResult()
- Returns:
- The result returned by the workflow node upon execution, or
null
when the node did not complete normally. - See Also:
getCompletionType()
-
getReturningException
@Nullable default NodeReturnedException getReturningException()
- Returns:
- The
NodeReturnedException
whengetCompletionType()
isENodeCompletionType.RETURNING
, ornull
otherwise.
-
getSoftErrors
default List<NodeSoftErrorException> getSoftErrors()
- Returns:
- If
isWasSuccessful()
istrue
, this returns the soft errors provided by the node when it was executed successfully. Returns an empty list whenisWasSuccessful()
isfalse
or the node did not provide any soft errors. - Since:
- 7.0.7
-
getSuccessResultData
@Nullable default ISuccessResultData getSuccessResultData()
- Returns:
- If
isWasSuccessful()
istrue
, this returns the success result data obtained by the node when it was executed successfully. Returnsnull
whenisWasSuccessful()
isfalse
. - Since:
- 7.0.7
-
getSuccessResultValue
@Nullable default Object getSuccessResultValue()
- Returns:
- If
isWasSuccessful()
istrue
, this returns the result obtained by the node when it was executed successfully. Returnsnull
whenisWasSuccessful()
isfalse
or the node provided no result.
-
getThrowingException
@Nullable default NodeThrewException getThrowingException()
- Returns:
- The
NodeThrewException
whengetCompletionType()
isENodeCompletionType.THROWING
, ornull
otherwise.
-
isHasHardError
default boolean isHasHardError()
Checks whether a hard error occurred during the node's execution, i.e. whether the node completed abruptly by throwing an exception. This is the opposite ofisWasSuccessful()
.- Returns:
- Whether the node threw a
NodeThrewException
. - Since:
- 7.0.7
- See Also:
isHasSoftOrHardErrors()
,isHasSoftErrors()
,isWasSuccessful()
-
isHasSoftErrors
default boolean isHasSoftErrors()
Checks whether any soft errors occurred during the node's execution, i.e. whether the node completed normally or by issuing a return statements and at least one soft error was provided.- Returns:
- Whether the node provided at least one soft error.
- Since:
- 7.0.7
- See Also:
isHasSoftOrHardErrors()
,isHasHardError()
,isWasSuccessful()
-
isHasSoftOrHardErrors
default boolean isHasSoftOrHardErrors()
Checks whether any error occurred during the node's execution, including hard and soft errors. That is, returnsfalse
when either the node completed abruptly by throwing an exception; or when the node completed normally or by issuing a return statement and at least one soft error is present.- Returns:
- Whether any soft or hard errors occurred during the node's execution.
- Since:
- 7.0.7
- See Also:
isWasSuccessful()
,isHasHardError()
,isHasSoftErrors()
-
isWasSuccessful
default boolean isWasSuccessful()
Checks whether the node was executed successfully, i.e. whether it completed normally or by issuing a return statement. When this returnstrue
,getSuccessResultValue()
is available. When this returnsfalse
,getThrowingException()
is available.Note: This is the opposite of
isHasHardError()
. This method checks for a hard error, i.e. whether the node threw an exception or not, it does not check forsoft errors
.- Returns:
- Whether the node was executed successfully.
- See Also:
isHasSoftOrHardErrors()
,isHasHardError()
,isHasSoftErrors()
-
-