HCL Workload Automation, Version 9.4

evtdef

Imports/exports a generic event provider XML definition file where you can add and modify custom event types. You can then use the sendevent command to send these events to the event processing server. See also Defining custom events.

Syntax

evtdef -U | -V

evtdef [connection parameters] dumpdef file-path

evtdef [connection parameters] loaddef file-path

Arguments

-U
Displays command usage information and exits.
-V
Displays the command version and exits.
connection parameters
If you are using evtdef from the master domain manager, the connection parameters were configured at installation and do not need to be supplied, unless you do not want to use the default values.
If you are using evtdef from the command line client on another workstation, the connection parameters might be supplied by one or more of these methods:
  • Stored in the localopts file
  • Stored in the useropts file
  • Supplied to the command in a parameter file
  • Supplied to the command as part of the command string

For an overview of these options, see Setting up options for using the user interfaces.

For full details of the configuration parameters see the topic on configuring the command-line client access in the HCL Workload Automation: Administration Guide.

dumpdef file-path
Downloads the generic event provider XML file. The file is downloaded with the file name and path you provide in file-path. You can edit the file to add your own custom event types.
The name of the generic event provider supplied with the product is GenericEventPlugIn. You can change this name by acting on the name tag of the eventPlugin keyword.
Important: You must use this name as the value of:
  • The source keyword of the sendevent command
  • The eventProvider keyword in the definition of the event rules triggered by these custom events.
loaddef file-path
Uploads the modified generic event provider XML file from the file and path you provide in file-path.

Comments

The following rule language schemas are used to validate your custom event definitions and, depending upon the XML editor you have, to provide syntactic help:
  • eventDefinitions.xsd
  • common.xsd
The files are located in the schemas subdirectory of the HCL Workload Automation installation directory.
When you download the generic event provider template file, it looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<eventDefinitions
xmlns="http://www.ibm.com/xmlns/prod/tws/1.0/event-management/plugins/events"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/tws/1.0/event-management/
plugins/events/eventDefinitions.xsd">
<eventPlugin>
<complexName displayName="Custom event" name="GenericEventPlugIn"/>
<scopes>
<scope name="Generic">
<scopedef text="{Param1} on {Workstation}"/>
</scope>
</scopes>
<!-- Generic Event -->
<event baseAliasName="genericEvt" scope="Generic">
<complexName displayName="Generic event" name="Event1"/>
<displayDescription>The event is sent when the specified expression is
matched.</displayDescription>
<property type="string" required="true" wildcardAllowed="true"
multipleFilters="true" minlength="1">
<complexName displayName="Parameter 1" name="Param1"/>
<displayDescription>The value of parameter 1</displayDescription>
</property>
<property type="string" required="true" wildcardAllowed="false"
multipleFilters="false" minlength="1>
<complexName displayName="Workstation" name="Workstation"/>
<displayDescription>The workstation for which the event is
generated.</displayDescription>
</property>
</property>
</event>
</eventPlugin>
</eventDefinitions>
You then edit this file to add the property types that you need to define a specific event. You can add the following property types:
Table 1. Additional properties that can be used for defininig custom events.
Property type Add into XML event file as shown
boolean
<property type="boolean" required="false" wildcardAllowed="false"
multipleFilters="true" minlength="1">
<complexName displayName="Boolean field" name="Boolean"/>
<displayDescription>Add a boolean field</displayDescription>
</property>
date
<property type="date" required="false" wildcardAllowed="false"
multipleFilters="true" minlength="1">
<complexName displayName="Date field" name="Date"/>
<displayDescription>Add a date field</displayDescription>
</property>
datetime
<property type="datetime" required="false" wildcardAllowed="false"
multipleFilters="true" minlength="1">
<complexName displayName="Date Time field" name="Datetime"/>
<displayDescription>Add a date time field</displayDescription>
</property>
datetimeutc
<property type="datetimeutc" required="false" wildcardAllowed="false"
multipleFilters="true" minlength="1">
<complexName displayName="Date Time UTC field" name="Datetimeutc"/>
<displayDescription>Add a date time UTC field</displayDescription>
</property>
duration
<property type="duration" required="false" wildcardAllowed="false"
multipleFilters="true" minlength="1">
<complexName displayName="Duration field" name="Duration"/>
<displayDescription>Add a duration field</displayDescription>
</property>
fileSize
<property type="fileSize" required="false" wildcardAllowed="false"
multipleFilters="true" minlength="1">
<complexName displayName="File size field" name="filesize"/>
<displayDescription>Add a file size field</displayDescription>
</property>
nonnegativeinteger
<property type="nonnegativeinteger" required="false" wildcardAllowed="false"
multipleFilters="true" minlength="1">
<complexName displayName="Non negativeinteger field" name="nonnegativeinteger"/>
<displayDescription>Add a non negativeinteger field</displayDescription>
</property>
numeric
<property type="numeric" required="false" wildcardAllowed="false"
multipleFilters="true" minlength="1">
<property type="numeric" required="false" wildcardAllowed="false"
multipleFilters="true" minlength="1">
<displayDescription>Add a numeric field</displayDescription>
</property>
percentage
<property type="percentage" required="false" wildcardAllowed="false"
multipleFilters="true" minlength="1">
<complexName displayName="Percentage field" name="percentage"/>
<displayDescription>Add a percentage field</displayDescription>
</property>
string
<property type="string" required="true" wildcardAllowed="true"
multipleFilters="true" minlength="1">
<complexName displayName="String with wildcards" name="StringWithWildcards"/>
<displayDescription>Add a string with wildcards</displayDescription>
</property>
or
<property type="string" required="true" wildcardAllowed="false"
multipleFilters="true" minlength="1">
<complexName displayName="String without wildcards" name="StringWithoutWildcards"/>
<displayDescription>Add a string without wildcards</displayDescription>
</property>

