Class FlowGraphEndPoint.Normal

  • All Implemented Interfaces:
    INodeKeyProviding, Serializable
    Enclosing class:
    FlowGraphEndPoint

    public static final class FlowGraphEndPoint.Normal
    extends FlowGraphEndPoint
    A special type of FlowGraphEndPoint, used when analyzing the control flow of a workflow processing chain.

    A normal end point is a node that can complete normally by returning a result and does not always transfer control to the node or a child of the node when it completes normally. For example, most business logic actions can complete normally (and usually also abruptly by throwing an exception).

    More formally, given a syntax tree of nodes representing the parent-child relationship, the normal end points of a node n are the set of all nodes {m} such that all of the following hold:

    • (a) m is in the subtree of n,
    • (b) m can potentially (but might not always) complete normally; and
    • (c) m does not always transfer control to a node in the subtree of n when m completes normally.

    The subtree of a node n is set of all nodes {m} that are either equal to n or have n as one of their parents.

    Condition (a) follows from the hierarchical execution principle of the workflow engine. A node, when asked to execute, may choose to execute some of its children in its subtree depending on the circumstances (such as an if-else statement that execute one of its two children depending on the outcome of a condition); but may never execute any other nodes outside its subtree. This implies that nodes can never transfer control to any node outside its subtree.

    Condition (b) allows for other types of completion. A node is allowed to complete in other manners depending on the circumstances, such as a business logic action that may throw an error when it cannot perform its duty.

    Condition (c) is required for cases such as a block sequence statements, where no child other than the last child can be a normal end point with respect to the block sequence statement, as control is always transferred to the next child when it completes normally.

    Since:
    8.2.0
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form