XML file of a step
The .xml file is the "link" between the actual action which will be executed by the Chilli script and the operational rule step action's definition in the console. It contains a general description the step, calls the Chilli script, and provides the parameters to the console that need to be defined and then passed on to the script for execution. These are the parameters displayed in the Properties window of the Select a Step dialog in which you enter the values.
The following examples are included:
The following general rules apply for the xml tags:
- None of the xml tags is allowed parameters.
- All tags must have an opening and an end tag.
For the XML file, you can use the following elements. Their relation is indicated in the table by indentation, for example, PARAM is a child of PARAMS and a parent of LABEL.
Name | Description | Required | |||
---|---|---|---|---|---|
STEPTYPE | The root element. It has no parameters. The only allowed tags within this element are CLASS, NAME, SCRIPT, NOTE and PARAMS. | Yes | |||
| CLASS | The name of the step class to which this step belongs. A step class is a container for a number of steps concerning a specific topic, such as Agent Configuration, Directory and File Handling or User Message Box. You can enter either a hardcoded text such as Tools or a keyword, such as DB_STEPCLASS_TOOLS. | Yes | ||
| NAME | The name of the step. You can enter either a hardcoded text such as Add Line or a keyword, such as DB_STEPNAME_ADDLINE. | Yes | ||
| SCRIPT | The name of the Chilli script which corresponds to the .xml file, in this example addline.chl . | Yes | ||
| NOTE | Additional information such as a short description of the step. You can enter either a hardcoded text such as Add a line to a file or a keyword, such as DB_STEPNOTE_ADDLINE. | No | ||
| PARAMS | Container for the parameters. If the step doesn't have any parameters, leave this element empty. | Yes | ||
|
| PARAM | Container for a single parameter. | No | |
|
|
| NAME | The name of the Chilli variable as listed in the CHL script. | If child of PARAM |
|
|
| LABEL | The label of the previously defined Chilli variable. This label displays in the Properties dialog when adding the step. You can enter either a hardcoded text or a keyword. | If child of PARAM |
|
|
| TYPE | The type of the parameter. Possible values are:
| If child of PARAM |
|
|
| DEFAULT | The default value if one is proposed for the parameter. If no default is proposed, leave this element empty. | If child of PARAM |
|
|
| ENUMGROUP | The name of the enumeration under which it is stored in the database (for example, FirewallProfiles ). | If TYPE has the value ENUM |
|
|
| ENUMTYPE | The type of the items of the drop-down list. Possible values are:
| If TYPE has the value ENUM |
|
|
| ENUMVALUE | The values of the items of the drop-down list. All values need to be separated by a comma, for example, ZIP, PKG . You can enter either a hardcoded text or a keyword. | If TYPE has the value ENUM |
|
|
| OBJECTTYPE | The type of the object which can be selected ( that is, _DB_OBJECTTYPE_DEVICE_ if devices and device groups can be selected). | If TYPE has the value ObjectType |
|
|
| OBJECTTYPE-MEMBER | Defines if the Select Objects dialog displays the individual objects of the specified object type (for example, devices or operational rules). Possible values are:
| If TYPE has the value ObjectType |
|
|
| OBJECTTYPE-GROUP | Defines if the Select Objects dialog also displays the groups or folders of the selected object type ( for example, device groups or operational rule folders). Possible values are:
| If TYPE has the value ObjectType |
|
|
| OBJECTTYPE-NBOFITEMS | Defines the number of objects that can be added to the list. If set to 0, an unlimited number of objects can be added. | If TYPE has the value ObjectType |
|
|
| OPTIONAL | Defines that the parameter is optional. In this case a check box is added before the actual parameter field which must be checked to activate the actual parameter | No |
|
|
| DEFAULT-PRESENCE | Defines if the OPTIONAL box before the parameter field is checked by default, that is, if the parameter is activated by default. | If OPTIONAL is present |
The following paragraphs provide you with a number of examples for the previously explained tags. The examples are shown in two versions, once with keywords to be localized and once with hardcoded text if no localization is required. For information about how to localize your steps see the Localizing BCM to an Unsupported Language topic.
Example 1
The following is an excerpt of a script collecting values from an .ini file and placing these in the Custom Inventory, this parameter defines the path to the configuration file from which the value is to be recovered, using keywords:
<NAME>IniFilePath</NAME>
<LABEL>_DB_STEPPARAM_INIFILEPATH_</LABEL>
<TYPE>String</TYPE>
<DEFAULT></DEFAULT>
</PARAM>
whereby IniFilePath is internal Chilli variable name for the DB_STEPPARAM_INIFILEPATH step label, the variable is of type string and does not have any preentered default value.
Following you can see the same example using hard coded text instead of keywords:
<NAME>IniFilePath</NAME>
<LABEL>File Path</LABEL>
<TYPE>String</TYPE>
<DEFAULT></DEFAULT>
</PARAM>
Example 2
The following parameter tag defines a drop-down list box from which a choice must be made:
<NAME>Protocol</NAME>
<LABEL>_DB_STEPPARAM_PROTOCOL_</LABEL>
<TYPE>Enum</TYPE>
<ENUMGROUP>FirewallProtocol</ENUMGROUP>
<ENUMTYPE>String</ENUMTYPE>
<ENUMVALUE>TCP, UDP</ENUMVALUE>
<DEFAULT>TCP</DEFAULT>
</PARAM>
whereby Protocol is internal Chilli variable name for the DB_STEPPARAM_PROTOCOL step label, the ENUMGROUP defines that the parameter is to be found in the database in the FirewallProtocol column, the enumeration is of type String , its values are TCP and UDP and the prepopulated default value is the TCP protocol. Following you can see the same example using hard coded text instead of keywords:
<NAME>Protocol</NAME>
<LABEL>Protocol</LABEL>
<TYPE>Enum</TYPE>
<ENUMGROUP>FirewallProtocol</ENUMGROUP>
<ENUMTYPE>String</ENUMTYPE>
<ENUMVALUE>TCP, UDP</ENUMVALUE>
<DEFAULT>TCP</DEFAULT>
</PARAM>
Example 3
The following set of tags defines a list box in which a number of devices and device groups can be selected:
<NAME>Objects</NAME>
<LABEL>_DB_STEPPARAM_OBJECTOFTYPEDEVICEORDEVICEGROUP_</LABEL>
<TYPE>ObjectType</TYPE>
<OBJECTTYPE>_DB_OBJECTTYPE_DEVICE_</OBJECTTYPE>
<OBJECTTYPEMEMBER>1</OBJECTTYPEMEMBER>
<OBJECTTYPEGROUP>1</OBJECTTYPEGROUP>
<OBJECTTYPENBOFITEMS>0</OBJECTTYPENBOFITEMS>
<DEFAULT/>
</PARAM>
whereby Objects is internal Chilli variable name for the DB_OBJECTTYPE_DEVICE step label, the list has no default object entered, individual objects, that is, devices , as well as group objects, that is, device groups , can be selected and the list is unlimited.
Following you can see the same example using hard coded text instead of keywords:
<NAME>Objects</NAME>
<LABEL>Devices and/or Device Groups</LABEL>
<TYPE>ObjectType</TYPE>
<OBJECTTYPE>_DB_OBJECTTYPE_DEVICE_</OBJECTTYPE>
<OBJECTTYPEMEMBER>1</OBJECTTYPEMEMBER>
<OBJECTTYPEGROUP>1</OBJECTTYPEGROUP>
<OBJECTTYPENBOFITEMS>0</OBJECTTYPENBOFITEMS>
<DEFAULT/>
</PARAM>
Example of a complete XML File
The following example shows the code of an XML file as well as what the step looks like in the Console .
This is the code of the checkfiledate.xmlfile of the predefined step Check File Date :
<STEPTYPE>
<CLASS>_DB_STEPCLASS_MONITORING_</CLASS>
<NAME>_DB_STEPNAME_CHECKFILEDATE_</NAME>
<SCRIPT>checkfiledate.chl</SCRIPT>
<NOTE>_DB_STEPNOTE_CHECKFILEDATE_</NOTE>
<PARAMS>
<PARAM>
<NAME>FileName</NAME>
<LABEL>_DB_STEPPARAM_FILENAME_</LABEL>
<TYPE>String</TYPE>
<DEFAULT></DEFAULT>
</PARAM>
<PARAM>
<NAME>CheckType</NAME>
<LABEL>_DB_STEPPARAM_CHECKTYPE_</LABEL>
<TYPE>Enum</TYPE>
<ENUMGROUP>CheckType</ENUMGROUP>
<ENUMTYPE>String</ENUMTYPE>
<ENUMVALUE>ModificationDate, CreationDate</ENUMVALUE>
<DEFAULT>CreationDate</DEFAULT>
</PARAM>
<PARAM>
<NAME>CheckDateRange</NAME>
<LABEL>_DB_STEPPARAM_CHECKDATERANGE_</LABEL>
<TYPE>Enum</TYPE>
<ENUMGROUP>CheckDateRange</ENUMGROUP>
<ENUMTYPE>String</ENUMTYPE>
<ENUMVALUE>_DB_STEPPARAM_DATELESSTHAN_,_DB_STEPPARAM_DATEGREATERTHAN_,
_DB_STEPPARAM_DATEEQUALORGREATERTHAN_,_DB_STEPPARAM_DATEEQUALORLESSTHAN_,_
DB_STEPPARAM_DATEEQUAL_,_DB_STEPPARAM_DATENOTEQUAL_</ENUMVALUE>
<DEFAULT>_DB_STEPPARAM_DATEEQUAL_</DEFAULT>
</PARAM>
<PARAM>
<NAME>Year</NAME>
<LABEL>_DB_STEPPARAM_YEAR_</LABEL>
<TYPE>Integer</TYPE>
<DEFAULT></DEFAULT>
</PARAM>
<PARAM>
<NAME>Month</NAME>
<LABEL>_DB_STEPPARAM_MONTH_</LABEL>
<TYPE>Integer</TYPE>
<DEFAULT></DEFAULT>
</PARAM>
<PARAM>
<NAME>Day</NAME>
<LABEL>_DB_STEPPARAM_DAY_</LABEL>
<TYPE>Integer</TYPE>
<DEFAULT></DEFAULT>
</PARAM>
<PARAM>
<NAME>Hour</NAME>
<LABEL>_DB_STEPPARAM_HOUR_</LABEL>
<TYPE>Integer</TYPE>
<OPTIONAL>true</OPTIONAL>
<DEFAULTPRESENCE>false</DEFAULTPRESENCE>
<DEFAULT></DEFAULT>
</PARAM>
<PARAM>
<NAME>Minute</NAME>
<LABEL>_DB_STEPPARAM_MINUTE_</LABEL>
<TYPE>Integer</TYPE>
<OPTIONAL>true</OPTIONAL>
<DEFAULTPRESENCE>false</DEFAULTPRESENCE>
<DEFAULT></DEFAULT>
</PARAM>
<PARAM>
<NAME>Second</NAME>
<LABEL>_DB_STEPPARAM_SECOND_</LABEL>
<TYPE>Integer</TYPE>
<OPTIONAL>true</OPTIONAL>
<DEFAULTPRESENCE>false</DEFAULTPRESENCE>
<DEFAULT></DEFAULT>
</PARAM>
</PARAMS>
</STEPTYPE>
This is what the step looks like in the Console :
Notice that all keywords in the code were replaced by their english translations. Verification Condition , Stop Condition and Notes . Parameters with different values for the TYPE elements are displayed in the following way:
- String: a free text box
- Boolean: a check box
- Integer: a text box in which only numbers can be entered
- Enum: a drop-down list with several options defined via the ENUMVALUE tag.
- Optional: a check box before the actual data box, the DEFAULTPRESENCE parameter defines if it is checked by default.