public interface AsynchronousExecutionTask extends ExecutableTask
ExecutableTask.Result
Modifier and Type | Method and Description |
---|---|
Serializable |
collectDataForExecution(TaskContext context)
Collects data from task context for asynchronous execution.
|
boolean |
executeAsynchronously(TaskContext context)
Determines, based on current task context (params, metadata, etc.) if the exeuction
should be done asynchronously.
|
Serializable |
processDataAsynchronously(Serializable data)
Process data collected in
collectDataForExecution(com.whitestein.lsps.engine.lang.TaskContext) . |
void |
processExecutionResult(TaskContext context,
Serializable result)
This method is called after the asynchronous execution has been done
|
processInput, start, terminate
Serializable collectDataForExecution(TaskContext context) throws ErrorException
processDataAsynchronously(java.io.Serializable)
method asynchronously.context
- ErrorException
void processExecutionResult(TaskContext context, Serializable result) throws ErrorException
context
- result
- result of asynchronous call of method processDataAsynchronously(java.io.Serializable)
ErrorException
Serializable processDataAsynchronously(Serializable data)
collectDataForExecution(com.whitestein.lsps.engine.lang.TaskContext)
. This execution is done asynchronously
outside of process model. The result of this execution is afterwards sent back to task (processExecutionResult(com.whitestein.lsps.engine.lang.TaskContext, java.io.Serializable)
)
so that the computed results can be processed and any necessary changes in model instance can be done.
This method should not throw ErrorException
since it is not executed in model instance context.data
- data to processboolean executeAsynchronously(TaskContext context) throws ErrorException
processDataAsynchronously(java.io.Serializable)
will be
executed outside model instance (thus not blocking transaction, model execution, etc.}. If
false it will be called directly.context
- ErrorException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.