Using and Customizing Sitefinity Workflow with Guard Activities

Using and Customizing Sitefinity Workflow with Guard Activities

Posted on January 13, 2013 0 Comments

The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.

The Sitefinity workflows are built on Windows Workflow Foundation 4.0 (WWF). By utilizing our implementation on WWF, you can leverage that technology and completely customize the logic executed within the process flow in the system to meet the needs of virtually any business scenario.

The workflow does so much more than define publication for approval status (i.e. published or draft). The workflow allows you to interact with the flow of the executed logic in any decision point and alter it in a customized way. In the following image, you can see the different options available at one location (switch). On each path/action, you can step in to add your own custom logic, or remove the built-in Sitefinity logic to meet your exact needs.

Workflow Sample Image

The workflow foundation reduces each business process to individual activities. These are the building blocks of every business process. Using Activities, you can create an abstract representation of any logical flow. Sitefinity uses three major types of Activities to facilitate the workflow. Let’s briefly go through each.

Code Activities

This is the most essential type of activity. It encapsulates any task that has to be done, any code that has to be executed at certain activity point. E-mail notification and scheduling are just two examples of Code Activities, and you can introduce your own Code Activities to accomplish any task.

Decision Activities

Decision Activities specify what next action options you have at any given status designation. For example, on "Draft" status, you can choose between "Send for Approval" or "Delete" action; on "Awaiting Approval" status, you can choose between "Reject" and "Publish." Available actions are specified by using a DecisionActivity in the FlowCharts.

Decision Activity Image

Guard Activities

Guard Activities control which roles and users are authorized to pass a certain point of the workflow. In Sitefinity, we use the Approvers and Publishers roles to map any of the more powerful group of users.

With Sitefinity 5.2, we have introduced the notion of negative guard activity so now you can use the Guard Activities, not only to say which user can pass it, but also to say which are not able to move forward in the workflow:

Guard Activity Image
Also, the way we build our Workflow UI (the actions buttons on the menu) is related to parsing the workflow tree and finding the decision activities in a specific workflow. For instance, with native Guard Activities you can control which users see which buttons, which creates a powerful way to control the user experience.

Here is a short video to demonstrate the process:

Sitefinity Guard Activities give you a wizard’s magical powers without the need for a white beard! Use them wisely!

Gandalf Road Sign
progress-logo

The Progress Team

View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.

Comments

Comments are disabled in preview mode.
Topics

Sitefinity Training and Certification Now Available.

Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.

Learn More
Latest Stories
in Your Inbox

Subscribe to get all the news, info and tutorials you need to build better business apps and sites

Loading animation