Inherits AbstractTask.
Public Member Functions | |
| Workflow () | |
| Creates a new empty workflow. | |
| Workflow (Object callbackHandler) | |
| Constructs a new empty workflow. | |
| Workflow (WorkflowConfiguration configur) | |
| Constructs a new workflow. | |
| void | add (AbstractTask task) |
| Adds a job to the workflow. | |
| IXMLMessage | call () throws FrameworkException |
| Workflow as task, starting all task and blocking until all are done. | |
| void | chain (AbstractTask task1, AbstractTask task2) |
| Add two tasks and make first start at the end of the second. | |
| void | connect (AbstractTask task, AbstractTask.State state, Method callback) |
| Runs a callback when the job reach the given state. | |
| void | destroyAllResources (Workflow workflow) |
| Cause the unprovisioning of all resources used on the workflow. | |
| WorkflowConfiguration | getConfiguration () |
| Obtains the used configuration. | |
| List< AbstractTask > | getWorks () |
| Returns all the jobs associated to workflow. | |
| boolean | isFinish () |
| Return the workflow state is finish. | |
| void | launch () throws FrameworkException |
| The jobs composing the workflow are started. | |
| void | launch (boolean isBlocking) throws FrameworkException |
| All the jobs and other workflows composed on the workflow are started. | |
| void | setConfiguration (WorkflowConfiguration con) |
| Changes the default workflow configuration. | |
It can compose tasks (jobs and another workflows).
Assistant class that helps to manage the job states. Natural way of treat more than one job on no blocking way. It's the class that initialize the job submit (waiting if necessary the end of its dependencies).
| com.abiquo.api.Workflow.Workflow | ( | Object | callbackHandler | ) |
Constructs a new empty workflow.
| callingClass | the task callback handler |
| com.abiquo.api.Workflow.Workflow | ( | WorkflowConfiguration | configur | ) |
Constructs a new workflow.
| config | workflow behavior (exceptions and exceptions handler) |
| void com.abiquo.api.Workflow.add | ( | AbstractTask | task | ) |
Adds a job to the workflow.
All the jobs in a workflow added throw this call are started in parallel.
| task | the task to be added without dependences |
| IXMLMessage com.abiquo.api.Workflow.call | ( | ) | throws FrameworkException |
| void com.abiquo.api.Workflow.chain | ( | AbstractTask | task1, | |
| AbstractTask | task2 | |||
| ) |
Add two tasks and make first start at the end of the second.
transition from task states task1.FINISH --> task2.START
| task1 | the initial task | |
| task2 | the final task |
| void com.abiquo.api.Workflow.connect | ( | AbstractTask | task, | |
| AbstractTask.State | state, | |||
| Method | callback | |||
| ) |
Runs a callback when the job reach the given state.
Defines transactions to task callback handler at certain job state. Callback method take task as input parameter.
| task | the task whose state is being inquired | |
| state | the state that trigger the callback | |
| callback | method to call when the transaction appears |
| void com.abiquo.api.Workflow.destroyAllResources | ( | Workflow | workflow | ) |
Cause the unprovisioning of all resources used on the workflow.
| workflow | the workflow whose resources instances will be destroyed |
| WorkflowConfiguration com.abiquo.api.Workflow.getConfiguration | ( | ) |
Obtains the used configuration.
| List<AbstractTask> com.abiquo.api.Workflow.getWorks | ( | ) |
Returns all the jobs associated to workflow.
| boolean com.abiquo.api.Workflow.isFinish | ( | ) |
Return the workflow state is finish.
| void com.abiquo.api.Workflow.launch | ( | ) | throws FrameworkException |
The jobs composing the workflow are started.
Blocking until all jobs arrive at finish state.
| FrameworkException | when some task exception can not be resolved at exception handler. |
| void com.abiquo.api.Workflow.launch | ( | boolean | isBlocking | ) | throws FrameworkException |
All the jobs and other workflows composed on the workflow are started.
It make start from all the jobs added without dependence (using add method). At some finish, try to start its dependent tasks.
| isBlocking | - denotes if this call block until all its jobs have FINISH state, or if the programmer consult workflow.isFinish() |
| FrameworkException | when some task exception can not be resolved at exception handler. |
| void com.abiquo.api.Workflow.setConfiguration | ( | WorkflowConfiguration | con | ) |
Changes the default workflow configuration.
| con | the new configuration |
1.5.5