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:
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
- Confirm the configuration of the Options settings to make sure that they match the type of beans you want to generate.
- 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.
- (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.
- Specify a package name for the bean.
Do not use spaces in the name.
- 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.
- (Optional) To create JavaDocs for the package, select Generate JavaDocs.
- Once you have created a package name, click the Generate button.
- Select the task file that contains the inputs and outputs that you want to implement in your generated task, and then click Next.
- 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.
- 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: