Business rule does not seem to fire on "insert"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 10:12 PM
I've a BR set up on the incident table with the following conditions:
When to run: after
Order: 200
Insert: true
Update: true
Filter condition: (the highlighted part is what I'm expecting to become true)
But when incident is created and "Is Child" becomes true, the BR is still not firing.
I know the BR is not firing because:
(a) I put a gs.log statement on the 1st line of the BR under "Advanced" and it's not showing up in the log table
(b) I enabled the session debugger and it did report that the BR did not fire because the condition did not match. Now my question is is there a way to know from the debugger why the condition did not match?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 10:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 11:30 PM
Yes, it works on update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 10:49 PM
Hi Nisar,
In my opinion, the 'changes to' condition is not working here. You can test it in this way:
- remove the changes to condition and just put 'is' there just for testing and you will see your Brule triggers.
2nd thing you can check is:
- Since your condition depends on the 'Is Child' field, you need to print and check whether this 'Is Child' field is actually turning to true or not before the Brule runs. From the name of the field, I can understand this is a custom field and you are setting this through some other script. So essentially what I mean is, rather than checking that the Brule is not triggering, you need to check if the 'Is Child' field is getting set to true before this Brule triggers.
Overall, we can say that a Brule does not trigger only and only because of conditions not being met.
Hope you find what you want,
Many Thanks,
Arnab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2024 11:34 PM