Use the following steps to create a parent task:
- Create some folders under the Deploy Folder.
- Create and import the images.
- Create the task properties file.
- Add the label to your resource bundle.
- Add the call to TWGDefaultTask.
- Verify that the task was created.
Create some folders under the Deploy Folder
Use the File->New menu to create these folders under your "deploy" folder.
- classes\com
- classes\com\bobco
- classes\com\bobco\images
When you are finished the project should loook like this:

Create and import the images
You will need a few images which will be displayed on the IBM Director Console will use as icons. GIF files are preferable.
- Small - a 16 bit by 16 bit image. GIF files are preferable
- Large - a 32 bit by 32 bit image.
- medium (for Toolbar) - a 24 bit by 24 bit image.
Use your favorite image editing software to create these images. Then import them into the images folder in you project.

Create the task properties file
Now create the task properties file. Task properties define how IBm Director processes the tasks. Here are some examples of things that you can specify with Task Properties:
- Since tasks allow the user to perform and action (by activating the task) you can tell IBM Director what class methods to invoke when the task is activated.
- You can set the title and icons which will be displayed on the IBM Director Console.
- You can decide where on the console the task will be displayed.
- You can organize the tasks into a hierarchy for the Console display.
Task properties are very powerful and can be complex, but for now, all we need are a few properties to define:
- The task title.
- The location of the icons for the task
Since this is the higest parent task, it cannot be activated, so we do not need to describe where the code is.
Right click on the folder deploy\classes\com\bobco and select New->File.
Create a new file named BobCoParentTask.properties.
Edit the BobCoParentTask.properties file and add these properties
- TaskID
- This is an identifier for the task. It must be unique so it's a good idea to put a common prefix on all of your taskIDs.
- Title
- The actual title text will go in the Resource Bundle - enter the key that you will use for the title string.
- ResourceBundle
- Use the same resource bundle that already exists for your extension. Remember to include the package name in the class name.
- Icon.Large, Icon.Large.Selected
- The name of a 32 bit by 32 bit image
- Icon.Small, Icon.Small.Selected
- The name of a 16 bit by 16 bit image
- Icon.Toolbar
- The name of a 24 bit by 24 bit image

Add the label to your resource bundle
Edit your resource bundle and add the string. Make sure the key for the string matches the Title from the the task properties.
Then you are done, the Resource Bundle will look something like this:

Add the call to TWGDefaultTask
Edit your Extension Class and add the code to create the new TWGDefaultTask. There are two thinks to remember about new TWGDefaultTask.
- Tasks are persistent so if they were created on a previous IBM Director Server start, then you do not need to recreate them. Before creating the task you must check to ensure that it does not already exist by looking for the TaskID.
- The TWGDefaultTask constructor can throw exceptions which you must catch. It is very important to log a message if you catch an exception. Most of the time an exceptions in Task creation happen during development and you will need to write the exception to the Ras Log
You will need to import some classes as follows:

Below is a view of the completed code:

Verify that the task was created
Start the IBM Director Console and look for the task in the Tasks Pane. Below is a screenshot on the classical IBM Director view.
