Tech »  Topic »  Lessons from the Front: Configurable Workflow Rules for New Items in XM Cloud

Lessons from the Front: Configurable Workflow Rules for New Items in XM Cloud


In this post I’d like to share a workflow “attacher” implementation I built on a recent Sitecore XM Cloud project. The solution attaches workflows to new items based on a configurable list of template and path rules. It was fun to build and ended up involving a couple Sitecore development mechanisms I hadn’t used in a while:

  • The venerable Sitecore configuration factory to declaratively define runtime objects
  • The newer pipeline processor invoked when items are created from a template: addFromTemplate

This implementation provided our client with a semi-extensible way of attaching workflows to items without writing any additional code themselves. “But, Nick, Sitecore already supports attaching workflows to items, why write any custom code to do this?” Great question 😉.

The Problem 🙅‍♂️

The go-to method of attaching workflows to new items in Sitecore is to set the workflow fields on Standard Values for the template(s) in question. For ...


Copyright of this story solely belongs to perficient.com . To see the full text click HERE