1 | ******************************************************************** |
---|
2 | D R U P A L M O D U L E |
---|
3 | ******************************************************************** |
---|
4 | Name: Workflow Module |
---|
5 | Author: John VanDyk |
---|
6 | Maintainers: Mark Fredrickson <mark.m.fredrickson at gmail dot com> |
---|
7 | John VanDyk drupal.org/user/2375 |
---|
8 | Drupal: 6 |
---|
9 | ******************************************************************** |
---|
10 | DESCRIPTION: |
---|
11 | |
---|
12 | The workflow module enables you to create arbitrary workflows in |
---|
13 | Drupal and associate them with node types. |
---|
14 | |
---|
15 | Workflows are made up of workflow states. |
---|
16 | |
---|
17 | Moving from one state to another is called a transition. |
---|
18 | |
---|
19 | Actions are associated with transitions (actions.module was used |
---|
20 | for this in Drupal 5; core actions support is in Drupal 6). |
---|
21 | |
---|
22 | Alex Reisner introduced role-based permissions for workflow states |
---|
23 | and generally enhanced this module. |
---|
24 | |
---|
25 | ******************************************************************** |
---|
26 | INSTALLATION: |
---|
27 | |
---|
28 | 1. Place the entire workflow directory into your Drupal |
---|
29 | sites/all/modules directory. |
---|
30 | |
---|
31 | |
---|
32 | 2. Enable the workflow module by navigating to: |
---|
33 | |
---|
34 | Administer > Site building > Modules |
---|
35 | |
---|
36 | Enabling the workflow module will create the necessary database |
---|
37 | tables for you. |
---|
38 | |
---|
39 | 3. If you want anyone besides the administrative user to be able |
---|
40 | to configure workflows (usually a bad idea), they must be given |
---|
41 | the "administer workflow" access permission: |
---|
42 | |
---|
43 | Administer > User management > Permissions |
---|
44 | |
---|
45 | When the module is enabled and the user has the "administer |
---|
46 | workflow" permission, a "Workflow" menu should appear in the |
---|
47 | menu system under Administer -> Site building. |
---|
48 | |
---|
49 | You may also allow only some users to schedule transitions. Select |
---|
50 | the "schedule workflow transitions" permission to allow transitions. |
---|
51 | |
---|
52 | ******************************************************************** |
---|
53 | GETTING STARTED: |
---|
54 | |
---|
55 | Let's create a new workflow. Click on Administer -> Site building -> |
---|
56 | Workflow and click on the "Add workflow" tab. |
---|
57 | |
---|
58 | We'll start simple. Call our workflow "Draft-Done" and click Add Workflow. |
---|
59 | |
---|
60 | Now lets add some workflow states to our workflow. Click "add state" and |
---|
61 | enter "draft" and click the Add State button. Do the same for "done". |
---|
62 | |
---|
63 | So we've got a workflow with two states, "draft" and "done". Now we |
---|
64 | have to tell each state which other states it can move to. With only |
---|
65 | two states, this is easy. Click on the "edit" link to edit the workflow |
---|
66 | and see its states. |
---|
67 | |
---|
68 | The "From / To -->" column lists all states. To the right are columns |
---|
69 | for each state. Within each cell is a list of roles with checkboxes. |
---|
70 | |
---|
71 | This is confusing. It's easiest to understand if you read rows |
---|
72 | across from the left. For example, we start with the creation |
---|
73 | state. Who may move a node from its creation state to the "draft" |
---|
74 | state? Well, the author of the node, for one. So check the "author" |
---|
75 | checkbox. |
---|
76 | |
---|
77 | Who may move the node from the "draft" state to the "done" state? |
---|
78 | This is up to you. If you want authors to be able to do this, |
---|
79 | check the "author" checkbox under the "done" state. If you had |
---|
80 | another role, say "editor", that you wanted to give the ability |
---|
81 | to decree a node as "done", you'd check the checkbox next to |
---|
82 | the "editor" role and not the author role. In this scenario authors |
---|
83 | would turn in drafts and editors would say when they are "done". |
---|
84 | |
---|
85 | Be sure to click the Save button to save your settings. |
---|
86 | |
---|
87 | Now let's tell Drupal which node types should use this workflow. Click |
---|
88 | on Administer -> Site building -> Workflow. Let's assign the Draft-Done |
---|
89 | workflow to the story node type and click Save Workflow Mapping. |
---|
90 | |
---|
91 | Now we could add an action (previously configured using the trigger |
---|
92 | module). Click on the Actions link above |
---|
93 | your workflow. Add the action to the transition. |
---|
94 | |
---|
95 | Now create a new story by going to Create content -> Story. If there |
---|
96 | is no sign of a workflow interface here, don't panic. The interface |
---|
97 | is only displayed if there is more than one state to which the user |
---|
98 | can move the node (why bother the user with a form with only one |
---|
99 | selection?) Click Submit to create the story. |
---|
100 | |
---|
101 | You can see the state the node is in and the history of state changes |
---|
102 | by clicking on the Workflow tab while viewing a node. |
---|
103 | |
---|
104 | Changing the state to "done" and clicking Submit will fire the action |
---|
105 | you set up earlier. |
---|
106 | |
---|
107 | ******************************************************************** |
---|