Tasks
Workflow Tasks provide the necessary artifacts to contribute to the Task library maintained by Cisco UCS Director. The task can be used in a Workflow definition.
At a minimum, a task should have the following classes:
-
A class that implements the TaskConfigIf interface.
-
A class that extends and implements methods in the AbstractTask class.
TaskConfigIf
A class that implements this interface becomes a Task’s input. That is, a task that wants to accept inputs for its execution shall depend on a class that implements TaskConfigIf . The class that implements this interface should also contain all the input field definitions appropriately annotated for prompting the user. The class should also have JDO annotations to enable the Platform runtime to persist this object in the database.
A sample Config class is shown in the sample code.
AbstractTask
A task implementation must extend the AbstractTask abstract class and should provide implementation for all the abstract methods. This is the main class where all the business logic pertaining to the task goes. The most important method in this class, where the business logic implementation will be scripted, is executeCustomAction( ) . The rest of the methods provide sufficient context to the Platform runtime to enable the task to appear in the Orchestration designer tree and to enable the task to be dragged and dropped in a Workflow.