Run business rule in Transform Map is false but business rules run

Svetozar2022
Tera Expert

Good day everybody,

We have an integration for Change Request table that inserts manually the Import set row from Scripted REST API and the mode is synchronous. 

On both update and insert Transform maps that we use for the Change request table the 'Run business rule' field is checked false!

Whenever we try to update the state of a change request via this API, it responds with an error in this format:

{
    "error": {
        "message": "Error in processing request!",
        "detail": "Operation against file 'change_request' was aborted by Business Rule '<BR that inserts import set row>^<SYS ID of import set row>'. Business Rule Stack:<BR that inserts import set row>,Transform synchronously,State model - Can change state?"
    },
    "status": "failure"
}

 

I have checked the custom BR and that one only starts the processing by creating the import set row.

The other one, 'Transform synchronously' BR uses

GlideImportSetTransformer to synchronously transform the import set row.

Changing from New to Assess does NOT trigger this error, but it runs business rules (Approval request created).
Changing from New to Authorize and later triggers this error, so it runs business rules.

Why are business rules getting triggered on change_request table?
Does GlideImportSetTransformer respect 'Run business rules' flag on Transform Map record?
Is there anything I have overlooked? We need absolutely no business rules running on the Change Request table.
 
1 ACCEPTED SOLUTION

Svetozar2022
Tera Expert

Nevermind, I have found the issue. Somewhere in the code we used target.update() which reran the business rules.

View solution in original post

1 REPLY 1

Svetozar2022
Tera Expert

Nevermind, I have found the issue. Somewhere in the code we used target.update() which reran the business rules.