Business Rule - Issue with applyAutomaticTransition on Change Request.

Lisa Goldman
Kilo Sage

Hello,

I created a Business Rule to check it the change request has an attachment. If it does, should be automatic move to the next state.

 

The following business rule is working fine is PDI instance.  However, when I move to our development if failed.

Is there any configuration that needed to be checked.  Thanks

 

 var hasAttachments = current.hasAttachments(); 
     if (!hasAttachments) {
        current.setAbortAction(true);
     } else {
         changeModel.applyAutomaticTransition(current);
 }
4 REPLIES 4

Sagar Pagar
Tera Patron

Hi @Lisa Goldman,

 

You should check the existing business rules that may be overriding/ causing failures your business rule.

 

Thanks,

Sagar Pagar

The world works with ServiceNow

Thank you for your suggestion @Sagar Pagar 

How to trace all the business rules that triggered this change request?

Hello @Lisa Goldman 

Open the change request table in list view.

Click on the column context menu.

Select "Configure Business Rule".

You will be able to view all business rules running on the change request table.

Thanks,

Abhijeet Pawar.

Hi @Lisa Goldman,

 

You can enable debugging for the business rule, or alternatively, check the business rules for the Change request table.

 

Thanks,

Sagar Pagar

The world works with ServiceNow