Posted by jimmb on July 25, 2007 at 6:01pm
We are attempting to set up a workflow action for people to apply for a directory listing on a website. Editors should be notified that a submission has been received, so they will be able to review it. The eventual process will hopefully be something like this:
- An anonymous user fills out the CCK fields set up for Directory Listing content.
- Upon clicking "submit", an e-mail is sent out to site editor(s).
- The content goes into an unpublished "For Review" state.
- Editors review it and go from there....
I watched the "Actions and Workflow" videocast at Lullabot and set it up as far as I could. The first problem I'm discovering, though, is that it appears that a content node must already be created before an action can take place. Is there any way the action can be triggered when the content is submitted?? Any other pointers or tips on setting this up will also be appreciated :)
Thanks,
Jim
Comments
Solution: Action triggered upon submitting
I am doing virtually the same thing.
The trick here is when they submit it will give them access denied for the content since it isn't publised and they can't edit their own content. So you need to have an action that redirects them to a thank you page or just a terse message, both of which are possible with actions and workflow
For creation -> Review I have:
For Review -> Publish, Publish -> Review, Publish -> Archive, Publish -> Review, Archive -> Publish, Archive -> Review
I just found this module that graphs the flow, it is nice:
http://drupal.org/project/workflow_graph
(http://drupal.org/node/156705)
(http://drupal.org/node/87431)
Transition Actions
(creation) → Review
Review → Publish
Publish → Archive
Publish → Review
Archive → Publish
This is just the rough layout. It should help though. There are a lot of moving parts so it really pays to learn the system more than just implementing someone's solution. Hope this helps.
--
Christian
--
Christian
Very Helpful
Thanks so much for your excellent response. I will attempt to implement it and see what I can learn in the process.
Regards,
Jim
Use Node Go To to redirect after submitting directory request
Instead of having to create an action you can use a module called Node Go To (http://drupal.org/project/nodegoto) to redirect people after submitting a directory request. It alows you to set redirects per node per node action (insert, update, delete).
workflow-ng
you can also redirect by using workflow-ng as it allows you to configure actions for node insert, update & delete.
Or you could also try to implement the workflow with it too, here you can read how this works
workflow-ng
Thanks for alerting me to this module. I have found it to be easier and more straightforward than the standard Workflow or Actions modules. So at this point I've successfully set up a re-direct when a new entry is created, and created a view that shows the new entries at the admin level.
The one thing that isn't working is getting an e-mail to be sent when the content is created. First I set up an action upon content creation so that the "Arguments configuration" is "Acting user". I then set a condition to define the "Acting user" as the "The contact e-mail address for the entire Drupal site" so that the 2 texts to compare are: [user:site-mail] and the address I set in Site Configuration for "E-mail address".
However, this wasn't working, so I read more into the documentation and found "Writing actions and conditions" - "A more advanced example": http://drupal.org/node/156754. This makes it appear that a new argument must be added to enable selecting the correct e-mail address option. It also appears that I need to do this in the workflow_ng_actions.inc file....
So I guess at this point I have a question and a comment:
Question: Am I on the right track here? What if I want to specify a totally different e-mail address (or groups of addresses) not set up anywhere on the Drupal website. Also -- not being a PHP programmer -- is there any other advice to ease a non-programmer like myself through this process?
Comment: Since this is probably a frequently desired action, I would recommend to the developer at some point to add more default arguments that would give more options for notification e-mails :)
Thanks,
Jim
fine that you like the
fine that you like the module.
Yep, what you want is probably a fixed mail address for your notifications. Indeed, an appropriate action is missing here. I'll have a look at it to add one.
That would be great!
That would be great! Thanks,
Jim
don't know if you have
don't know if you have noticed, but the recent release of workflow-ng includes that already
The most straightforward
The most straightforward way to get an action triggered upon submission (such as sending an e-mail) is to set two action one after another.
On the first action you select "Change workflow state of post to new state" (make sure you have check the force transition" option)
and then select another action you like upon this change such as sending an e-mail.
Nice Addition
Thanks for this last post. Very direct solution, and very helpful in my current project.
Thanks again!