org.camunda.bpm.engine.impl
Class RestartProcessInstanceBuilderImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.RestartProcessInstanceBuilderImpl
All Implemented Interfaces:
InstantiationBuilder<RestartProcessInstanceBuilder>, RestartProcessInstanceBuilder

public class RestartProcessInstanceBuilderImpl
extends Object
implements RestartProcessInstanceBuilder

Author:
Anna Pazola

Field Summary
protected  CommandExecutor commandExecutor
           
protected  boolean initialVariables
           
protected  List<AbstractProcessInstanceModificationCommand> instructions
           
protected  String processDefinitionId
           
protected  List<String> processInstanceIds
           
protected  HistoricProcessInstanceQuery query
           
protected  boolean skipCustomListeners
           
protected  boolean skipIoMappings
           
protected  boolean withoutBusinessKey
           
 
Constructor Summary
RestartProcessInstanceBuilderImpl(CommandExecutor commandExecutor, String processDefinitionId)
           
 
Method Summary
 void execute()
          Executes the restart synchronously.
 void execute(boolean writeUserOperationLog)
           
 Batch executeAsync()
          Executes the restart asynchronously as batch.
 HistoricProcessInstanceQuery getHistoricProcessInstanceQuery()
           
 List<AbstractProcessInstanceModificationCommand> getInstructions()
           
 String getProcessDefinitionId()
           
 List<String> getProcessInstanceIds()
           
 RestartProcessInstanceBuilder historicProcessInstanceQuery(HistoricProcessInstanceQuery query)
           
 RestartProcessInstanceBuilder initialSetOfVariables()
          Sets the initial set of variables during restart.
 boolean isInitialVariables()
           
 boolean isSkipCustomListeners()
           
 boolean isSkipIoMappings()
           
 boolean isWithoutBusinessKey()
           
 RestartProcessInstanceBuilder processInstanceIds(List<String> processInstanceIds)
           
 RestartProcessInstanceBuilder processInstanceIds(String... processInstanceIds)
           
 void setInstructions(List<AbstractProcessInstanceModificationCommand> instructions)
           
 void setProcessDefinitionId(String processDefinitionId)
           
 RestartProcessInstanceBuilder skipCustomListeners()
          Skips custom execution listeners when creating activity instances during restart
 RestartProcessInstanceBuilder skipIoMappings()
          Skips io mappings when creating activity instances during restart
 RestartProcessInstanceBuilder startAfterActivity(String activityId)
          Submits an instruction that behaves like InstantiationBuilder.startTransition(String) and always instantiates the single outgoing sequence flow of the given activity.
 RestartProcessInstanceBuilder startBeforeActivity(String activityId)
          Submits the instruction:
 RestartProcessInstanceBuilder startTransition(String transitionId)
          Submits the instruction:
 RestartProcessInstanceBuilder withoutBusinessKey()
          Does not take over the business key of the historic process instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandExecutor

protected CommandExecutor commandExecutor

processInstanceIds

protected List<String> processInstanceIds

instructions

protected List<AbstractProcessInstanceModificationCommand> instructions

processDefinitionId

protected String processDefinitionId

query

protected HistoricProcessInstanceQuery query

initialVariables

protected boolean initialVariables

skipCustomListeners

protected boolean skipCustomListeners

skipIoMappings

protected boolean skipIoMappings

withoutBusinessKey

protected boolean withoutBusinessKey
Constructor Detail

RestartProcessInstanceBuilderImpl

public RestartProcessInstanceBuilderImpl(CommandExecutor commandExecutor,
                                         String processDefinitionId)
Method Detail

startBeforeActivity

public RestartProcessInstanceBuilder startBeforeActivity(String activityId)
Description copied from interface: InstantiationBuilder

Submits the instruction:

Start before the specified activity.

In particular:

Specified by:
startBeforeActivity in interface InstantiationBuilder<RestartProcessInstanceBuilder>
Parameters:
activityId - the activity to instantiate

startAfterActivity

