Package de.xima.fc.exceptions
Class NodeTransferredControlException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- de.xima.fc.exceptions.AbstractXfcException
-
- de.xima.fc.exceptions.WorkflowProcessingException
-
- de.xima.fc.exceptions.AbstractAbruptCompletionException
-
- de.xima.fc.exceptions.AbstractSuccessAbruptCompletionException
-
- de.xima.fc.exceptions.NodeTransferredControlException
-
- All Implemented Interfaces:
IXfcException
,IBaseCompletionResult
,IControlTransferringCompletionResult
,ISuccessResultData
,Serializable
public final class NodeTransferredControlException extends AbstractSuccessAbruptCompletionException implements IControlTransferringCompletionResult
Used by anode
to indicate that the node completed abruptly by issuing a control transfer statement.As implied by its name, a node that issues a control transfer statement transfers control to another node upon completion; instead of proceeding with the next node. Typical examples for control transfer statement are break and continue statements, which transfer control to either the end of a loop or to the next iteration of a loop.
A NodeTransferredControlException must be caught by some parent node in the syntax tree of workflow nodes that knows how to handle the control transfer. If no such parent node exists, the exception will bubble up to the workflow engine, which will log a warning, but otherwise treat the
processing chain
execution as successful.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NodeTransferredControlException.Builder
A simple builder for configuring aNodeTransferredControlException
.
-
Constructor Summary
Constructors Constructor Description NodeTransferredControlException(NodeTransferredControlException.Builder builder)
Creates a new exception that should be thrown when a node wishes to transfer control.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NodeTransferredControlException.Builder
builder(WorkflowNode node)
String
getControlTransferType()
NodeKey
getTargetNode()
-
Methods inherited from class de.xima.fc.exceptions.AbstractSuccessAbruptCompletionException
getSoftErrors, getSuccessValue
-
Methods inherited from class de.xima.fc.exceptions.AbstractAbruptCompletionException
getAlwaysValue, getAttachmentValue, getFileValue, getNode
-
Methods inherited from class de.xima.fc.exceptions.WorkflowProcessingException
getDefaultErrorCode, getDefaultMessageKey
-
Methods inherited from class de.xima.fc.exceptions.AbstractXfcException
getErrorCode, getExceptionData, getLocalizedMessage, getMessageKey, getMessageParams
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.xima.fc.interfaces.workflow.execution.IBaseCompletionResult
getAlwaysValue, getAttachmentValue, getFileValue, getNode
-
Methods inherited from interface de.xima.fc.interfaces.workflow.execution.ISuccessResultData
getSoftErrors, getSuccessValue
-
-
-
-
Constructor Detail
-
NodeTransferredControlException
public NodeTransferredControlException(NodeTransferredControlException.Builder builder)
Creates a new exception that should be thrown when a node wishes to transfer control.- Parameters:
builder
- Builder with the data to set.
-
-
Method Detail
-
getControlTransferType
public String getControlTransferType()
- Specified by:
getControlTransferType
in interfaceIControlTransferringCompletionResult
- Returns:
- The type of control transfer, see
EStandardControlTransferType
for a list of built-in transfer types.
-
getTargetNode
@Nullable public NodeKey getTargetNode()
- Specified by:
getTargetNode
in interfaceIControlTransferringCompletionResult
- Returns:
- Optional
node key
of the node which is targeted by the control transfer. Whennull
, the closest node is targeted.
-
builder
public static NodeTransferredControlException.Builder builder(WorkflowNode node)
- Parameters:
node
- The node that did finish execution.- Returns:
- A new builder for a
NodeTransferredControlException
.
-
-