Package org.camunda.bpm.engine.impl
Class RestartProcessInstanceBuilderImpl
java.lang.Object
org.camunda.bpm.engine.impl.RestartProcessInstanceBuilderImpl
- All Implemented Interfaces:
InstantiationBuilder<RestartProcessInstanceBuilder>,RestartProcessInstanceBuilder
public class RestartProcessInstanceBuilderImpl
extends Object
implements RestartProcessInstanceBuilder
- Author:
- Anna Pazola
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandExecutorprotected booleanprotected List<AbstractProcessInstanceModificationCommand>protected Stringprotected HistoricProcessInstanceQueryprotected booleanprotected booleanprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionRestartProcessInstanceBuilderImpl(String processDefinitionId) RestartProcessInstanceBuilderImpl(CommandExecutor commandExecutor, String processDefinitionId) -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the restart synchronously.Executes the restart asynchronously as batch.Sets the initial set of variables during restart.booleanbooleanbooleanbooleanprocessInstanceIds(String... processInstanceIds) processInstanceIds(List<String> processInstanceIds) voidsetInstructions(List<AbstractProcessInstanceModificationCommand> instructions) voidsetProcessDefinitionId(String processDefinitionId) Skips custom execution listeners when creating activity instances during restartSkips io mappings when creating activity instances during restartstartAfterActivity(String activityId) Submits an instruction that behaves likeInstantiationBuilder.startTransition(String)and always instantiates the single outgoing sequence flow of the given activity.startBeforeActivity(String activityId) Submits the instruction:startTransition(String transitionId) Submits the instruction:Does not take over the business key of the historic process instance
-
Field Details
-
commandExecutor
-
processInstanceIds
-
instructions
-
processDefinitionId
-
query
-
initialVariables
protected boolean initialVariables -
skipCustomListeners
protected boolean skipCustomListeners -
skipIoMappings
protected boolean skipIoMappings -
withoutBusinessKey
protected boolean withoutBusinessKey
-
-
Constructor Details
-
RestartProcessInstanceBuilderImpl
public RestartProcessInstanceBuilderImpl(CommandExecutor commandExecutor, String processDefinitionId) -
RestartProcessInstanceBuilderImpl
-
-
Method Details
-
startBeforeActivity
Description copied from interface:InstantiationBuilderSubmits the instruction:
Start before the specified activity.
In particular:
- In the parent activity hierarchy, determine the closest existing ancestor activity instance
- Instantiate all parent activities up to the ancestor's activity
- Instantiate and execute the given activity (respects the asyncBefore attribute of the activity)
- Specified by:
startBeforeActivityin interfaceInstantiationBuilder<RestartProcessInstanceBuilder>- Parameters:
activityId- the activity to instantiate
-
startAfterActivity
Description copied from interface:InstantiationBuilderSubmits an instruction that behaves likeInstantiationBuilder.startTransition(String)and always instantiates the single outgoing sequence flow of the given activity. Does not consider asyncAfter.- Specified by:
startAfterActivityin interfaceInstantiationBuilder<RestartProcessInstanceBuilder>- Parameters:
activityId- the activity for which the outgoing flow should be executed
-
startTransition
Description copied from interface:InstantiationBuilderSubmits the instruction:
Start a sequence flow.
In particular:
- In the parent activity hierarchy, determine the closest existing ancestor activity instance
- Instantiate all parent activities up to the ancestor's activity
- Execute the given transition (does not consider sequence flow conditions)
- Specified by:
startTransitionin interfaceInstantiationBuilder<RestartProcessInstanceBuilder>- Parameters:
transitionId- the sequence flow to execute
-
execute
public void execute()Description copied from interface:RestartProcessInstanceBuilderExecutes the restart synchronously.- Specified by:
executein interfaceRestartProcessInstanceBuilder
-
executeAsync
Description copied from interface:RestartProcessInstanceBuilderExecutes the restart asynchronously as batch. The returned batch can be used to track the progress of the restart.- Specified by:
executeAsyncin interfaceRestartProcessInstanceBuilder- Returns:
- the batch which executes the restart asynchronously.
-
getInstructions
-
getProcessInstanceIds
-
processInstanceIds
- Specified by:
processInstanceIdsin interfaceRestartProcessInstanceBuilder- Parameters:
processInstanceIds- the process instance ids to restart.
-
historicProcessInstanceQuery
public RestartProcessInstanceBuilder historicProcessInstanceQuery(HistoricProcessInstanceQuery query) - Specified by:
historicProcessInstanceQueryin interfaceRestartProcessInstanceBuilder- Parameters:
query- a query which selects the historic process instances to restart. Query results are restricted to process instances for which the user hasPermissions.READ_HISTORYpermission.
-
getHistoricProcessInstanceQuery
-
getProcessDefinitionId
-
setInstructions
-
setProcessDefinitionId
-
processInstanceIds
- Specified by:
processInstanceIdsin interfaceRestartProcessInstanceBuilder- Parameters:
processInstanceIds- the process instance ids to restart.
-
initialSetOfVariables
Description copied from interface:RestartProcessInstanceBuilderSets the initial set of variables during restart. By default, the last set of variables is used- Specified by:
initialSetOfVariablesin interfaceRestartProcessInstanceBuilder
-
isInitialVariables
public boolean isInitialVariables() -
skipCustomListeners
Description copied from interface:RestartProcessInstanceBuilderSkips custom execution listeners when creating activity instances during restart- Specified by:
skipCustomListenersin interfaceRestartProcessInstanceBuilder
-
skipIoMappings
Description copied from interface:RestartProcessInstanceBuilderSkips io mappings when creating activity instances during restart- Specified by:
skipIoMappingsin interfaceRestartProcessInstanceBuilder
-
isSkipCustomListeners
public boolean isSkipCustomListeners() -
isSkipIoMappings
public boolean isSkipIoMappings() -
withoutBusinessKey
Description copied from interface:RestartProcessInstanceBuilderDoes not take over the business key of the historic process instance- Specified by:
withoutBusinessKeyin interfaceRestartProcessInstanceBuilder
-
isWithoutBusinessKey
public boolean isWithoutBusinessKey()
-