Developing Custom Workflow Activities for Orchard CMS
I am a huge fan of the Orchard Rules Engine for extending Orchard CMS, but recently I have been converting a lot of Orchard Rules to the Orchard Workflow Module as well as creating a few new Workflow Activities. I already mentioned the Login Workflow Activity, and thought I would quickly mention a couple others: Change Password and Update Profile Workflow Activities in Orchard CMS.
Custom Workflow Activities
The nice thing about both the Orchard Rules Engine and Orchard Workflow Module is that they are extensible. You can create custom Workflow Activities that appear in the Activity Toolbox and drag and drop these activities to the Workflow Canvas to create all kinds of interesting short- and long-running workflow processes in Orchard.
I've used the Rules Engine quite a bit with my clients and now that it is deprecated in Orchard 1.7 I need to migrate the custom rules to the workflow module. I am on the bleeding edge as usual, so it's fun to dive into the Orchard Source Code and learn how to do it as well as uncover bugs and issues before the official release of Orchard 1.7.
I've developed a couple dozen custom workflow activities. I thought I would mention a couple that are generic, but necessary for any real web applications based on Orchard CMS: Change Password and Update Profile Workflow Activities.
You don't necessarily have to develop custom workflow activities for change password and update profile as you could get away with the Signal Activity and one of the Content Activities for them, but I prefer to be more explicit about which events they handle and not worry about accidental changes that could alter or break the workflow. I'll be using them quite a bit in my workflows so I will get a lot of reuse, and thus developing custom workflow activities is worth it for me. You might decide otherwise.
Several of my custom Orchard web applications require an email be sent to the user when either their profile and/or password has been updated. Personally, I think this is critical, yet basic, because I want to know if someone other than me has possibly changed a password or my profile on a website. The workflow activities are simple and don't require much description.
I've built worflow activities for a lot of the logon, logoff, change password, update profile, newsletter subscribe and unsubscribe, custom forms, etc., as well as a lot of custom activities for more client-specific needs. Again, most of these are to replace custom rules that I had already built as part of the Orchard Rules Engine. It's fun and I look forward to developing more custom Orchard Workflow Activities in the future.