The following example illustrates how you can use the Query node with
other nodes in a policy model to access and analyze Policy Event records using the Events Query
in the baseline GE Digital APM Catalog.
Consider the following nodes and connections.
In this example, the Policy Events Query Query node is connected to the Equipment Entity node and to a Collection Filter node, which is then connected to various additional Condition,
Calculation, and Action nodes.
As shown in the following image, you can use the Properties
window for the Query node to specify the query whose results you want
to use in the policy model. You can also see that the specified query
contains a prompt, Asset Key,
and that a system field from the Equipment Entity node, Entity Key, is used to supply values to the prompt.
When you connect the Query node to a successor node, in the Properties
window of the successor node, you can select the Result Set option to evaluate the full query results.
In this example, the Collection Filter node is used to filter the query
results. As you can see in the following image of the Properties
window for the Collection Filter node, the query results are filtered
to include only the policy events that lasted longer than 10 seconds,
occurred within the last month, and have the name IOW Excursion.
The subsequent Calculation and Condition
nodes evaluate the filtered query results and trigger actions when the specified
conditions are met. Specifically, the remaining nodes in this policy work
together to send an email message and to create a recommendation if the
filtered query contains more than two results or if the total duration
of the query results exceeds 4 minutes.