public RestartProcessInstanceBuilder startAfterActivity(String activityId)
Description copied from interface: InstantiationBuilder
Submits an instruction that behaves like InstantiationBuilder.startTransition(String) and always instantiates the single outgoing sequence flow of the given activity. Does not consider asyncAfter.

Specified by:
startAfterActivity in interface InstantiationBuilder<RestartProcessInstanceBuilder>
Parameters:
activityId - the activity for which the outgoing flow should be executed

startTransition

public RestartProcessInstanceBuilder startTransition(String transitionId)
Description copied from interface: InstantiationBuilder

Submits the instruction:

Start a sequence flow.

In particular:

Specified by:
startTransition in interface InstantiationBuilder<RestartProcessInstanceBuilder>
Parameters:
transitionId - the sequence flow to execute

execute

public void execute()
Description copied from interface: RestartProcessInstanceBuilder
Executes the restart synchronously.

Specified by:
execute in interface RestartProcessInstanceBuilder

execute

public void execute(boolean writeUserOperationLog)

executeAsync

public Batch executeAsync()
Description copied from interface: RestartProcessInstanceBuilder
Executes the restart asynchronously as batch. The returned batch can be used to track the progress of the restart.

Specified by:
executeAsync in interface RestartProcessInstanceBuilder
Returns:
the batch which executes the restart asynchronously.

getInstructions

public List<AbstractProcessInstanceModificationCommand> getInstructions()

getProcessInstanceIds

public List<String> getProcessInstanceIds()

processInstanceIds

public RestartProcessInstanceBuilder processInstanceIds(String... processInstanceIds)
Specified by:
processInstanceIds in interface RestartProcessInstanceBuilder
Parameters:
processInstanceIds - the process instance ids to restart.

historicProcessInstanceQuery

public RestartProcessInstanceBuilder historicProcessInstanceQuery(HistoricProcessInstanceQuery query)
Specified by:
historicProcessInstanceQuery in interface RestartProcessInstanceBuilder
Parameters:
query - a query which selects the historic process instances to restart. Query results are restricted to process instances for which the user has Permissions.READ_HISTORY permission.

getHistoricProcessInstanceQuery

public HistoricProcessInstanceQuery getHistoricProcessInstanceQuery()

getProcessDefinitionId

public String getProcessDefinitionId()

setInstructions

public void setInstructions(List<AbstractProcessInstanceModificationCommand> instructions)

setProcessDefinitionId

public void setProcessDefinitionId(String processDefinitionId)

processInstanceIds

public RestartProcessInstanceBuilder processInstanceIds(List<String> processInstanceIds)
Specified by:
processInstanceIds in interface RestartProcessInstanceBuilder
Parameters:
processInstanceIds - the process instance ids to restart.

initialSetOfVariables

public RestartProcessInstanceBuilder initialSetOfVariables()
Description copied from interface: RestartProcessInstanceBuilder
Sets the initial set of variables during restart. By default, the last set of variables is used

Specified by:
initialSetOfVariables in interface RestartProcessInstanceBuilder

isInitialVariables

public boolean isInitialVariables()

skipCustomListeners

public RestartProcessInstanceBuilder skipCustomListeners()
Description copied from interface: RestartProcessInstanceBuilder
Skips custom execution listeners when creating activity instances during restart

Specified by:
skipCustomListeners in interface RestartProcessInstanceBuilder

skipIoMappings

public RestartProcessInstanceBuilder skipIoMappings()
Description copied from interface: RestartProcessInstanceBuilder
Skips io mappings when creating activity instances during restart

Specified by:
skipIoMappings in interface RestartProcessInstanceBuilder

isSkipCustomListeners

public boolean isSkipCustomListeners()

isSkipIoMappings

public boolean isSkipIoMappings()

withoutBusinessKey

public RestartProcessInstanceBuilder withoutBusinessKey()
Description copied from interface: RestartProcessInstanceBuilder
Does not take over the business key of the historic process instance

Specified by:
withoutBusinessKey in interface RestartProcessInstanceBuilder

isWithoutBusinessKey

public boolean isWithoutBusinessKey()


Copyright © 2017 camunda services GmbH. All rights reserved.