Generating Task Bean Interface Objects

When you generate a task bean, a Java package is created in a folder named for the task file from which the bean was generated. The default location for the folder created is:

install_location\EAI\IMSTaskDesigner\MetaData\task_file_name

A Java package name consists of descriptive parts, with a period between each part. Typically, the first part of the package name indicates a logical grouping for similar packages. The remaining parts describe the package, or what is contained in the package. The package name also represents the directory structure of the package.

In Task Builder, when you specify a package name, any class file created is given a fully qualified name by appending the name of the task file used to generate the bean to the package name specified. For example, if you had a task file named StockSale, and a bean generated from that file, and you specified a package name of com.attachmate.tasks, the class file created would be named com.attachmate.tasks.StockSale.

If a task file contains more than one task, a separate Java class would be generated for each task. The names of the tasks would be identical except for the last part, which would reflect the name of the task for which it is created. For instance, if the task file contained two tasks, named Task1 and Task2, the classes created would be named com.attachmate.tasks.Task1 and com.attachmate.tasks.Task2.

To generate a task bean interface object
  1. Confirm the configuration of the Options settings to make sure that they match the type of beans you want to generate.

  2. Verify that your Java compilation environment (Sun Java 2 SDK) has been set in Task Builder, by choosing, from the Tools menu, Options, then choose the Compiling tab.

  3. (Optional) To specify a default value for the package name, in Task Builder, from the Tools menu, select Options, then from the Generating page, select Task Beans and click Properties.

  4. Specify a package name for the bean.

    Do not use spaces in the name.

    Note
    • To use a different package name each time you generate a task interface object, specify the name when you select the bean type to generate.

    • If you intend to use the task bean interface object with Attachmate Presentation Builder Designer, you must specify a package name.
  5. (Optional) To create JavaDocs for the package, select Generate JavaDocs.

  6. Once you have created a package name, click the Generate button.

  7. Select the task file that contains the inputs and outputs that you want to implement in your generated task, and then click Next.

  8. Select Task Beans.

    You can optionally generate other types of interface objects at the same time. If you want to generate only a task bean interface object, clear any other types of interface objects selected.

    Interface object types are automatically selected for option types that are configured from the Generate page of the Options dialog box.

  9. When you have finished your selections, click the Generate button.

    The Generation Results dialog box displays, indicating the results of the generation process, and listing the files generated in the following folder:

    install_directory\EAI\IMSTaskDesigner\MetaData\

Related Topics
Bullet Creating Task Files
Bullet Creating a Task Definition
Bullet Generating Service Bean Interface Objects
Bullet Using Apache Axis Web Services
  Attachmate