Interface NodeInstance


  • public interface NodeInstance
    A node instance represents the execution of one specific node in a process instance. Whenever a node is reached during the execution of a process instance, a node instance will be created. A node instance contains all the runtime state related to the execution of that node. Multiple node instances for the same node can coexist in the same process instance (if that node is to be executed multiple times in that process instance). A node instance is uniquely identified (within its node instance container!) by an id. Node instances can be nested, meaning that a node instance can be created as part of another node instance.
    • Method Detail

      • getId

        String getId()
        The id of the node instance. This is unique within the node instance container this node instance lives in.
        Returns:
        the id of the node instance
      • getNodeId

        long getNodeId()
        The id of the node this node instance refers to. The node represents the definition that this node instance was based on.
        Returns:
        the id of the node this node instance refers to
      • getNodeDefinitionId

        String getNodeDefinitionId()
        The id of the node definition this node instance refers to. The node represents the definition that this node instance was based on.
        Returns:
        the definition id of the node this node instance refers to
      • getNode

        Node getNode()
        Return the node this node instance refers to. The node represents the definition that this node instance was based on.
        Returns:
        the node this node instance refers to
      • getNodeName

        String getNodeName()
        The name of the node this node instance refers to.
        Returns:
        the name of the node this node instance refers to
      • getProcessInstance

        WorkflowProcessInstance getProcessInstance()
        The process instance that this node instance is executing in.
        Returns:
        the process instance that this node instance is executing in
      • getNodeInstanceContainer

        NodeInstanceContainer getNodeInstanceContainer()
        The node instance container that this node instance is part of. If the node was defined in the top-level process scope, this is the same as the process instance. If not, it is the node instance container this node instance is executing in.
        Returns:
        the process instance that this node instance is executing in
      • getVariable

        Object getVariable​(String variableName)
        Returns variable associated with this node instance under given name
        Parameters:
        variableName - name of the variable
        Returns:
        variable value if present otherwise null
      • setVariable

        void setVariable​(String variableName,
                         Object value)
        Sets variable with given name and value
        Parameters:
        variableName - name of the variable
        value - value of the variable
      • getTriggerTime

        Date getTriggerTime()
        Returns the time when this node instance was triggered
        Returns:
        actual trigger time
      • getLeaveTime

        Date getLeaveTime()
        Returns the time when this node instance was left, might be null if node instance is still active
        Returns:
        actual leave time
      • getNodeInstanceState

        NodeInstanceState getNodeInstanceState()
        Returns current state of the node instance.
        Returns:
        current state