Step 3: Create Workflows [web|gui]
This part of the tutorial steps you through the process of creating two workflows for a peer review process. The first workflow is for the administrator of a digital library. The second workflow manages the review process for a submitted document.
The figure below presents a view of the second workflow after this step of the tutorial is completed using the Metis GUI Workflow Editor.

In the area above the tree view, the Metis GUI Workflow Editor provides buttons to edit the workflow. For example, the Fork button
lets you add a fork node to the currently selected workflow. These buttons are enabled and disabled depending on the current selection of the workflow tree.
1. Click on the Workflows tree node in the leftmost Metis Tree panel.
2. If this is your first time using the workflow editor, then click on the Add toolbar button. A new workflow (New_Metis_Workflow_1) will appear and the Workflow Editor will show details about the new workflow.
3. Type admin-workflow in the text field. The GUI Workflow Editor is designed to present an intuitive tree-like view of the workflow. The branch nodes within this tree consist of structure nodes, whereas the leaf nodes are event nodes. Structure nodes consist of the root node as well as sequence, fork, branch, and loop nodes. Each Metis structure node can have any number of children, except for loop and event nodes. Initially, the root node is the only member of the workflow and it bears the name of the workflow. The figure below shows the initial state of the workflow editor for the admin-workflow.

4. Click the Sequence button. The resulting workflow appears below. The workflow editor now shows that the admin workflow begins with a sequence. Now we must add children to the sequence node. If you click on the newly created sequence node, you will see that the Event button, along with its associated pop-up list, is now enabled. The list contains entries for each of the Metis events created in Step 2 of this tutorial.

5. Select submissionReceived from the pop-up list and click the Event button. The submissionReceived event node now appears as a child of the sequence node.
6. Select submissionProcessed from the list and click on the Event button. The submissionProcessed event now appears as the second child of the sequence node. The resulting workflow appears below.

We have now finished defining the workflow for the administrator of the digital library. It essentially says that a submission will be received, the administrator will process it, and then announce that the submission is ready for review by generating the submissionProcessed event. (The submissionReceived event will be generated by a web form that we build in Step 5 of the tutorial.)
7. Click on the Save Repository button to save all changes. The name of the workflow inside the List changes from New_Metis_Workflow_1 to admin-workflow.
We will now create the workflow to manage the review process. Since the review-workflow starts with the same two events as the admin-workflow, we can repeat the steps above to get it started. First, create a new workflow and name it review-workflow. Then, repeat steps 4 through 6 above so that the new workflow has the same structure as the admin-workflow.
8. Select the sequence node and add two event nodes: actionEditorAssigned and reviewerAssigned. Then, with the sequence node still selected, click on the Loop button to add a loop node. Expand the loop node to see that it comes with two children nodes. One child is labelled [unspecified]; the other is a sequence node that is used to hold the events that this loop will iterate over. The [unspecified] node is known as the "loop until" event, that is, it is the event that indicates when this loop is complete.
9. To set the "loop until" event, select its parent node (e.g. the loop node itself) and using the pop-up menu located next to the Event button, select reviewComplete and click on the Event button.
10. Select the loop's sequence node and then add two event nodes to it: deadlineAssigned and deadlinePassed. Since it may take several attempts to get a review from a reviewer, Metis will iterate over these two events until a reviewComplete event has been received. Your workflow should look similar in structure to the simulation below.
review-workflow
sequence
submissionReceived
submissionProcessed
actionEditorAssigned
reviewerAssigned
loop
reviewComplete
sequence
deadlineAssigned
deadlinePassed
11. Select the sequence node at the top of the review workflow and click on the Fork button to add a fork node after the loop node. Set its type to xor by selecting xor from the pop-up menu and clicking the Set Type button.
12. Add three branches to the new fork node by selecting it and clicking the Branch button three times.
13. To the first branch, add the following event: authorNotifiedOfSuccess.
14. To the second branch, add the following event: authorNotifiedOfRejection.
15. To the third branch, add the following event: authorNotifiedOfRequiredRevision.
Your workflow should look similar in structure to the simulation below.
review-workflow
sequence
submissionReceived
submissionProcessed
actionEditorAssigned
reviewerAssigned
loop
reviewComplete
sequence
deadlineAssigned
deadlinePassed
fork [xor]
branch
authorNotifiedOfSuccess
branch
authorNotifiedOfRejection
branch
authorNotifiedOfRequiredRevision
16. Click the Save Repository button to save the review-workflow.
The review workflow steps the subcomittee of editors through the process of picking a particular editor to manage the review process, assigning one reviewer, waiting for his or her review, and notifing the author of the review results. This workflow is obviously simplified, but it can serve as a starting point for more complex review processes.