You can clone an existing resource type that you created with Agent Builder.
You can edit the source code that Agent Builder generates and recompile the code to create a new package.
Use one of the following methods:
Start Agent Builder from the working directory for an existing resource type that you created with Agent Builder. Ensure that the working directory contains the rtconfig file. Agent Builder loads the values for that resource type in the Create and Configure screens.
Use the Load Resource Type option from the File drop-down menu.
You must use Browse to select a directory. Typing a new directory name is not sufficient. After you select a directory, Agent Builder re-enables the Create button.
You might change the type of code that is generated for the resource type.
For example, if you initially create a Korn shell version of a resource type but find over time that you require a C version, you can do the following:
Load the existing Korn shell resource type.
Change the language for the output to C.
Click Create to have Agent Builder build a C version of the resource type.
To simplify the process of creating a resource type, Agent Builder limits the amount of information that you can specify, which necessarily limits the scope of the generated resource type. Therefore, to add more sophisticated features, you need to modify the generated source code or the RTR file. Examples of additional features include code that adds validation checks for additional properties or that tunes parameters that Agent Builder does not expose.
The source files are in the install-directory/rt-name/src directory. Agent Builder embeds comments in the source code where you can add code. These comments are of the form (for C code):
/* User added code -- BEGIN vvvvvvvvvvvvvvv */ /* User added code -- END ^^^^^^^^^^^^^^^ */
For example, rt-name.h declares all the utility functions that the different programs use. At the end of the list of declarations are comments that enable you to declare additional functions that you might have added to your code.
Agent Builder also generates the makefile in the install-directory/rt-name/src directory with corresponding targets. Use the make command to recompile the source code. Use the make pkg command to regenerate the resource type package.
The RTR file is in the install-directory/rt-name/etc directory. You can edit the RTR file with a standard text editor. See Setting Resource and Resource Type Properties for more information about the RTR file. See Setting Standard Properties for information about properties.