org.camunda.bpm.engine.impl
Class ModificationBuilderImpl

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

public class ModificationBuilderImpl
extends Object
implements ModificationBuilder


Field Summary
protected  CommandExecutor commandExecutor
           
protected  List<AbstractProcessInstanceModificationCommand> instructions
           
protected  String processDefinitionId
           
protected  List<String> processInstanceIds
           
protected  ProcessInstanceQuery processInstanceQuery
           
protected  boolean skipCustomListeners
           
protected  boolean skipIoMappings
           
 
Constructor Summary
ModificationBuilderImpl(CommandExecutor commandExecutor, String processDefinitionId)
           
 
Method Summary
 ModificationBuilder cancelAllForActivity(String activityId)
          Submits the instruction:
 void execute()
          Execute the modification synchronously.
 void execute(boolean writeUserOperationLog)
           
 Batch executeAsync()
          Execute the modification asynchronously as batch.
 CommandExecutor getCommandExecutor()
           
 List<AbstractProcessInstanceModificationCommand> getInstructions()
           
 String getProcessDefinitionId()
           
 List<String> getProcessInstanceIds()
           
 ProcessInstanceQuery getProcessInstanceQuery()
           
 boolean isSkipCustomListeners()
           
 boolean isSkipIoMappings()
           
 ModificationBuilder processInstanceIds(List<String> processInstanceIds)
           
 ModificationBuilder processInstanceIds(String... processInstanceIds)
           
 ModificationBuilder processInstanceQuery(ProcessInstanceQuery processInstanceQuery)
           
 void setInstructions(List<AbstractProcessInstanceModificationCommand> instructions)
           
 void setProcessDefinitionId(String processDefinitionId)
           
 ModificationBuilder skipCustomListeners()
          Skips custom execution listeners when creating/removing activity instances during modification
 ModificationBuilder skipIoMappings()
          Skips io mappings when creating/removing activity instances during modification
 ModificationBuilder startAfterActivity(String activityId)
          Submits an instruction that behaves like InstantiationBuilder.startTransition(String) and always instantiates the single outgoing sequence flow of the given activity.
 ModificationBuilder startBeforeActivity(String activityId)
          Submits the instruction:
 ModificationBuilder startTransition(String transitionId)
          Submits the instruction:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandExecutor

protected CommandExecutor commandExecutor

processInstanceQuery

protected ProcessInstanceQuery processInstanceQuery

processInstanceIds

protected List<String> processInstanceIds

instructions

protected List<AbstractProcessInstanceModificationCommand> instructions

processDefinitionId

protected String processDefinitionId

skipCustomListeners

protected boolean skipCustomListeners

skipIoMappings

protected boolean skipIoMappings
Constructor Detail

ModificationBuilderImpl

public ModificationBuilderImpl(CommandExecutor commandExecutor,
                               String processDefinitionId)
Method Detail

startBeforeActivity

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

Submits the instruction:

Start before the specified activity.

In particular:

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

startAfterActivity

public ModificationBuilder 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<ModificationBuilder>
Parameters:
activityId - the activity for which the outgoing flow should be executed

startTransition

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

Submits the instruction:

Start a sequence flow.

In particular:

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

cancelAllForActivity

public ModificationBuilder cancelAllForActivity(String activityId)
Description copied from interface: ModificationBuilder

Submits the instruction:

Cancel all instances of the given activity in an arbitrary order, which are:

The cancellation order of the instances is arbitrary

Specified by:
cancelAllForActivity in interface ModificationBuilder
Parameters:
activityId - the activity for which all instances should be cancelled

processInstanceIds

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

processInstanceIds

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

processInstanceQuery

public ModificationBuilder processInstanceQuery(ProcessInstanceQuery processInstanceQuery)
Specified by:
processInstanceQuery in interface ModificationBuilder
Parameters:
processInstanceQuery - a query which selects the process instances to modify. Query results are restricted to process instances for which the user has Permissions.READ permission.

skipCustomListeners

public ModificationBuilder skipCustomListeners()
Description copied from interface: ModificationBuilder
Skips custom execution listeners when creating/removing activity instances during modification

Specified by:
skipCustomListeners in interface ModificationBuilder

skipIoMappings

public ModificationBuilder skipIoMappings()
Description copied from interface: ModificationBuilder
Skips io mappings when creating/removing activity instances during modification

Specified by:
skipIoMappings in interface ModificationBuilder

execute

public void execute(boolean writeUserOperationLog)

execute

public void execute()
Description copied from interface: ModificationBuilder
Execute the modification synchronously.

Specified by:
execute in interface ModificationBuilder

executeAsync

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

Specified by:
executeAsync in interface ModificationBuilder
Returns:
the batch which executes the modification asynchronously.

getCommandExecutor

public CommandExecutor getCommandExecutor()

getProcessInstanceQuery

public ProcessInstanceQuery getProcessInstanceQuery()

getProcessInstanceIds

public List<String> getProcessInstanceIds()

getProcessDefinitionId

public String getProcessDefinitionId()

setProcessDefinitionId

public void setProcessDefinitionId(String processDefinitionId)

getInstructions

public List<AbstractProcessInstanceModificationCommand> getInstructions()

setInstructions

public void setInstructions(List<AbstractProcessInstanceModificationCommand> instructions)

isSkipCustomListeners

public boolean isSkipCustomListeners()

isSkipIoMappings

public boolean isSkipIoMappings()


Copyright © 2017 camunda services GmbH. All rights reserved.