Business Rule not running on update

Josh62
Mega Contributor

I have a business rule within my application scope that is not triggering on update for some tables. Here is my business rule:

find_real_file.png

find_real_file.png

I have verified that the business rule does run on the 'cmdb_ci_server' table by viewing the system logs:

find_real_file.png

I also verified that the rule is triggering in the debugger:

find_real_file.png

 

I tried running this on a custom table in my instance, and nothing appears in the logs or debugger as well (note: there are no other business rules defined for this table):

find_real_file.png

find_real_file.png

Any thoughts on this? I'm not sure what else to do to fix this.

1 ACCEPTED SOLUTION

Josh62
Mega Contributor

Posting support article here for anyone experiencing the same problem:

https://support.servicenow.com/kb?id=kb_article_view&sys_kb_id=7550584fdb174090feb1a851ca9619f7

View solution in original post

9 REPLIES 9

siva_
Giga Guru

What are the conditions you have kept to trigger the business rule on your scheduled job table. 

Are there any records which got inserted into the scheduled job table and even then your BR didnot work? 

As the debugger didnot work at all , i suspect, that there is no operation happening on the table with in the existing scripts or whereever you are doing an operation to insert/update a record. Can you show us where this is being done?

should be an issue with the trigger conditions not being met. 

Josh62
Mega Contributor

The conditions are kept the same as the business rule on the cmdb_ci_server table:

find_real_file.png

Correct, there were records inserted into the Scheduled Job table where the BR did not run.

Typically, the insert/update operation is done via a form. I have also tested updating a record on the table through the list view of the table like so:

find_real_file.png

Both actions did not result in a run of the BR.

sekhar kurumoju
Mega Guru

hai @Josh

 

Every business rule is assigned to either a private application scope or to the global scope.

The types of business rules you can create and how you can access those rules varies depending on the scope of the business rule and the scope of the table it runs on.

Business rules on specific tables

Most business rules run on a specific table, which is defined in the Table field. You can create business rules on tables in the same scope and on tables that allow configuration records from another application scope.

For tables that are in a different scope than the business rule record, the types of rules are limited.

  • You can create a rule where When is async with any of the following options:
    • InsertUpdate, and Delete database operations. You cannot select Query.
    • Set field values actions and scripts (the Script field).
  • You can create a rule where When is before with any of the following options:
    • InsertUpdate, and Delete database operations. You cannot select Query.
    • Set field values actions only. You cannot write scripts and you cannot abort the database transaction.
  • You cannot create any other types of business rules on tables in a different scope.

BR 

Sekhar kurumoju.

Please mark reply as Helpful/Correct, if applicable. Thanks!

Hi Sekhar,

For my business rule, I verified it is created in the same application scope as the custom table assigned to it (both are in the application scope of "AHC"). But no evidence of the rule running in my instance.

When I assigned the BR to the "cmdb_ci_server", I was able to see the business rule run in the debugger. This business rule is set to run where When is after and the table is in the global scope.

Can you advise on this activity?

Thanks,

Josh