HCL Workload Automation, Version 9.4

Example of an event rule based on CCMS alerts

The following example shows an event rule defined to monitor the yellow alerts raised on the MTE named GS0\ALE/EDI GS0(000) Log.sys TVALE\Inbound IDoc ORDER_IDOC\Inbound: IDoc generated. The MTE is configured to generate a yellow alert when the number of IDocs representing orders ready to process exceeds a specified threshold. If this condition occurs, the following actions are triggered:
  • An HCL Workload Automation job is submitted to process the order IDocs.
  • An HCL Workload Automation job, with priority 10, is submitted to confirm the alert.
<?xml version="1.0" encoding="UTF-8"?>
<eventRuleSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://www.abc.com/xmlns/prod/tws/1.0/event-management/rules"
  xsi:schemaLocation="http://www.abc.com/xmlns/prod/tws/1.0/event-management/rules
      http://www.abc.com/xmlns/prod/tws/1.0/event-management/rules/EventRules.xsd">
     <eventRule name="SCENARIO1_XAL" ruleType="filter" isDraft="yes">
     <eventCondition name="MTEEventRaised1" eventProvider="SapMonitor"
                     eventType="CCMSEventGenerated">
         <filteringPredicate>
              <attributeFilter name="Workstation" operator="eq"
                    <value>SAP_XA</value>
              </attributeFilter>
              <attributeFilter name="InputSAPSystemID" operator="eq"
                    <value>GS0</value>
              </attributeFilter>
              <attributeFilter name="InputMonitoringContextName" operator="eq"
                    <value>ALE/EDI GS0(000) Log.sys TVALE</value>
              </attributeFilter>
              <attributeFilter name="InputMonObjectName" operator="eq"
                    <value>Inbound IDoc ORDER_IDOC</value>
              </attributeFilter>
              <attributeFilter name="InputMonFieldName" operator="eq"
                    <value>Inbound: IDoc generated</value>
              </attributeFilter>
         </filteringPredicate>
     </eventCondition>
     <action actionProvider="TWSAction" actionType="sbj" responseType="onDetection">
              <parameter name="JobUseUniqueAlias">
                    <value>false</value>
              </parameter>
              <parameter name="JobDefinitionWorkstationName">
                    <value>SAP_XA</value>
              </parameter>
              <parameter name="JobAlias">
                    <value>IDOC_%{MTEEventRaised1.AlertUID}</value>
              </parameter>
              <parameter name="JobDefinitionName">
                    <value>PROCESS_ORDER</value>
              </parameter>
     </action>
     <action actionProvider="TWSAction" actionType="sbd" responseType="onDetection">
              <parameter name="JobUseUniqueAlias">
                    <value>false</value>
              </parameter>
              <parameter name="JobWorkstationName">
                    <value>TWS_HOST_FTA</value>
              </parameter>
              <parameter name="JobTask">
                    <value>C:\TWS_home\methods\r3batch -t PI 
                           -c %{MTEEventRaised1.Workstation} -- "
                           -t CA -ALSYSID %{MTEEventRaised1.AlertSAPSystemID}
                           -MSEGNAME %{MTEEventRaised1.AlertMTESegment}
                           -ALUNIQNUM %{MTEEventRaised1.AlertUID}
                           -ALINDEX %{MTEEventRaised1.AlertIndex}
                           -ALERTDATE %{MTEEventRaised1.AlertDate}
                           -ALERTTIME %{MTEEventRaised1.AlertTime} "
                    </value>
               </parameter>
              <parameter name="JobPriority">
                    <value>10</value>
              </parameter>
              <parameter name="JobType">
                    <value>Command</value>
              </parameter>
              <parameter name="JobAlias">
                    <value>CONFIRM_%{MTEEventRaised1.AlertUID}</value>
              </parameter>
              <parameter name="JobStreamName">
                    <value>CONFIRM_STREAM</value>
              </parameter>
              <parameter name="JobLogin">
                    <value>twsuser</value>
              </parameter>
     </action>
     </eventRule>
</eventRuleSet>