Workflow module equivalent in 1.6?

Topics: Customizing Orchard
Jun 26, 2013 at 6:46 PM

I'm fairly new to Orchard, but I've followed the development of the Workflows module for 1.7 fairly closely. I need to do something similar with a 1.6 deployment; in particular, sending out an e-mail when the state of a content item changes, or based on the value of a field within that content item.

Here's the basic flow I need to implement:
1) Users submit a form (covered by Custom Forms)
2) Another user receives an e-mail when that form is submitted (already covered by Rules)
3) Notified user can 'approve' or 'deny' the form (sort of covered by a boolean field in the content type)
4) On approval, the user who submitted the form and another entirely different user receive an e-mail
5) On denial, the user who submitted the form receives an e-mail

3, 4, and 5 sound like they could be solved via the Workflows module. However, I couldn't find an equivalent in 1.6, and waiting for 1.7 isn't viable at this point.

Is it possible to trigger a rule based on a field's value in 1.6? I would like to do something like that without too much custom development, if possible.

I tried a straight module copy from 1.7 source to my 1.6 deployment - Orchard.Workflows and dependency Orchard.Scripting.CSharp (and its DLL) - and it seems to have enabled correctly, but I can't find any way to actually use it. Could someone point me in the right direction?
Jun 26, 2013 at 7:47 PM
Might be better to upgrade to 1.x source code actually. The Rules module doesn't support users activities. Or you would have to implement it as it's done in the Workflow module.

There is nothing breaking.
Jun 26, 2013 at 8:48 PM
Edited Jun 26, 2013 at 8:50 PM
Ah, that's what I figured. I'll try to run a parallel deployment of 1.x and see if it'll do what I need it to do.

In the meantime, is there any documentation buried somewhere about developing a custom event for the Rules engine? Ideally, I'd like to have something I could attach to any content type and have it fire when the value of a given field was changed, but I could also see making a custom field as an attachable state tracker for a content item.

I tried looking through the Custom Forms module, but that seems a little too complicated for what I'm trying to do and I just ended up confusing myself. Where are the available-by-default actions defined - Content Published, Content Removed, etc? That might help me get a better sense as to how the rule/event/action flow works out.