What a rule consists of
An automation rule has three parts: a trigger, optional conditions, and an action or several actions. The trigger determines what starts the rule. The conditions narrow down when the rule should act. The action describes what the system should do.
The rules engine has 9 trigger types: a change of permit status, an alarm, inactivity, SOS, an external event, a schedule, a change of equipment location, the presence of an employee and a change of report status. For your first rule, choose the simplest one: a change of permit status.
Which actions are available?
The actions are e-mail, push, a team notification, a webhook, and opening a permit from a template. To begin with, choose the team notification: it is visible to recipients and needs no configuration outside the panel.
Step 1: choose the trigger
The rule wizard in the panel works with icon tiles in two steps. In the first step you choose the trigger from the tiles. For our example, select the tile for a change of permit status.
Before you move on, write down a sentence describing the rule in your own words, for example: when a permit changes its status to approved, notify the team of work supervisors. Such a sentence later serves as the description of the rule and helps others understand its purpose.
Elements of the rules engine
Step 2: set the filters
In the second step the wizard shows the filters. Several filters are combined with an AND condition, so the rule acts only when all of them are met. Fields that point to system objects have selectors instead of identifier numbers, so you choose the zone, status or team from a list.
Start with one filter. A rule with one filter is easier to test, and you will add further conditions once you see that there are too many notifications. Too many filters at the start often means a rule that never works, and nobody knows why.
Conditions checked at the moment of matching
Some attributes, for example whether a person is online right now, come from the current state in the system rather than from the event. A rule can therefore take into account the person's current availability, but the same rule run later may give a different result.
Step 3: choose the action and save
Choose the team notification action, select the team from the list and save the rule. The rule applies from the next event. Matching places the message in asynchronous processing, and the rule subscriber never raises an exception, so a failure of the rule does not block the approval of a permit.
This safeguard has a consequence for testing: the absence of a notification does not mean an error in the permit, only an error in the rule or its filters. You diagnose the problem on the rule's side, not the permit's.
How to test the rule before a full launch
The safest approach is to test the rule on a test permit, or on a permit in a zone where the team is prepared for extra notifications. Change the permit's status and check that the notification reached the right team.
The test should also cover a negative case: change the status of a permit in a zone outside the filter and confirm that no notification arrives. A rule that notifies about everything does not fulfil its role.
- Positive case: the permit meets the filters and the notification arrives.
- Negative case: a permit outside the filter does not trigger a notification.
- The content of the notification is understandable to the recipient without extra context.
- The recipient knows about the rule and understands that the notification is automatic.
Good habits for the next rules
Give rules names that describe the trigger and the result, for example: approved permit, notify supervisors. After a few months the list of rules will be readable to someone who did not create them.
Review the list every quarter. A rule that has not fired for months may be redundant or broken, and a rule that fires every day may need an extra filter.
Video
Frequently asked questions
Do I need programming knowledge to build a rule?
No. The wizard works with icon tiles, and system objects are chosen from selectors, without identifier numbers.
How do I combine several filters?
Several filters are combined with AND: the rule acts when all of them are met. Start with one and add more as needed.
What if the rule does not work?
The permit will still be approved, because an automation failure does not block it. Check the rule's filters and trigger a test event.
Build your first rule with us
In a demo we will go through the wizard together and build a rule for your permit process. Book a meeting with InnerWeb.
Let's talk