KIE Internal 6.2.0.CR2

org.kie.internal.executor.api
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 of CommandContext. Depending on the execution context that data can vary but in most of the cases following will be given:

When executed as part of the process (work item handler) additional data can be expected: Important note about implementations is that it shall always be possible to be initialized with default constructor as executor service is an async component so it will initialize the command on demand using reflection. In case there is a heavy logic on initialization it should be placed in another service implementation that can be looked up from within command.


Method Summary
 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

KIE Internal 6.2.0.CR2

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.