public interface CommandExecutor's Command are dedicated to contain purely business logic that should be executed. It should not have any reference to underlying process engine and should not be concerned with any process runtime related logic such us completing work item, sending signals, etc.
Information that are taken from process will be delivered as part of data instance of
CommandContext. Depending on the execution context that data can vary but in most of the cases following will be given:
- businessKey - usually unique identifier of the caller
- callbacks - FQCN of the
CommandCollbackthat shall be used on command completion
- workItem - the actual work item that is being executed with all it's parameters
- processInstanceId - id of the process instance that triggered this work
- deploymentId - if given process instance is part of an active deployment
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
execute(CommandContext ctx)Executed this command's logic.
ExecutionResults execute(CommandContext ctx) throws ExceptionExecuted this command's logic.
ctx- - contextual data given by the executor service
- returns any results in case of successful execution
Exception- in case execution failed and shall be retried if possible