Interface ProcessInstantiationBuilder

All Superinterfaces:
ActivityInstantiationBuilder<ProcessInstantiationBuilder>, InstantiationBuilder<ProcessInstantiationBuilder>
All Known Implementing Classes:
ProcessInstantiationBuilderImpl

Author:
Thorben Lindhauer
  • Method Details

    • processDefinitionTenantId

      ProcessInstantiationBuilder processDefinitionTenantId(String tenantId)
      Specify the id of the tenant the process definition belongs to. Can only be used when the definition is referenced by key and not by id.
    • processDefinitionWithoutTenantId

      ProcessInstantiationBuilder processDefinitionWithoutTenantId()
      Specify that the process definition belongs to no tenant. Can only be used when the definition is referenced by key and not by id.
    • businessKey

      ProcessInstantiationBuilder businessKey(String businessKey)
      Set the business key for the process instance
    • caseInstanceId

      ProcessInstantiationBuilder caseInstanceId(String caseInstanceId)
      Associate a case instance with the process instance
    • execute

      ProcessInstance execute()
      Start the process instance.
      Returns:
      the newly created process instance
      Throws:
      AuthorizationException - if the user has no Permissions.CREATE permission on Resources.PROCESS_INSTANCE and no Permissions.CREATE_INSTANCE permission on Resources.PROCESS_DEFINITION.
      See Also:
      • #executeWithVariablesInReturn().
    • execute

      ProcessInstance execute(boolean skipCustomListeners, boolean skipIoMappings)
      Start the process instance.
      Parameters:
      skipCustomListeners - specifies whether custom listeners (task and execution) should be invoked when executing the instructions. Only supported for instructions.
      skipIoMappings - specifies whether input/output mappings for tasks should be invoked throughout the transaction when executing the instructions. Only supported for instructions.
      Returns:
      the newly created process instance
      See Also:
      • #executeWithVariablesInReturn(boolean, boolean).
    • executeWithVariablesInReturn

      ProcessInstanceWithVariables executeWithVariablesInReturn()
      Start the process instance. If no instantiation instructions are set then the instance start at the default start activity. Otherwise, all instructions are executed in the order they are submitted. Custom execution and task listeners, as well as task input output mappings are triggered.
      Returns:
      the newly created process instance with the latest variables
      Throws:
      AuthorizationException - if the user has no Permissions.CREATE permission on Resources.PROCESS_INSTANCE and no Permissions.CREATE_INSTANCE permission on Resources.PROCESS_DEFINITION.
    • executeWithVariablesInReturn

      ProcessInstanceWithVariables executeWithVariablesInReturn(boolean skipCustomListeners, boolean skipIoMappings)
      Start the process instance. If no instantiation instructions are set then the instance start at the default start activity. Otherwise, all instructions are executed in the order they are submitted.
      Parameters:
      skipCustomListeners - specifies whether custom listeners (task and execution) should be invoked when executing the instructions. Only supported for instructions.
      skipIoMappings - specifies whether input/output mappings for tasks should be invoked throughout the transaction when executing the instructions. Only supported for instructions.
      Returns:
      the newly created process instance with the latest variables
      Throws:
      AuthorizationException - if the user has no Permissions.CREATE permission on Resources.PROCESS_INSTANCE and no Permissions.CREATE_INSTANCE permission on Resources.PROCESS_DEFINITION.
      ProcessEngineException - if skipCustomListeners or skipIoMappings is set to true but no instructions are submitted. Both options are not supported when the instance starts at the default start activity. Use execute() instead.