IBM Director uses tasks to perform operations on the systems that are being managed and tasks are the most common way to extend IBM Director.
Use these steps to add a task:
Before you add a task, you will need to decide what kind of a task to create.Your choices are:
Tasks that present you, the IBM Director user, with an interface (for example, a dialog) are interactive. These tasks must be started by the user, or activated, on the IBM Director console.
Tasks that do not require user input are non-interactive. These tasks can be activated form the IBM Director Console and they can be activated from the IBM Director Scheduler, by Event Actions, or even by the Command Line Interface (CLI).
Tasks can be created to be either targeted or non-targeted. Task targets are always Managed Objects. Let's look at some examples.
Example 1: A task called power-off allows an IBM Director user to turn off a specific system. In this case, the target is the system to be turned off. As always the target is a Managed Object.
Example 2: The IBM Director Scheduler GUI allows an IBM Director user to schedule actions to happen at specific times. Because the schedule itself does not apply to any one system, it is non-targeted. The user does not have to select any specific Managed Object to activate this task.
One of the most significant features of IBM Director is group actions, the abillity to allow a user to easily perform an action on an entire group of managed objects. The user can do this in either of two ways:
Parent tasks cannot be activated. They are simply a way of organizing tasks on the IBM Director Console to help limit clutter on the user interface. Below is an example how parent and child tasks appear in the Task Pane of the IBM Director Console:
In IBM Director 5.1, the parent task will also be added to the Toolbar on the IBM Director Console. The child tasks will be displayed as "drop-down" items under the toolbar icon.
If you have more than one task, you should create a parent task and make the rest of your tasks children of that task.
Every time you change your code, follow the directions for redeploying you extension, but remember: every time you change the properties of a task, you must do a twgreset to remove the old persistent copy of the task.
There is a helper class called TWGDefaultTask that will make task creation easier. The only methods that you will ever need to use from TWGDefaultTask are it's constructors. The steps to create a task are these: