Using the rulesinfo Utility to Validate the Event Probe Rules and Event Rules Files

The TIBCO_HOME\bpm\version\bin\rulesinfo utility can be used to show, validate or test proposed modifications to the event processing rules that are defined in the event probe rules file (ec-probe-rules.xml) and event rules file (ec-event-rules.xml).

Important: The rulesinfo utility is provided to help you validate the ec-probe-rules.xml and ec-event-rules.xml rules files. However, it is NOT intended as a substitute for your own testing of these files and should not be used as such. The utility uses simulated events, which in some cases may trigger different paths through the rules to real events. The rulesinfo utility can therefore be used to find issues, but cannot be relied upon to find EVERY issue.

Use the following command:

rulesinfo mode [-configdir configFolder] 
               [-debug] 
               [-eventrules eventRulesFile] 
               [-proberules probeRulesFile] 
               [-event event]

where:

  • mode: Specifies the rulesinfo operation that you want to run. One of:
    • print: Displays the rules that are currently in operation for each rules file.
    • validate: Loads the rules files, performs a series of validation checks and displays the results.
    • test: Reserved for internal TIBCO use only. Do not use this operation unless instructed to do so by TIBCO Support.
  • -configdir configFolder: Specify this option if you want to run the specified rulesinfo operation using either or both of the rules files in the ActiveMatrix BPM configuration directory (ec-probe-rules.xml and ec-event-rules.xml).

    configFolder must be the full pathname of the ActiveMatrix BPM configuration directory - for example, CONFIG_HOME\bpm\bpm_app_name\configuration.

    Note: If -configdir is not used, you must specify both of the -eventrules and -proberules options.
  • -debug: Reserved for internal TIBCO use only. Do not use this option unless instructed to do so by TIBCO Support.
  • -eventrules eventRulesFile: Specify this option if you want to run the specified rulesinfo operation using a different event rules file.

    eventRulesFile must be the full pathname of the file that you want to use. If you have also specified the -configdir option, the -eventrules option takes precedence, so the eventRulesFile is used instead of the configFolder\ec-event-rules.xml file.

  • -proberules probeRulesFile: Specify this option if you want to run the specified rulesinfo operation using a different event probe rules file.

    probeRulesFile must be the full pathname of the file that you want to use. If you have also specified the -configdir option, the -proberules option takes precedence, so the probeRulesFile is used instead of the configFolder\ec-probe-rules.xml file.

  • -event event: Reserved for internal TIBCO use only. Do not use this option unless instructed to do so by TIBCO Support.

rulesinfo Examples

