Creating an installation activity file
After you create the package.xml file, you create an installation activity file. The installation activity file contains information about the type of activity that you want to perform with the extension loader program, such as importing or exporting class definitions. Based on the activity description provided in the activity file, the extension loader performs a specified task.
To create an installation activity file
Open an empty file in a UNIX text editor, such as the vi text editor.
You must create the activity file in UNIX format for running it on the UNIX platform.
If you create the activity file in Windows format, make sure you use the
DostoUnixcommand to convert the file from Microsoft Windows format to UNIX before you run it.
Type oout and the OSDriver.out output file name in the beginning of the file.
You must specify the
ooutcommand and the OSDriver.out output file for the activity script. The extension loader program generates an error if you skip this line in the activity file.
You must name the output file for the
ooutcommand as OSDriver.out. If you specify any other file name, the extension loader program generates an error.
- Specify the type of activity the extension loader must perform, such as ARD or OSD.
- Specify the number of class definitions or instance data objects you want to export or import.
- Specify the class name and namespace for the OSD activity.
- Specify if you want to export or import the metadata or instance data.
You can use the
cmdbdriverprogram for the import and export function parameters.
- Save the activity file under the extension subdirectory you created in step 1 with an .xml, .txt, or any other type of extension, depending on the activity type.
For more information about the activity file extensions, see 30698.
The Extensions subdirectories will now contain a package.xml file, an installation activity file, and the XML files, which were created when you exported your classes using the
Naming conventions in installation activity files
An installation activity file uses the following naming convention:
- <install-order> is a three-digit number from 000 to 999. The <install-order> instructs the extension loader to install the objects in the Extensions directory in ascending order. Therefore, you must specify a lower <install-order> for the object that you want to install first. For example, if you have two extension subdirectories, 650-EXClass and 655-EXClass, the 650-EXClass subdirectory will be installed first.
- <name> is an alphanumeric name for the extension. Do not use spaces, quotation marks, or wildcard characters in the <name> element.
- <type> instructs the extension loader to perform an action based on a specific value. The options for the <type> parameter include:
- IMP – Import data into an BMC Remedy AR System form
- ARD – BMC Remedy AR System driver script
- OSD – cmdbdriver script
- RIK – Remedy Installation Kit
- <suffix> is the file extension for the installation activity file. The file extensions for the activity file include:
- XML – The file extension for the RIK file must be .xml.
Other types – The file extension for all other activities (IMP, ARD, and OSD) can be of any type such as .txt.
An example of an activity file name is 500-CLASS-OSD.txt.
Every installation activity file you create must contain the
ooutcommand instructs the extension loader to log the script actions. You must specify the OSDriver.out output file name with the
ooutcommand, as illustrated in the example, to save the script actions.
After the script stops executing the activity file, the extension loader reads these log comments to verify whether the script execution was successful. The
coutcommand closes the log entry file.
Example: Activity file
oout OSDriver.out imp //activity type 1 // Number of class or instance definitions to import TEST // Class name SampleClass // Namespace 1 // metadata or instance data choice. 1 indicates metadata. . cout term q
When the extension loader executes the activity file shown in this example, the class definitions for the
Test class will be imported. You can specify multiple
cmdbdriver commands in your activity file, for example, your script file can contain both export and import commands.