Interface ProcessInstanceService

All Known Implementing Classes:
DefaultProcessInstanceService

public interface ProcessInstanceService
Author:
Joram Barrez
  • Method Details

    • generateNewProcessInstanceId

      String generateNewProcessInstanceId()
      Returns:
      A new id that will be used when starting a process instance. This is for example needed to set the bidirectional relation when a case instance starts a process instance through a process task.
    • startProcessInstance

      String startProcessInstance(String processDefinitionId, String predefinedProcessInstanceId, String stageInstanceId, String tenantId, Map<String,Object> inParametersMap, String businessKey, Map<String,Object> variableFormVariables, FormInfo variableFormInfo, String variableFormOutcome)
      Starts a process instance without a reference to a plan item instance (i.e. non-blocking behavior).
    • startProcessInstance

      String startProcessInstance(String processDefinitionId, String predefinedProcessInstanceId, String planItemInstanceId, String stageInstanceId, String tenantId, Map<String,Object> inParametersMap, String businessKey, Map<String,Object> variableFormVariables, FormInfo variableFormInfo, String variableFormOutcome)
      Starts a process instance with a reference to a plan item instance (i.e. blocking behavior).
    • deleteProcessInstance

      void deleteProcessInstance(String processInstanceId)
      Deletes the given process instance. Typically used to propagate termination.
    • getVariable

      Object getVariable(String executionId, String variableName)
      Returns the variable value for a given variable.
    • getVariables

      Map<String,Object> getVariables(String executionId)
      Returns all variables for the given execution (or process instance).
    • resolveExpression

      Object resolveExpression(String executionId, String expression)
      Resolves the given expression within the context of the passed execution.
    • triggerCaseTask

      void triggerCaseTask(String executionId, Map<String,Object> variables)
      Triggers a case instance that was started by a process instance.
    • handleCaseTaskError

      void handleCaseTaskError(String executionId, BusinessError error)
      Propagates an uncaught business error from a child case instance to the parent BPMN execution. This triggers BPMN error propagation (boundary error events) on the CaseTask.
    • getOutputParametersOfCaseTask

      List<IOParameter> getOutputParametersOfCaseTask(String executionId)
      Retrieves the IOParameter out parameters of a case task currently being execution by the given execution.
    • resolveProcessDefinitionId

      String resolveProcessDefinitionId(String processDefinitionKey, String tenantId, Boolean fallbackToDefaultTenant, String parentDeploymentId)
      Resolves the process definition id from the given key and parameters.
    • isHistoryEnabledForProcessDefinitionId

      boolean isHistoryEnabledForProcessDefinitionId(String processDefinitionId)
      Checks whether history is enabled for the given process definition id.
    • isHistoryEnabledForProcessInstance

      boolean isHistoryEnabledForProcessInstance(String processInstanceId)
      Checks whether history is enabled for the given process instance id.