Whichever mode is chosen, rulesinfo first displays a NOTICE outlining the type of problems it will and will not find, and the files that it is going to check. For example:

  ------------------------------------------------------------------------------
  NOTICE: RulesInfo is a tool for validating EventCollector Rules.
          It is intended to be used in conjunction with testing, NOT as a
          substitute.
          The following types of validation are currently done by RulesInfo:
                - Check for missing messageIds for each end-feature
          The following things will NOT be identified by RulesInfo:
                - Additional messages added to channels which may not be
                  required/desirable
                - Expressions used in channels (except for the StatsAreaTrigger
                  default expression
                - Expressions used in channels (except for the StatsAreaTrigger
                  default expression
                - Modification of messageProcesses such that events are not 
                  suitable for the destination
  ------------------------------------------------------------------------------
  [EC_PROBE_RULES]: /home/auser/Desktop/ec-probe-rules.xml
  [EC_EVENT_RULES]: /home/auser/Desktop/ec-event-rules.xml
  ------------------------------------------------------------------------------

The output for the appropriate operation is then displayed.

Note: In the following examples, the output has been truncated for brevity.

rulesinfo print - Example

To print the rules currently used by the ec-probe-rules.xml and ec-event-rules.xml files in the CONFIG_HOME directory:
c:\>rulesinfo print -configdir C:\ProgramData\bpm1\tibco\data\bpm\amx.bpm.app\configuration
  ----------------------------------------------------------------------------------------------------
  NOTICE: RulesInfo is a tool for validating EventCollector Rules.
  .
  .
  -------------------------------------------------------------------------------------------------
  [EC_PROBE_RULES]: C:\ProgramData\bpm1\tibco\data\bpm\amx.bpm.app\configuration\ec-probe-rules.xml
  [EC_EVENT_RULES]: C:\ProgramData\bpm1\tibco\data\bpm\amx.bpm.app\configuration\ec-event-rules.xml
  -------------------------------------------------------------------------------------------------
  Rules currently in operation for  : PROBE_RULES : C:\ProgramData\bpm1\tibco\data\bpm\amx.bpm.app\configuration\ec-probe-rules.xml:
  Attribute Sets Defined:
     Attribute Set Definition: genericAttributes
        Attributes: attribute1, attribute2, ...
  MessageProcesses:
     Process: LocalLoggingProcessNoManagedObjectDetails Parent: LocalLoggingProcess
        Excluded Attributes:
           Attributes: managedObjectDetails
     Process: CentralECErrWarnProcess
     Process: CentralECAuditProcessNoManagedObjectDetails Parent: CentralECAuditProcessExclusions
        Excluded Attributes:
           Attributes: managedObjectDetails
     Process: CentralECAuditProcess
        Included Attributes:
           AllPrimaries: true
     .
     .
  RuleSets:
     RuleSet: Name: default_localfile Target: LOCALFILE
        Rule: Name: skipped_messages_log Order: 200 Process: null
           Filter:
              MessageIds: WPCORE_PROCESSWORKITEM_PUSH_WORK_FAILED
        Rule: Name: BDSMessages_localfile Order: 800 Process: LocalLoggingProcessNoManagedObjectDetails
           Filter:
              Component: BDS
        Rule: Name: BaseRule_locafile Order: 1000 Process: LocalLoggingProcess
           Filter:
     RuleSet: Name: default_centralec Target: CENTRALEC
        Rule: Name: not_needed_severities Order: 100 Process: null
           Filter:
              Severities: TRACE,INFO,DEBUG
        Rule: Name: skipped_messages_audit Order: 200 Process: null
           Filter:
              MessageIds: WPCORE_PROCESSWORKITEM_PUSH_WORK_FAILED
        Rule: Name: BDSMessages_centralec Order: 600 Process: CentralECAuditProcessNoManagedObjectDetails
           Filter:
              MessageIds: BDS_GLOBAL_DATA_CREATE_CASE, BDS_GLOBAL_DATA_UPDATE_CASE, 
              BDS_GLOBAL_DATA_DELETE_CASE_BY_REF, BDS_GLOBAL_DATA_DELETE_CASE_BY_CID, 
              BDS_GLOBAL_DATA_ENT_INTERNAL_LINK_CASE, 
              .
              .
              BDS_GLOBAL_DATA_NOTIFICATION_QUEUE_RETRY, BDS_GLOBAL_DATA_UNDEPLOY_DELETED_SUBSCRIPTION
              Component: BDS    
  Rules currently in operation for  : EVENT_RULES : C:\ProgramData\bpm1\tibco\data\bpm\amx.bpm.app\configuration\ec-event-rules.xml:
  .
  .

rulesinfo validate - Example 1

To validate the ec-probe-rules.xml file in the CONFIG_HOME directory and a test version of the ec-event-rules.xml file:

c:\>rulesinfo validate -configdir C:\ProgramData\bpm1\tibco\data\bpm\amx.bpm.app\configuration -eventrules C:\rulestest\ec-event-rules.xml

rulesinfo validate - Example 2

To validate test versions of the ec-probe-rules.xml and ec-event-rules-v03.xml files:

c:\>rulesinfo validate -eventrules C:\rulestest\ec-event-rules-v03.xml -proberules C:\rulestest\ec-probe-rules.xml
  ------------------------------------------------------------------------------
  NOTICE: RulesInfo is a tool for validating EventCollector Rules.
  .
  .
  ------------------------------------------------------------------------------
  [EC_PROBE_RULES]: C:\rulestest\ec-probe-rules.xml
  [EC_EVENT_RULES]: C:\rulestest\ec-event-rules-v03.xml
  ------------------------------------------------------------------------------
  WARNING: ec-event-rules uses an expression in an unexpected place.  This is valid but will compromise the accuracy of validation by RulesInfo.  Extra care
  should be taken
  Validating: Purge and Archive events
  Validation Area Complete. 0 problems detected.
  
  Validating: Statistics Collector events
  ---EC_PROBE_RULES channel CENTRALEC is missing BX_PROCESS_SUSPENDED_ON_ERROR
  ---EC_EVENT_RULES channel StagingAreaTrigger accepts BX_INSTANCE_TASKS_COMPLETED
  Validation Area Complete. 2 problems detected.
   
  Validating: Audit Trail events
  ---EC_PROBE_RULES channel CENTRALEC is missing BDS_DOCUMENT_EX_LINK_DOCUMENT
  Validation Area Complete. 1 problems detected.
  
  Validating: Graphical Audit events
  Validation Area Complete. 0 problems detected.
  ------------------------------------------------------------------------------
  Validation Complete. 1 overall warning(s), and 3 specific warning(s) detected.