Package com.orchestranetworks.workflow

# Interface ProcessExecutionInfoContext

All Known Subinterfaces:
  `ActionPermissionsOnWorkflowContext`, `ConditionBeanContext`, `ConditionContext`, `ProcessExecutionContext`, `ScriptTaskBeanContext`, `ScriptTaskContext`, `SubWorkflowsCompletionContext`, `SubWorkflowsCreationContext`, `UserTaskBeforeWorkItemCompletionContext`, `UserTaskCreationContext`, `UserTaskUsersForAllocationCollectorContext`, `UserTaskWorkItemCompletionContext`, `WaitTaskOnResumeContext`, `WaitTaskOnStartContext`, `WorkflowTriggerAfterProcessInstanceStartContext`, `WorkflowTriggerAfterWorkItemCreationContext`, `WorkflowTriggerBeforeProcessInstanceTerminationContext`, `WorkflowTriggerBeforeWorkItemAllocationContext`, `WorkflowTriggerBeforeWorkItemDeallocationContext`, `WorkflowTriggerBeforeWorkItemReallocationContext`, `WorkflowTriggerBeforeWorkItemStartContext`, `WorkflowTriggerBeforeWorkItemTerminationContext`, `WorkflowTriggerContext`, `WorkflowTriggerStepContext`, `WorkflowTriggerWorkItemAllocationContext`, `WorkflowTriggerWorkItemAuthenticatedContext`, `WorkflowTriggerWorkItemContext`

public interface ProcessExecutionInfoContext
This interface is used as a generic context for workflow execution to get information about the current process instance.

Since:
  5.5.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ProcessInstance`
  `getProcessInstance()`
  Returns information about the current process instance.
  `UserReference`
  `getProcessInstanceCreator()`
  Returns the creator of the current process instance.
  `ProcessInstanceKey`
  `getProcessInstanceKey()`
  Returns the current process instance Key.
  `Profile`
  `getProfileForPermission(ProcessExecutionContext.WorkflowPermission workflowPermission)`
  Returns the profile that is associated with the specified workflow permission.
  `PublishedProcessKey`
  `getPublishedProcessKey()`
  Returns the current publication key.
  `Repository`
  `getRepository()`
  Returns the current repository where this workflow is executed.
  `Session`
  `getSession()`
  Returns a system-user session (not an authenticated user session).

- ## Method Details

  - ### getRepository

    Repository getRepository()
    Returns the current repository where this workflow is executed.

  - ### getSession

    Session getSession()
    Returns a system-user session (not an authenticated user session).

    This is the case even for a `UserTaskWorkItemCompletionContext`. Consequently, this session cannot be used for accessing interactions properties.

    ##### Warning

    If the returned session is used for executing a `Procedure`, it is equivalent to a `ProcedureContext.setAllPrivileges(boolean)`: all operations done within this session need no particular credentials. Hence, it must be used with caution.

  - ### getProcessInstance

    ProcessInstance getProcessInstance()
    Returns information about the current process instance.

    Returns `null` if `process instance is undefined`.

    The returned object is rebuilt at each call of this method.

    Since:
      5.5.0

  - ### getProcessInstanceKey

    ProcessInstanceKey getProcessInstanceKey()
    Returns the current process instance Key.

    Returns `null` if `process instance is undefined`.

    To get only the process instance key, it is recommended, for more efficiency, to use this method instead of `getProcessInstance()`.

  - ### getPublishedProcessKey

    PublishedProcessKey getPublishedProcessKey()
    Returns the current publication key.

    To get only the publication key, it is recommended, for more efficiency, to use this method instead of `getProcessInstance()`.

  - ### getProcessInstanceCreator

    UserReference getProcessInstanceCreator()
    Returns the creator of the current process instance.

    Returns `null` if `process instance is undefined`.

    To get only the process instance creator, it is recommended, for more efficiency, to use this method instead of `getProcessInstance()`.

    See Also:
      - `ProcessLauncher.setCreator(UserReference)`

  - ### getProfileForPermission

    Profile getProfileForPermission(ProcessExecutionContext.WorkflowPermission workflowPermission)
    Returns the profile that is associated with the specified workflow permission. If no profile is associated or if dynamic permissions are defined, returns `null`.
    See Also:
      - `ActionPermissionsOnWorkflow`