org.camunda.bpm.engine.impl.runtime
Class UpdateProcessInstanceSuspensionStateBuilderImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.runtime.UpdateProcessInstanceSuspensionStateBuilderImpl
All Implemented Interfaces:
UpdateProcessInstanceSuspensionStateBuilder, UpdateProcessInstanceSuspensionStateSelectBuilder, UpdateProcessInstanceSuspensionStateTenantBuilder

public class UpdateProcessInstanceSuspensionStateBuilderImpl
extends Object
implements UpdateProcessInstanceSuspensionStateBuilder, UpdateProcessInstanceSuspensionStateSelectBuilder, UpdateProcessInstanceSuspensionStateTenantBuilder


Field Summary
protected  CommandExecutor commandExecutor
           
protected  boolean isProcessDefinitionTenantIdSet
           
protected  String processDefinitionId
           
protected  String processDefinitionKey
           
protected  String processDefinitionTenantId
           
protected  String processInstanceId
           
 
Constructor Summary
UpdateProcessInstanceSuspensionStateBuilderImpl()
          Creates a builder without CommandExecutor which can not be used to update the suspension state via activate() or suspend().
UpdateProcessInstanceSuspensionStateBuilderImpl(CommandExecutor commandExecutor)
           
 
Method Summary
 void activate()
           Activates the provided process instances.
 UpdateProcessInstanceSuspensionStateBuilderImpl byProcessDefinitionId(String processDefinitionId)
          Selects the instances of the process definition with the given id.
 UpdateProcessInstanceSuspensionStateBuilderImpl byProcessDefinitionKey(String processDefinitionKey)
          Selects the instances of the process definitions with the given key.
 UpdateProcessInstanceSuspensionStateBuilderImpl byProcessInstanceId(String processInstanceId)
          Selects the process instance with the given id.
 String getProcessDefinitionId()
           
 String getProcessDefinitionKey()
           
 String getProcessDefinitionTenantId()
           
 String getProcessInstanceId()
           
 boolean isProcessDefinitionTenantIdSet()
           
 UpdateProcessInstanceSuspensionStateBuilderImpl processDefinitionTenantId(String tenantId)
          Specify the id of the tenant the process definition belongs to.
 UpdateProcessInstanceSuspensionStateBuilderImpl processDefinitionWithoutTenantId()
          Specify that the process definition belongs to no tenant.
 void suspend()
           Suspends the provided process instances.
protected  void validateParameters()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandExecutor

protected final CommandExecutor commandExecutor

processInstanceId

protected String processInstanceId

processDefinitionKey

protected String processDefinitionKey

processDefinitionId

protected String processDefinitionId

processDefinitionTenantId

protected String processDefinitionTenantId

isProcessDefinitionTenantIdSet

protected boolean isProcessDefinitionTenantIdSet
Constructor Detail

UpdateProcessInstanceSuspensionStateBuilderImpl

public UpdateProcessInstanceSuspensionStateBuilderImpl(CommandExecutor commandExecutor)

UpdateProcessInstanceSuspensionStateBuilderImpl

public UpdateProcessInstanceSuspensionStateBuilderImpl()
Creates a builder without CommandExecutor which can not be used to update the suspension state via activate() or suspend(). Can be used in combination with your own command.

Method Detail

byProcessInstanceId

public UpdateProcessInstanceSuspensionStateBuilderImpl byProcessInstanceId(String processInstanceId)
Description copied from interface: UpdateProcessInstanceSuspensionStateSelectBuilder
Selects the process instance with the given id.

Specified by:
byProcessInstanceId in interface UpdateProcessInstanceSuspensionStateSelectBuilder
Parameters:
processInstanceId - id of the process instance
Returns:
the builder

byProcessDefinitionId

public UpdateProcessInstanceSuspensionStateBuilderImpl byProcessDefinitionId(String processDefinitionId)
Description copied from interface: UpdateProcessInstanceSuspensionStateSelectBuilder
Selects the instances of the process definition with the given id.

Specified by:
byProcessDefinitionId in interface UpdateProcessInstanceSuspensionStateSelectBuilder
Parameters:
processDefinitionId - id of the process definition
Returns:
the builder

byProcessDefinitionKey

public UpdateProcessInstanceSuspensionStateBuilderImpl byProcessDefinitionKey(String processDefinitionKey)
Description copied from interface: UpdateProcessInstanceSuspensionStateSelectBuilder
Selects the instances of the process definitions with the given key.

Specified by:
byProcessDefinitionKey in interface UpdateProcessInstanceSuspensionStateSelectBuilder
Parameters:
processDefinitionKey - key of the process definition
Returns:
the builder

processDefinitionWithoutTenantId

public UpdateProcessInstanceSuspensionStateBuilderImpl processDefinitionWithoutTenantId()
Description copied from interface: UpdateProcessInstanceSuspensionStateTenantBuilder
Specify that the process definition belongs to no tenant.

Specified by:
processDefinitionWithoutTenantId in interface UpdateProcessInstanceSuspensionStateTenantBuilder
Returns:
the builder

processDefinitionTenantId

public UpdateProcessInstanceSuspensionStateBuilderImpl processDefinitionTenantId(String tenantId)
Description copied from interface: UpdateProcessInstanceSuspensionStateTenantBuilder
Specify the id of the tenant the process definition belongs to.

Specified by:
processDefinitionTenantId in interface UpdateProcessInstanceSuspensionStateTenantBuilder
Parameters:
tenantId - the id of the tenant
Returns:
the builder

activate

public void activate()
Description copied from interface: UpdateProcessInstanceSuspensionStateBuilder

Activates the provided process instances.

If you have a process instance hierarchy, activating one process instance from the hierarchy will not activate other process instances from that hierarchy.

Specified by:
activate in interface UpdateProcessInstanceSuspensionStateBuilder

suspend

public void suspend()
Description copied from interface: UpdateProcessInstanceSuspensionStateBuilder

Suspends the provided process instances. This means that the execution is stopped, so the token state will not change. However, actions that do not change token state, like setting/removing variables, etc. will succeed.

Tasks belonging to the suspended process instance will also be suspended. This means that any actions influencing the tasks' lifecycles will fail, such as

Actions that only change task properties will succeed, such as changing variables or adding comments.

If a process instance is in state suspended, the engine will also not execute jobs (timers, messages) associated with this instance.

If you have a process instance hierarchy, suspending one process instance from the hierarchy will not suspend other process instances from that hierarchy.

Specified by:
suspend in interface UpdateProcessInstanceSuspensionStateBuilder

validateParameters

protected void validateParameters()

getProcessDefinitionKey

public String getProcessDefinitionKey()

getProcessDefinitionId

public String getProcessDefinitionId()

getProcessDefinitionTenantId

public String getProcessDefinitionTenantId()

isProcessDefinitionTenantIdSet

public boolean isProcessDefinitionTenantIdSet()

getProcessInstanceId

public String getProcessInstanceId()


Copyright © 2016 camunda services GmbH. All rights reserved.