Class UpdateProcessInstanceSuspensionStateBuilderImpl
- java.lang.Object
-
- org.camunda.bpm.engine.impl.runtime.UpdateProcessInstanceSuspensionStateBuilderImpl
-
- All Implemented Interfaces:
UpdateProcessInstancesRequest,UpdateProcessInstanceSuspensionStateBuilder,UpdateProcessInstanceSuspensionStateSelectBuilder,UpdateProcessInstanceSuspensionStateTenantBuilder
public class UpdateProcessInstanceSuspensionStateBuilderImpl extends java.lang.Object implements UpdateProcessInstanceSuspensionStateBuilder, UpdateProcessInstanceSuspensionStateSelectBuilder, UpdateProcessInstanceSuspensionStateTenantBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandExecutorcommandExecutorprotected booleanisProcessDefinitionTenantIdSetprotected java.lang.StringprocessDefinitionIdprotected java.lang.StringprocessDefinitionKeyprotected java.lang.StringprocessDefinitionTenantIdprotected java.lang.StringprocessInstanceId
-
Constructor Summary
Constructors Constructor Description UpdateProcessInstanceSuspensionStateBuilderImpl()Creates a builder without CommandExecutor which can not be used to update the suspension state viaactivate()orsuspend().UpdateProcessInstanceSuspensionStateBuilderImpl(CommandExecutor commandExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()Activates the provided process instances.UpdateProcessInstancesSuspensionStateBuilderbyHistoricProcessInstanceQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery)Selects a list of process instances with the given a historical process instance query.UpdateProcessInstanceSuspensionStateBuilderImplbyProcessDefinitionId(java.lang.String processDefinitionId)Selects the instances of the process definition with the given id.UpdateProcessInstanceSuspensionStateBuilderImplbyProcessDefinitionKey(java.lang.String processDefinitionKey)Selects the instances of the process definitions with the given key.UpdateProcessInstanceSuspensionStateBuilderImplbyProcessInstanceId(java.lang.String processInstanceId)Selects the process instance with the given id.UpdateProcessInstancesSuspensionStateBuilderbyProcessInstanceIds(java.lang.String... processInstanceIds)Selects a list of process instances with the given list of ids.UpdateProcessInstancesSuspensionStateBuilderbyProcessInstanceIds(java.util.List<java.lang.String> processInstanceIds)Selects a list of process instances with the given list of ids.UpdateProcessInstancesSuspensionStateBuilderbyProcessInstanceQuery(ProcessInstanceQuery processInstanceQuery)Selects a list of process instances with the given a process instance query.java.lang.StringgetProcessDefinitionId()java.lang.StringgetProcessDefinitionKey()java.lang.StringgetProcessDefinitionTenantId()java.lang.StringgetProcessInstanceId()booleanisProcessDefinitionTenantIdSet()UpdateProcessInstanceSuspensionStateBuilderImplprocessDefinitionTenantId(java.lang.String tenantId)Specify the id of the tenant the process definition belongs to.UpdateProcessInstanceSuspensionStateBuilderImplprocessDefinitionWithoutTenantId()Specify that the process definition belongs to no tenant.voidsuspend()Suspends the provided process instances.protected voidvalidateParameters()
-
-
-
Field Detail
-
commandExecutor
protected final CommandExecutor commandExecutor
-
processInstanceId
protected java.lang.String processInstanceId
-
processDefinitionKey
protected java.lang.String processDefinitionKey
-
processDefinitionId
protected java.lang.String processDefinitionId
-
processDefinitionTenantId
protected java.lang.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 viaactivate()orsuspend(). Can be used in combination with your own command.
-
-
Method Detail
-
byProcessInstanceIds
public UpdateProcessInstancesSuspensionStateBuilder byProcessInstanceIds(java.util.List<java.lang.String> processInstanceIds)
Description copied from interface:UpdateProcessInstancesRequestSelects a list of process instances with the given list of ids.- Specified by:
byProcessInstanceIdsin interfaceUpdateProcessInstancesRequest- Parameters:
processInstanceIds- list of ids of the process instances- Returns:
- the builder
-
byProcessInstanceIds
public UpdateProcessInstancesSuspensionStateBuilder byProcessInstanceIds(java.lang.String... processInstanceIds)
Description copied from interface:UpdateProcessInstancesRequestSelects a list of process instances with the given list of ids.- Specified by:
byProcessInstanceIdsin interfaceUpdateProcessInstancesRequest- Parameters:
processInstanceIds- list of ids of the process instances- Returns:
- the builder
-
byProcessInstanceQuery
public UpdateProcessInstancesSuspensionStateBuilder byProcessInstanceQuery(ProcessInstanceQuery processInstanceQuery)
Description copied from interface:UpdateProcessInstancesRequestSelects a list of process instances with the given a process instance query.- Specified by:
byProcessInstanceQueryin interfaceUpdateProcessInstancesRequest- Parameters:
processInstanceQuery- process instance query that discribes a list of the process instances- Returns:
- the builder
-
byHistoricProcessInstanceQuery
public UpdateProcessInstancesSuspensionStateBuilder byHistoricProcessInstanceQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery)
Description copied from interface:UpdateProcessInstancesRequestSelects a list of process instances with the given a historical process instance query.- Specified by:
byHistoricProcessInstanceQueryin interfaceUpdateProcessInstancesRequest- Parameters:
historicProcessInstanceQuery- historical process instance query that discribes a list of the process instances- Returns:
- the builder
-
byProcessInstanceId
public UpdateProcessInstanceSuspensionStateBuilderImpl byProcessInstanceId(java.lang.String processInstanceId)
Description copied from interface:UpdateProcessInstanceSuspensionStateSelectBuilderSelects the process instance with the given id.- Specified by:
byProcessInstanceIdin interfaceUpdateProcessInstanceSuspensionStateSelectBuilder- Parameters:
processInstanceId- id of the process instance- Returns:
- the builder
-
byProcessDefinitionId
public UpdateProcessInstanceSuspensionStateBuilderImpl byProcessDefinitionId(java.lang.String processDefinitionId)
Description copied from interface:UpdateProcessInstanceSuspensionStateSelectBuilderSelects the instances of the process definition with the given id.- Specified by:
byProcessDefinitionIdin interfaceUpdateProcessInstanceSuspensionStateSelectBuilder- Parameters:
processDefinitionId- id of the process definition- Returns:
- the builder
-
byProcessDefinitionKey
public UpdateProcessInstanceSuspensionStateBuilderImpl byProcessDefinitionKey(java.lang.String processDefinitionKey)
Description copied from interface:UpdateProcessInstanceSuspensionStateSelectBuilderSelects the instances of the process definitions with the given key.- Specified by:
byProcessDefinitionKeyin interfaceUpdateProcessInstanceSuspensionStateSelectBuilder- Parameters:
processDefinitionKey- key of the process definition- Returns:
- the builder
-
processDefinitionWithoutTenantId
public UpdateProcessInstanceSuspensionStateBuilderImpl processDefinitionWithoutTenantId()
Description copied from interface:UpdateProcessInstanceSuspensionStateTenantBuilderSpecify that the process definition belongs to no tenant.- Specified by:
processDefinitionWithoutTenantIdin interfaceUpdateProcessInstanceSuspensionStateTenantBuilder- Returns:
- the builder
-
processDefinitionTenantId
public UpdateProcessInstanceSuspensionStateBuilderImpl processDefinitionTenantId(java.lang.String tenantId)
Description copied from interface:UpdateProcessInstanceSuspensionStateTenantBuilderSpecify the id of the tenant the process definition belongs to.- Specified by:
processDefinitionTenantIdin interfaceUpdateProcessInstanceSuspensionStateTenantBuilder- Parameters:
tenantId- the id of the tenant- Returns:
- the builder
-
activate
public void activate()
Description copied from interface:UpdateProcessInstanceSuspensionStateBuilderActivates 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:
activatein interfaceUpdateProcessInstanceSuspensionStateBuilder
-
suspend
public void suspend()
Description copied from interface:UpdateProcessInstanceSuspensionStateBuilderSuspends 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
- claiming
- completing
- delegation
- changes in task assignees, owners, etc.
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:
suspendin interfaceUpdateProcessInstanceSuspensionStateBuilder
-
validateParameters
protected void validateParameters()
-
getProcessDefinitionKey
public java.lang.String getProcessDefinitionKey()
-
getProcessDefinitionId
public java.lang.String getProcessDefinitionId()
-
getProcessDefinitionTenantId
public java.lang.String getProcessDefinitionTenantId()
-
isProcessDefinitionTenantIdSet
public boolean isProcessDefinitionTenantIdSet()
-
getProcessInstanceId
public java.lang.String getProcessInstanceId()
-
-