sections in the article
This article provides good practice for implementing Rules and Queries in Plan & Release.
About rules and queries
This functionality is found in the Configure tab of each channel node in Plan & Release.
Go to a Channel > Structure tab > select a node and click Configure.
There are scenarios where the design needs to be different from the details below, and this is simply the starting point for your consideration when implementing Rules and Queries.
We recommend that you use Rules and Queries in the following way:
- Queries are for general conditions. A query can be applied to many nodes. If you discover that a query needs to be applied to all nodes in a particular channel without exception, consider using a Channel Filter.
- Rules are for a node-specific requirement, that makes the selection unique to that node. Each node will have a different rule.
In this example, your Products are categorized by brand. For a Product to be published, it must have at least one Item and the Enrichment Complete flag must be set to True.
Query: Select all Products that have a link to an Item, and the Enrichment Flag is True
Node 1 Rule: Brand = X
Node 2 Rule: Brand = Y
Now consider the scenario where you want to introduce authorization by the Product Manager, an attribute that the manager must set to true and is only editable by them.
You can edit one query - add the requirement that Product Manager Approval is True - and all channel nodes are updated with the same new query. The Brand is a separate rule, and so this global update is possible without having to change every channel node.
Performance-wise, the same considerations apply that you would think about for any query. The more complex it is, the harder the system has to work. The effort is a combination of both the Query and the Rule.
When extensive use of Link Rules is required, ensure that you also consider the performance and link rule execution time for all channels. For the overall system performance, it isn't good if link rules are running all of the time, and having many rules will extend the time before the channel is fully up to date.