@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public @interface Work
Orchestrator.addWork(Object) rather
than Orchestrator.addPassThru(Object). A
@Work method implements the primary functionality of a task. It
will be recognized and executed as a tast method whether it is public or not.
Arguments to a task method can be any non-primitive Object, though each of
those objects should also have been added to the orchestrator prior to its
execution. Upon execution of a task method, each of its arguments will have
already been invoked. An exception to this is any parameter of type
ITask which are not 'executed' separately in
this sense, but simply injected with the ITask wrapper for the
POJO itself. A task method can also have no arguments, in which case it is
invoked immediately upon orchestrator execution.
A task method can return a boolean result or simply be void, which equates to
returning true. A return value of false indicates that
downstream tasks should not fire: any task fires only if all of its inputs
have fired, except for List parameters, which never prevent
firing but instead any false-returning tasks will be excluded from the list
(which means that a list parameter may be empty).
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
light
Normally task methods are executed in their own thread when the
opportunity for parallel execution arises.
|
Scope |
scope
Specifies alternative behavior when a method is invoked more than once,
e.g.
|
public abstract boolean light
public abstract Scope scope
Copyright © 2018. All rights reserved.