You can change the values of all the property attributes, with the exception of type, to fit your requirements.

The properties so defined are converted into input fields after the event definition is uploaded and opened in the Dynamic Workload Console.

You can also define more than one event by repeating <eventPlugin>...</eventPlugin> sections. For example:
<?xml version="1.0" encoding="UTF-8"?>
<eventDefinitions
xmlns="http://www.ibm.com/xmlns/prod/tws/1.0/event-management/plugins/events"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/tws/1.0/event-management/
plugins/events/eventDefinitions.xsd">
<eventPlugin>
<complexName displayName="Custom event" name="GenericEventPlugIn"/>
<scopes>
<scope name="Art042StockQuantity">
<scopedef text="{Art042pieces}"/>
</scope>
</scopes>
<!-- Generic Event -->
<event baseAliasName="genericEvt" scope="Generic">
<complexName displayName="Stock of article 042 reaches minimum level" 
name="art042qty"/>
<displayDescription>The event is sent when the number of art.42 
items on stock reaches
minimum level.</displayDescription>
<property type="numeric" required="true" wildcardAllowed="false"
multipleFilters="true" minlength="1">
<complexName displayName="Art042 items on stock" name="art042items"/>
<displayDescription>The number of art042 items left</displayDescription>
</property>
</event>
<!-- Generic Event 2-->
<event baseAliasName="Hard drive saturation" scope="Generic">
<complexName displayName="Hard drive saturation" name="HDSatEvent"/>
<displayDescription>displayDescription>The event is sent when the percentage field
reaches the warning level.</displayDescription>
<property type="percentage" required="true" wildcardAllowed="false"
multipleFilters="true" minlength="1>
<complexName displayName="Percentage Full" name="PercentFull"/>
<displayDescription>The percentage of total disk space used</displayDescription>
</property>
<property type="string" required="true" wildcardAllowed="false"
multipleFilters="false" minlength="1>
<complexName displayName="Workstation" name="Workstation"/>
<displayDescription>The workstation where the hard drive is installed
</displayDescription>
</property>
</event>
</eventPlugin>
</eventDefinitions>

Examples

In this example you:
  1. Download the generic event provider XML file as file c:\custom\myevents.xml
    evtdef dumpdef c:\custom\myevents.xml
  2. Edit the file to add your own event type definitions.
  3. When finished, you upload the generic event provider XML file from file c:\custom\myevents.xml
    evtdef loaddef c:\custom\myevents.xml