Sometime we require a functionality in our client’s project as described below :
“Suppose A user can only create content . B User can move this content to ‘Review’ State . Then C user (as site admin) can finally approve this content. In this scenario A user should receive email whether content moved to approved or rejection”
After all above module installation, create a role ‘publisher’ from people->permission->roles
Now Access Config->Workflow
Then create a work flow .Follow all the details in that form .Consider on “Workflow tab permissions” to check on our newly created role i.e ‘Publisher’ and ‘administrator’. Do not check on ‘(author)’. Because author can not manage workflow .
We have to assign which of our content type should work with workflow.
So ,to achieve this access config->workflow
Then select workflow name for the required content type.
Access “STATES” tab on the same above page and create some states as shown in below screenshot.
Now we are on main work to do i.e ‘TRANSITIONS’. You can access this page on the same page tab .Initially this page could be confusing to you . Let’s suppose in our context
– author can move content from ‘creation’ to ‘DRAFT’ by default
So checked only on ‘author’ on 1st row
– Similarly ,publisher can move ‘Draft’ to ‘REVIEW’ .So checked on ‘Publisher’ on 2nd row
– Then administrator can move from ‘Review’ to ‘DRAFT’. So, checked on ‘administrator’ on 3rd row
To send email to author on content approval or rejection ,we need to create 2 triggers .To do so, click on ‘Actions’ link on right side of the state name created on above page . Find proper event like
“Trigger: When node page moves from Review to Approved”
for content approved and
“Trigger: When node page moves from Review to Draft”
for content rejected
Access Config->Workflow ,There click on ‘access’ on the right side of the workflow name that we have created .Check properly access permission there.
Now all the major task has done, time to finalize the work.
Create 2 users .assign one of then to ‘Publisher’ role.
To check if it’s working , Open the site in another browser and log in as normal authenticated user .Then create a content.
Now log out and log in again with another user of ‘publisher’ role .
open the created page by authenticated users .If you have not shown just directly types in url ex: http://localhost/drupal/node/2
If everything ok in all above settings, you should see a tab ‘workflow’. Click on that.you see as shown below screenshot
If you have not succeeded ,recheck all of your settings. Best of Luck !