This project is read-only.

Replacing rules with workflows

Topics: Troubleshooting
Oct 9, 2013 at 6:07 PM

Presently we have something along the lines of 30 events that we use to trigger various rules from our site.

After exploring a bit it appears that I can either replace all of these events with activities that start various workflows or use a signal activity to trigger the workflows.

I wasn't sure if one method was recommended over the other? Or if there was another, preferred method?


Oct 29, 2013 at 2:50 AM
I haven't seen much in the way of converting rules to workflow. I think this an oversight, particularly if it might seem easy to those that created the workflow module. The problem is that for any modules that were created using rules the non-programmers (like me) are left scratching their heads. Maybe it's easy to convert the code? However, I am skeptical about that. I think Skywalker/Sipke is taking a very cool messaging module that he made for 1.6 using Rules and converting it to using workflows, but that's not due out until maybe 1.8.

I would go through some of the rules and compare it with events available in workflows. Some of it seems to be convertible using existing events, but again if you are using custom modules, then it might be trickier. I know Sebastian wrote up a post on creating custom forms and using workflows to send messages/e-mails. Do a search and you should find it. It was helpful.

Another option, which I am now trying to work through is simply copying over the Orchard.Rules module folder and putting it into my 1.7.1 instance. I was previously working with the 1.7 source and can see and use Rules and Workflows in the Admin. However, right now I am stuck because with 1.7.1 I cannot see Rules in the Admin menu. Might be that was one of the things taken care of in 1.7.1. BTW, trying to figure out if I could have them side-by-side is what led me to this post - hopefully it's helpful even if late.
Oct 29, 2013 at 7:10 AM
Yes, it's a problem. How many rules are we talking about?
Oct 30, 2013 at 2:18 AM
Edited Oct 30, 2013 at 2:19 AM
Not sure if you meant the OP? I personally had about 75 plus rules spread over 5 sites. I just copied the sum/substance in the rules from my LIVE site into workflows in my DEV 1.7. site - for the most part that was just laborious. However, I am going to have to temporarily abandon DarkSky.Messaging (if that's what Sipke is going to use as the basis for the 1.8 upgrade) and the templates I set up (about 5 templates I had for about 15 e-mail rules). I'll keep them on hold and go back to vanilla e-mails for now. Just a matter of copying it over to workflows from the rules (i.e. the tokenized messages without the CSS/razor around it).
Oct 30, 2013 at 7:22 AM
It might be possible to go through export, a XML transform, then import.
Oct 31, 2013 at 4:18 PM
Hmm, that would sound like a viable option. Unfortunately, I already did my conversions. I am not adept at such a conversion, but maybe someone could blog about an example that would help the community. Thanks.