Triggers in CAEP Hub are a lot like the Policy Snippets you’ve probably already used to build policies. Triggers enable you to look for patterns in the SGNL Graph and use the existence (or non-existence) of those patterns in Rules.
If you’ve already built Policy Snippets, the basic concept of Triggers should be very similar. The Trigger Builder itself shares many of the same properties with the Snippet Builder. It’s divided into 3 sections:
One of the more significant differences between Triggers and Policy Snippets is that you do not have any Request context, meaning that there is no need to associate the nodes or conditions with anything in an inbound request. Triggers will be matched any time any set of nodes, relationships, and conditions start matching or no longer match (depending on your Rule configuration).
Triggers are processed when ingestion of new data into the graph completes, so bear in mind that if you need an extremely low-latency trigger, you’ll want to ensure that the synchronization frequency for the underlying data is sufficiently quick to make these updates.
Starting with a simple trigger, we’ll assume you’ve already integrated Entra ID into SGNL as a System of Record, and you want to fire a set of Rules/Actions based on a user becoming Disabled.
accountEnabled
attribute and select the operator as Equal To
and in the value, type false
That’s it. You’re now able to use this trigger inside of a CAEP Hub Rule, to start taking action on Entra ID Users who are disabled.
Going beyond this simple trigger, you might want to include many nodes, relationships, and even conditions into a Trigger. Let’s take the above a step further and assume you’ve also integrated ServiceNow ITSM into SGNL. In this case, you might want to create a Rule that looks for when an Entra ID User has an Approve Change Request in ServiceNow that has been Closed.
Equal To
and specify the value as false
With all triggers, but the particularly the more complex triggers such as the one above, there are a few things to consider:
Under the covers, SGNL adds a set of attributes to return as part of the trigger (similar to a SELECT statement in SQL). We do this from the moment the trigger is created with only the Unique ID of each of the Nodes, but as you start to use attributes of nodes in parameters in Rules, we extend that statement. You can have up to 25 attributes associated with any trigger and can modify that set of attributes from within ‘Available Parameters’ in the Trigger Builder.
Parameters are used only for Action parameterization and have no bearing on the Condition statements that you write in a Trigger, so there’s no need to include Parameters for anything other than the attributes you’re going to use in Actions. For the most part, SGNL will take care of managing these parameters for you.