Package org.jbpm.workflow.instance.impl

## Class NodeInstanceImpl

- java.lang.Object
- - org.jbpm.workflow.instance.impl.NodeInstanceImpl

- All Implemented Interfaces:
    `Serializable`, `NodeInstance`, `org.kie.api.runtime.process.NodeInstance`
  Direct Known Subclasses:
    `ActionNodeInstance`, `CatchLinkNodeInstance`, `CompositeNodeInstance.CompositeNodeEndInstance`, `CompositeNodeInstance.CompositeNodeStartInstance`, `ExtendedNodeInstanceImpl`, `FaultNodeInstance`, `ForEachNodeInstance.ForEachJoinNodeInstance`, `ForEachNodeInstance.ForEachSplitNodeInstance`, `JoinInstance`, `SplitInstance`, `StartNodeInstance`, `ThrowLinkNodeInstance`

      public abstract class NodeInstanceImpl
      extends Object
      implements NodeInstance, Serializable

  Default implementation of a RuleFlow node instance.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `protected class` | `NodeInstanceImpl.NodeInstanceTrigger` |

    - ### Nested classes/interfaces inherited from interface org.jbpm.workflow.instance.NodeInstance

      `NodeInstance.CancelType`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected NodeInstance.CancelType` | `cancelType` |
    `protected Map<String,​Object>` | `dynamicParameters` |
    `protected static org.slf4j.Logger` | `logger` |
    `protected int` | `slaCompliance` |
    `protected Date` | `slaDueDate` |
    `protected long` | `slaTimerId` |
    `protected Date` | `triggerTime` |
    `static String` | `UNIQUE_ID` |

    - ### Fields inherited from interface org.jbpm.workflow.instance.NodeInstance

      `METADATA_WRAP_ASYNC_NODE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `NodeInstanceImpl()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `cancel()` |
    `void` | `cancel​(NodeInstance.CancelType cancelType)` |
    `protected void` | `configureSla()` |
    `protected void` | `executeAction​(Action action)` | This method is used in both instances of the `ExtendedNodeInstanceImpl` and `ActionNodeInstance` instances in order to handle exceptions thrown when executing actions.
    `protected NodeInstance` | `followConnection​(org.kie.api.definition.process.Connection connection)` |
    `NodeInstance.CancelType` | `getCancelType()` |
    `protected org.kie.internal.runtime.error.ExecutionErrorHandler` | `getExecutionErrorHandler()` |
    `protected org.kie.api.runtime.process.NodeInstance` | `getFrom()` |
    `long` | `getId()` |
    `int` | `getLevel()` |
    `Map<String,​Object>` | `getMetaData()` |
    `Object` | `getMetaData​(String name)` |
    `org.kie.api.definition.process.Node` | `getNode()` |
    `long` | `getNodeId()` |
    `org.kie.api.runtime.process.NodeInstanceContainer` | `getNodeInstanceContainer()` |
    `String` | `getNodeName()` |
    `WorkflowProcessInstance` | `getProcessInstance()` |
    `int` | `getSlaCompliance()` |
    `Date` | `getSlaDueDate()` |
    `Long` | `getSlaTimerId()` |
    `Date` | `getTriggerTime()` |
    `String` | `getUniqueId()` |
    `Object` | `getVariable​(String variableName)` |
    `void` | `internalSetSlaCompliance​(int slaCompliance)` |
    `void` | `internalSetSlaDueDate​(Date slaDueDate)` |
    `void` | `internalSetSlaTimerId​(Long slaTimerId)` |
    `abstract void` | `internalTrigger​(org.kie.api.runtime.process.NodeInstance from, String type)` |
    `boolean` | `isAborted()` |
    `boolean` | `isInversionOfControl()` |
    `Context` | `resolveContext​(String contextId, Object param)` |
    `List<ContextInstance>` | `resolveContextInstance​(String contextId)` |
    `ContextInstance` | `resolveContextInstance​(String contextId, Object param)` |
    `void` | `retrigger​(boolean remove)` |
    `void` | `setAborted​(boolean aborted)` |
    `void` | `setDynamicParameters​(Map<String,​Object> dynamicParameters)` |
    `void` | `setId​(long id)` |
    `void` | `setLevel​(int level)` |
    `void` | `setMetaData​(String name, Object data)` |
    `void` | `setNodeId​(long nodeId)` |
    `void` | `setNodeInstanceContainer​(org.kie.api.runtime.process.NodeInstanceContainer nodeInstanceContainer)` |
    `void` | `setProcessInstance​(WorkflowProcessInstance processInstance)` |
    `void` | `setVariable​(String variableName, Object value)` |
    `void` | `trigger​(org.kie.api.runtime.process.NodeInstance from, String type)` |
    `protected void` | `triggerCompleted​(String type, boolean remove)` |
    `protected void` | `triggerConnection​(org.kie.api.definition.process.Connection connection)` |
    `void` | `triggerNode​(long nodeId)` |
    `void` | `triggerNode​(long nodeId, boolean fireEvents)` |
    `protected void` | `triggerNodeInstance​(NodeInstance nodeInstance, String type)` |
    `protected void` | `triggerNodeInstance​(NodeInstance nodeInstance, String type, boolean fireEvents)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### UNIQUE_ID

          public static final String UNIQUE_ID

      See Also:
        Constant Field Values

    - #### logger

          protected static final org.slf4j.Logger logger

    - #### triggerTime

          protected Date triggerTime

    - #### slaCompliance

          protected int slaCompliance

    - #### slaDueDate

          protected Date slaDueDate

    - #### slaTimerId

          protected long slaTimerId

    - #### cancelType

          protected transient NodeInstance.CancelType cancelType

    - #### dynamicParameters

          protected transient Map<String,​Object> dynamicParameters

  - ### Constructor Detail

    - #### NodeInstanceImpl

          public NodeInstanceImpl()

  - ### Method Detail

    - #### getCancelType

          public NodeInstance.CancelType getCancelType()

    - #### setId

          public void setId​(long id)

    - #### getId

          public long getId()

      Specified by:
        `getId` in interface `org.kie.api.runtime.process.NodeInstance`

    - #### setNodeId

          public void setNodeId​(long nodeId)

    - #### getNodeId

          public long getNodeId()

      Specified by:
        `getNodeId` in interface `org.kie.api.runtime.process.NodeInstance`

    - #### getNodeName

          public String getNodeName()

      Specified by:
        `getNodeName` in interface `org.kie.api.runtime.process.NodeInstance`

    - #### getLevel

          public int getLevel()

      Specified by:
        `getLevel` in interface `NodeInstance`

    - #### setLevel

          public void setLevel​(int level)

    - #### setProcessInstance

          public void setProcessInstance​(WorkflowProcessInstance processInstance)

    - #### getProcessInstance

          public WorkflowProcessInstance getProcessInstance()

      Specified by:
        `getProcessInstance` in interface `org.kie.api.runtime.process.NodeInstance`

    - #### getNodeInstanceContainer

          public org.kie.api.runtime.process.NodeInstanceContainer getNodeInstanceContainer()

      Specified by:
        `getNodeInstanceContainer` in interface `org.kie.api.runtime.process.NodeInstance`

    - #### setNodeInstanceContainer

          public void setNodeInstanceContainer​(org.kie.api.runtime.process.NodeInstanceContainer nodeInstanceContainer)

    - #### getNode

          public org.kie.api.definition.process.Node getNode()

      Specified by:
        `getNode` in interface `NodeInstance`
      Specified by:
        `getNode` in interface `org.kie.api.runtime.process.NodeInstance`

    - #### isInversionOfControl

          public boolean isInversionOfControl()

    - #### cancel

          public final void cancel()

      Specified by:
        `cancel` in interface `NodeInstance`

    - #### cancel

          public void cancel​(NodeInstance.CancelType cancelType)

      Specified by:
        `cancel` in interface `NodeInstance`

    - #### trigger

          public final void trigger​(org.kie.api.runtime.process.NodeInstance from,
                                    String type)

      Specified by:
        `trigger` in interface `NodeInstance`

    - #### internalTrigger

          public abstract void internalTrigger​(org.kie.api.runtime.process.NodeInstance from,
                                               String type)

    - #### executeAction

          protected void executeAction​(Action action)

      This method is used in both instances of the `ExtendedNodeInstanceImpl` and `ActionNodeInstance` instances in order to handle exceptions thrown when executing actions.
      Parameters:
        `action` - An `Action` instance.

    - #### triggerCompleted

          protected void triggerCompleted​(String type,
                                          boolean remove)

    - #### followConnection

          protected NodeInstance followConnection​(org.kie.api.definition.process.Connection connection)

    - #### triggerNodeInstance

          protected void triggerNodeInstance​(NodeInstance nodeInstance,
                                             String type)

    - #### getFrom

          protected org.kie.api.runtime.process.NodeInstance getFrom()

    - #### triggerNodeInstance

          protected void triggerNodeInstance​(NodeInstance nodeInstance,
                                             String type,
                                             boolean fireEvents)

    - #### triggerConnection

          protected void triggerConnection​(org.kie.api.definition.process.Connection connection)

    - #### retrigger

          public void retrigger​(boolean remove)

    - #### triggerNode

          public void triggerNode​(long nodeId)

    - #### triggerNode

          public void triggerNode​(long nodeId,
                                  boolean fireEvents)

    - #### resolveContext

          public Context resolveContext​(String contextId,
                                        Object param)

    - #### resolveContextInstance

          public List<ContextInstance> resolveContextInstance​(String contextId)

    - #### resolveContextInstance

          public ContextInstance resolveContextInstance​(String contextId,
                                                        Object param)

      Specified by:
        `resolveContextInstance` in interface `NodeInstance`

    - #### getVariable

          public Object getVariable​(String variableName)

      Specified by:
        `getVariable` in interface `org.kie.api.runtime.process.NodeInstance`

    - #### setVariable

          public void setVariable​(String variableName,
                                  Object value)

      Specified by:
        `setVariable` in interface `org.kie.api.runtime.process.NodeInstance`

    - #### getUniqueId

          public String getUniqueId()

    - #### getMetaData

          public Map<String,​Object> getMetaData()

    - #### getMetaData

          public Object getMetaData​(String name)

    - #### setMetaData

          public void setMetaData​(String name,
                                  Object data)

    - #### setDynamicParameters

          public void setDynamicParameters​(Map<String,​Object> dynamicParameters)

      Specified by:
        `setDynamicParameters` in interface `NodeInstance`

    - #### getExecutionErrorHandler

          protected org.kie.internal.runtime.error.ExecutionErrorHandler getExecutionErrorHandler()

    - #### configureSla

          protected void configureSla()

    - #### getSlaCompliance

          public int getSlaCompliance()

      Specified by:
        `getSlaCompliance` in interface `NodeInstance`

    - #### internalSetSlaCompliance

          public void internalSetSlaCompliance​(int slaCompliance)

    - #### getSlaDueDate

          public Date getSlaDueDate()

      Specified by:
        `getSlaDueDate` in interface `NodeInstance`

    - #### internalSetSlaDueDate

          public void internalSetSlaDueDate​(Date slaDueDate)

    - #### getSlaTimerId

          public Long getSlaTimerId()

      Specified by:
        `getSlaTimerId` in interface `NodeInstance`

    - #### internalSetSlaTimerId

          public void internalSetSlaTimerId​(Long slaTimerId)

    - #### getTriggerTime

          public Date getTriggerTime()

      Specified by:
        `getTriggerTime` in interface `NodeInstance`

    - #### isAborted

          public boolean isAborted()

    - #### setAborted

          public void setAborted​(boolean aborted)