Content:
1. How to Identify Different Types of Issues in Business Rules?
2. How to Troubleshoot Business Rules?
3. Troubleshooting Business Rules using Segment Isolation
1. How to Identify Different Types of Issues in Business Rules?
In some cases, modifications made to a board or workflow might cause some business rules to stop working as intended.
Configuration issues
There are a couple of ways to notice a configuration error in a Business Rule:
- Via the board - you might notice the informational button on one of the columns on the board has turned red. Upon clicking it you will open the Board Policies window, where information about the rule will be displayed.
- Via the administration panel - when looking at the list of Business Rules, you may notice a rule that is highlighted in red.
In both of the above cases, the red color indicates that this rule may not work correctly because some of the columns, lanes, cells, workflows, or boards referenced in it might have been deleted.
Execution issues
In addition, Kanbanize will send an email to the author of a rule that failed to execute. In most cases, this would mean that the rule was triggered, but the action could not be executed. A common example of this is a rule trying to move a card that is blocked - the blocker prevents the card from being moved so the rule execution fails and sends an email to the author about this event.
2. How to Troubleshoot Business Rules?
If you want to check whether or not a particular rule has been executed on a card, the first place to check would be the card's History tab.
Tip: you can filter the historical events by keywords (e.g. “rule” - to list all rule executions).
There are 5 types of actions triggered by Business rules: create, update, link, move, copy.
Each action can be performed either on the card that triggers the business rule (trigger card) or on another card (target card).
Depending on the action executed, business rules will leave a history log as follows:
- The trigger card will get a ‘Rule Execution’ log with information about the rule.
- The target card will get a ‘Rule Executed’ log with information about the changes that were made.
In actions where the trigger and target cards are the same card (e.g. update, move, create subtask), the system logs the ‘Rule Execution’ event only.
In addition, history events will be logged every time an action is successful, even if no changes have been performed (e.g. update the color to red on a card that is already red; move a card to location and the card is already in that location; etc.).
These logs can help you distinguish if the problem is within the trigger part of the rule (WHEN/AND parts) or the execution event of the rule (THEN part).
Note: If you want to investigate multiple triggers of the same rule, you can do that from the Business Rule Audit Logs. You can access them by going to the gear icon in the top right corner, selecting “Security and Audit”, scrolling down to the blue “View Logs” button, pressing it, and selecting the Business Rules tab. From this tab, you can filter the rule Id of the rule you want to investigate.
3. Troubleshooting Business Rules using Segment Isolation
In order to isolate the problem, follow the steps below to find in which section of the rule it is coming from and review if the section's configuration is the intended one.
- Check if the WHEN configuration (the trigger of the business rule) is working as intended.
- Start by copying the business rule that produces errors.
- Leave the trigger the same, but change the AND and THEN clauses to something simple. For example, the AND clause can be "title" contains "test" and the THEN clause can be to change the color of the cards to purple.
- Run a test by using the same trigger and seeing if the rule runs correctly. If the problem persists - the problem is within the trigger configuration.
- Check if the AND configuration of the rule gives the correct parameters
- Start by copying the business rule that produces the errors.
- Create a simpler trigger for the rule. For example, WHEN the color of the card is changed to blue.
- Create a simpler THEN action, for example, add a sticker to the card.
- Run a test by using this new simpler rule to test if the AND configuration parameters are the ones intended.
- Check if the THEN configuration of the rule gives the correct outcome
- Start by copying the business rule that produces the errors.
- Create a simpler trigger for the rule. For example, WHEN the color of the card is changed to blue.
- Create a simpler AND parameter, for example, the board is “Test Board”.
- Run a test by using this new simpler rule to test if the THEN actions are the ones that are intended.
Important: For troubleshooting business rule errors related to copying properties between linked cards, check the dedicated article.