Reputation: 3216
I'm using Sitecore 8 and I need to have some rules in the Rules Engine being resolved on every request in the site - much the same as Global Rules used to work in previous versions of Sitecore.
I will have a specific set of Sitecore items that will need the rules field processed on each page request. I don't have any specific requirements on which conditions and actions I need to run and the content editor should be able to apply any condition/action.
In Sitecore 8 what is the best way to do this? Do I need a pipeline processor running the rules? If so, where would I patch my processor (i.e. which processor should this go before or after)?
Upvotes: 1
Views: 367
Reputation: 4456
If the outcome of your rule needs to affect the requested page, then you should added a processor some time before ExecuteRequest
in the httpRquestBegin
pipeline. Where exactly depends on what information needs to be available to the rule conditions. I would recommend adding it directly before ExecuteRequest
If the page does not need to be affected by the outcome of the rule, then adding a processor to httpRequestEnd
is a good option. This is the last Sitecore touch point during the request.
I have a blog post tracking each step of a Sitecore 8 request:
http://sitecoreskills.blogspot.co.uk/2015/02/a-sitecore-8-request-from-beginning-to.html
Upvotes: 2