
Workflow is the essential feature of complex modern system. Lots of automate process can be implemented if the workflow states defines.And it contributed to the ACL system.
Think of the following situations:
1. The Draft news should only be shown to moderator. After moderation, the state changed to open. And open news should be shown to All automatically.
2. In the open state, some field shows to all, and some hidden, only can be seen by some roles.
3. In the Draft state, some fields such as title can not be edited, but other fields can be edited.
4. The job can be processed just after money access. Automatically change the state of the job. (By Trigger)
5. The payment process
6. Automatically hide the article after open 1 weeks.
In Drupal, workflow module always work together with Actions*, Triggers*, VBO*. Triggers can be assigned to the workflow changes. Do something automatically when the workflow changes. Triggers fire the Actions* we defined.
How to define Actions, please see our other articles.
Important feature or bug of workflow module of Drupal:
When a new CCK field added to a content type. The workflow of this state should be saved again, or the field will not be constrained by Workflow.
Change the workflow programmingly in one line:
<?php workflow_execute_transition(node_load($nid), 21, 'Test comment ',TRUE); ?>
You can change the workflow state by Trigger*, by cron and conditions, by xmlrpc, etc.




