How to find Business Rule based on id (TimeBasedRuleJob-RuleId) that is referenced in FootPrints log.

Version 1
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.




    Business Rules Time Based Rule Error


    How can I find which business rule is being referenced in an error within the FootPrints log file?


    Below is a query that can be run against the FootPrints Database which can be used to identify the Container, Item and Business Rule Name based on the rule id. Typically this is needed when a business rule is generating an error in the footprints log and the rule needs to be reviewed.

    One of the most common cases is related to Time-Based business rules attempting to change the status of a ticket. If a ticket has workflow applied and a rule attempts to change the status to one that violates the workflow, based on the tickets current status, an error will be generated in the log and may look similar to the sample error below:

      Sample Error: 
    ERROR|2017-10-27T12:15:00.520|EDT|FP12-ServerName|TimeBasedRuleJob-RuleId_   97459-pool-5-thread-22|*.business.rule.TimeBasedRulesJob$TimeBasedRuleTask$2.doInTransactionWithoutResult()|||Could not process time-based rules for Ticket ID=5152, Definition Version ID=45479. Changes to ticket were not committed. Continuing processing other records.| 
      SQL Query to run against the FootPrints Database:   
    SELECT cntnr_external_name_en_US, item_external_name_en_US, rule_name, rule_defn_ver_id  FROM fpscdb001_system.v_cntnr_item_rule_stats WHERE rule_defn_ver_id= 'xxxxx';
      Sample Query with RuleId (based on sample error above): 
    Using the sample error above, you would replace the    xxxxx in the query with the RuleId:    97459 
    This would result in a query that look this this:   
    SELECT cntnr_external_name_en_US, item_external_name_en_US, rule_name, rule_defn_ver_id FROM fpscdb001_system.v_cntnr_item_rule_stats WHERE rule_defn_ver_id= '97459';
    Once the Container, Item and Rule name are identified, you can review the business rules configuration.  
    If no results are produced this could mean that you have an older version of the view which may not show rules that have never run.  Use the query below to find your rule making sure to replace the xxxxx with your rule id.   
    select top 100000 ca.externalName as cntnr_external_name_en_US,di.item_external_name_en_US , ruleCSV.string_val as rule_name ,rus.hit_ct, rus.impact_ct, rus.last_hit_timestamp ,di.item_external_name_other as item_external_name_other ,va.defn_ver_id as rule_defn_ver_id,di.item_defn_ver_id,ca.cntnr_defn_ver_id from fpscdb001_system.rule_usage_statistic rus right join fpscdb001_system.defn d on d.defn_guid = rus.defn_uuid join fpscdb001_system.defn_ver vA on vA.defn_id = d.defn_id and vA.defn_ver_status_id = 1 join (fpscdb001_system.cfg_setting_val ruleCSV  join fpscdb001_system.cfg_setting ruleCS on ruleCS.cfg_setting_const = 'externalName'   and ruleCS.cfg_setting_id = ruleCSV.cfg_setting_id )  on ruleCSV.owner_id = vA.defn_ver_id join fpscdb001_system.defn_reln dr on dr.to_defn_ver_id = vA.defn_ver_id join fpscdb001_system.v_Item_Defn di on di.item_defn_ver_id = dr.from_defn_ver_id join fpscdb001_system.defn_reln r on  r.to_defn_ver_id = di.item_defn_ver_id and r.defn_reln_type_id = 0 join fpscdb001_system.v_cntnr_defn_active ca on ca.cntnr_defn_ver_id = r.from_defn_ver_id  WHERE va.defn_ver_id= 'xxxxx';


    Article Number:


    Article Type:


      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles