Package org.kie.internal.runtime.manager.context

## Class ProcessInstanceIdContext

- java.lang.Object
- - org.kie.internal.runtime.manager.context.ProcessInstanceIdContext

- All Implemented Interfaces:
    `org.kie.api.runtime.manager.Context<java.lang.String>`

      public class ProcessInstanceIdContext
      extends java.lang.Object
      implements org.kie.api.runtime.manager.Context<java.lang.String>

  Process instance id aware implementation of the `Context` interface. It's main responsibility is to be the data holder between caller and runtime manager to obtain proper instances of `RuntimeEngine`.
  Used by strategy:
  - PerProcessInstance
  To obtain instances of this context use one of the following static methods:
  - `get()` to get empty context when starting process instances
  - `get(Long)` to get context for specific process instance

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ProcessInstanceIdContext​(java.lang.String processInstanceId)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static ProcessInstanceIdContext` | `get()` | Returns new instance of `ProcessInstanceIdContext` without process instance id.
    `static ProcessInstanceIdContext` | `get​(java.lang.String processInstanceId)` | Returns new instance of `ProcessInstanceIdContext` with id of already existing process instance
    `java.lang.String` | `getContextId()` |
    `void` | `setContextId​(java.lang.String id)` |

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

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

- - ### Constructor Detail

    - #### ProcessInstanceIdContext

          public ProcessInstanceIdContext​(java.lang.String processInstanceId)

  - ### Method Detail

    - #### getContextId

          public java.lang.String getContextId()

      Specified by:
        `getContextId` in interface `org.kie.api.runtime.manager.Context<java.lang.String>`

    - #### setContextId

          public void setContextId​(java.lang.String id)

    - #### get

          public static ProcessInstanceIdContext get()

      Returns new instance of `ProcessInstanceIdContext` without process instance id. Used for starting new instances of the process.
      Returns:

    - #### get

          public static ProcessInstanceIdContext get​(java.lang.String processInstanceId)

      Returns new instance of `ProcessInstanceIdContext` with id of already existing process instance
      Parameters:
        `processInstanceId` - actual identifier of process instance
      Returns: