-
Notifications
You must be signed in to change notification settings - Fork 43
Basic Annotations
Shyam Akirala edited this page Apr 17, 2017
·
2 revisions
Some of the basic constructs are as follows
A method can be marked with the @Workflow
annotation to indicate that it is a workflow definition.
Note that a method annotated with @Workflow
must return void
@Workflow
supports the following parameters:
Parameter Name | Mandatory | Description |
---|---|---|
version | yes | Flux runtime will ensure that @Tasks of the same version are executed as part of workflow orchestration |
Any method can be marked with the @Task
annotation. This annotation can be used to denote re-entrant, stateless methods capable of executing a single, logical piece of work. As will be explained later, a @Task
method can be executed on any JVM in a flux container. Thus, it is important that these methods work only on the input data and do not rely on any other state variables of a class.
@Task
supports the following parameters:
Parameter Name | Mandatory | Description |
---|---|---|
version | yes | Flux runtime will ensure that @Tasks of the same version are executed as part of workflow orchestration |
timeout | yes | Specifies the time limit given for task execution |
retries | no; default 0 | Specifies the number of times the orchestrator should re-attempt failed/timed out tasks |