org.kie.api.runtime.process

## Interface ProcessInstance

- All Superinterfaces:
    EventListener
  All Known Subinterfaces:
    WorkflowProcessInstance

      public interface ProcessInstance
      extends EventListener

  A process instance represents one specific instance of a process that is currently executing. Whenever a process is started, a process instance is created that represents that specific instance that was started. It contains all runtime information related to that instance. Multiple process instances of the same process can be executed simultaneously. For example, consider a process definition that describes how to process a purchase order. Whenever a new purchase order comes in, a new process instance will be created for that purchase order. Multiple process instances (one for each purchase order) can coexist. A process instance is uniquely identified by an id. This class can be extended to represent one specific type of process, e.g. `WorkflowProcessInstance` when using a `WorkflowProcess` where the process logic is expressed as a flow chart.
  See Also:
    `WorkflowProcessInstance`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `SLA_ABORTED`
    `static int` | `SLA_MET`
    `static int` | `SLA_NA`
    `static int` | `SLA_PENDING`
    `static int` | `SLA_VIOLATED`
    `static int` | `STATE_ABORTED`
    `static int` | `STATE_ACTIVE`
    `static int` | `STATE_COMPLETED`
    `static int` | `STATE_PENDING`
    `static int` | `STATE_SUSPENDED`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getId()` The unique id of this process instance.
    `long` | `getParentProcessInstanceId()` Returns parent process instance id if this process instance has a parent
    `Process` | `getProcess()`
    `String` | `getProcessId()` The id of the process definition that is related to this process instance.
    `String` | `getProcessName()` The name of the process definition that is related to this process instance.
    `int` | `getState()` The state of the process instance.

    - ### Methods inherited from interface org.kie.api.runtime.process.EventListener

      `getEventTypes, signalEvent`

- - ### Field Detail

    - #### STATE_PENDING

          static final int STATE_PENDING

      See Also:
        Constant Field Values

    - #### STATE_ACTIVE

          static final int STATE_ACTIVE

      See Also:
        Constant Field Values

    - #### STATE_COMPLETED

          static final int STATE_COMPLETED

      See Also:
        Constant Field Values

    - #### STATE_ABORTED

          static final int STATE_ABORTED

      See Also:
        Constant Field Values

    - #### STATE_SUSPENDED

          static final int STATE_SUSPENDED

      See Also:
        Constant Field Values

    - #### SLA_NA

          static final int SLA_NA

      See Also:
        Constant Field Values

    - #### SLA_PENDING

          static final int SLA_PENDING

      See Also:
        Constant Field Values

    - #### SLA_MET

          static final int SLA_MET

      See Also:
        Constant Field Values

    - #### SLA_VIOLATED

          static final int SLA_VIOLATED

      See Also:
        Constant Field Values

    - #### SLA_ABORTED

          static final int SLA_ABORTED

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getProcessId

          String getProcessId()

      The id of the process definition that is related to this process instance.
      Returns:
        the id of the process definition that is related to this process instance

    - #### getProcess

          Process getProcess()

    - #### getId

          long getId()

      The unique id of this process instance.
      Returns:
        the unique id of this process instance

    - #### getProcessName

          String getProcessName()

      The name of the process definition that is related to this process instance.
      Returns:
        the name of the process definition that is related to this process instance

    - #### getState

          int getState()

      The state of the process instance.
      Returns:
        the state of the process instance

    - #### getParentProcessInstanceId

          long getParentProcessInstanceId()

      Returns parent process instance id if this process instance has a parent
      Returns:
        the unique id of parent process instance, 0 if this process instance doesn't have a parent

Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.