Package org.kie.api.executor
Interface Command
-
public interface Command
Executor'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 ofCommandContext
. 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
CommandCollback
that 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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ExecutionResults
execute(CommandContext ctx)
Executed this command's logic.
-
-
-
Method Detail
-
execute
ExecutionResults execute(CommandContext ctx) throws Exception
Executed this command's logic.- Parameters:
ctx
- - contextual data given by the executor service- Returns:
- returns any results in case of successful execution
- Throws:
Exception
- in case execution failed and shall be retried if possible
-
-