Class WorkflowNode

All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>, de.xima.cmn.dao.interfaces.ILockableEntity<Long>, IDescriptionProviding, ILockingVersionProviding, INameProviding, ITransferable, ITransferableEntity, ITransferableLockableEntity, IUUIDEntity, IActiveFlagProviding, ICustomParametersProviding, IElementKeyProviding, IElementSearchTermsProviding, IIdProviding<Long>, IUuidProviding, IVersionedCustomParametersProviding, IWorkflowElementEntity, IWorkflowElementTypeProviding, IWorkflowNodeTypeProviding, Serializable, Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>

@Entity public class WorkflowNode extends AWorkflowElement<WorkflowNode,WorkflowNodeSearchTerm> implements IWorkflowNodeTypeProviding
A workflow node that represents a statement in a workflow task. Each node can be thought of as a statement node in the syntax tree of a structured program. The graph formed by the getParent() and getChildren() relations must be a tree.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
See Also:
  • Field Details

  • Constructor Details

    • WorkflowNode

      public WorkflowNode()
  • Method Details

    • addChild

      public void addChild(WorkflowNode child)
      Adds a child node to the tail of the existing children, and sets the parent of the given node to this node.
      Parameters:
      child - The child node to add.
    • addChild

      public void addChild(int index, WorkflowNode child)
      Adds a child node to the tail of the existing children, and sets the parent of the given node to this node.
      Parameters:
      index - Position at which to add the child. When smaller than 0, the (current length of the children + 1) is added (-1 appends the item to the end of the list, -2 inserts the item as the second to last position etc.). Afterwards the index is clamped to the range [0, children.size()], so that no index out of bound exceptions can occur.
      child - The child node to add.
    • getChildren

      public List<WorkflowNode> getChildren()
      Returns:
      A list of child nodes, i.e. the nodes that have this node set as their getParent(). Which and how many children a node must or can have depends on the AWorkflowElement.getType() of this node. See EWorkflowNodeKind for a list of built-in nodes.
      See Also:
    • getId

      public Long getId()
      Specified by:
      getId in interface de.xima.cmn.dao.interfaces.IEntity<Long>
      Specified by:
      getId in interface IIdProviding<Long>
      Returns:
      The ID that identifies this instance.
    • getKey

      public ElementKey getKey()
      Specified by:
      getKey in interface IElementKeyProviding
      Returns:
      The key that identifies this instance.
    • getParent

      public WorkflowNode getParent()
      Returns:
      The parent of this node, i.e. the node that contains this node in its getChildren(). The parent may be null if and only if it is the root node, i.e. the node pointed to by WorkflowTask.getRootNode().
      See Also:
    • getSearchTerms

      public List<WorkflowNodeSearchTerm> getSearchTerms()
      Specified by:
      getSearchTerms in interface IElementSearchTermsProviding
      Returns:
      The search terms that were defined for this workflow element.
    • putSearchTerm

      public void putSearchTerm(WorkflowNodeSearchTerm searchTerm)
      Adds the given search term to this element, and sets AWorkflowElementSearchTerm.getElement() to this element.
      Parameters:
      searchTerm - The search term to add to this element.
    • setChildren

      public void setChildren(List<WorkflowNode> children)
      Parameters:
      children - A list of child nodes, i.e. the nodes that have this node set as their getParent(). Which and how many children a node must or can have depends on the AWorkflowElement.getType() of this node. See EWorkflowNodeKind for a list of built-in nodes.
      See Also:
    • setParent

      public void setParent(WorkflowNode parent)
      Parameters:
      parent - The parent of this node, i.e. the node that contains this node in its getChildren(). The parent may be null if and only if it is the root node, i.e. the node pointed to by WorkflowTask.getRootNode().
    • toString

      public String toString()
      Overrides:
      toString in class AbstractLockableEntity