How to Create a Workflow Diagram

How to Create a Workflow Diagram

To prepare a workflow diagram, double-click on the process activity. In our example,
double-click on the NEW PO Approval Process. The Process window will appear. The
Process window shows the graphical representation of your workflow process. Initially, the Process window is blank. Drag and drop activities from the Navigator into the Process window. Between activities, define transitions by drawing arrows using the right mouse button. If the result code of the source activity is None, the transitions will not have a label. If the result code of the source activity is not None, label the transition arrow with the result code that will initiate the transition.

To diagram the NEW PO Approval process, create the item attributes for a NEW PO. To do this, copy the item attributes from the PO Approval item type and paste them to your NEW PO item type. Press C T RL-C on the PO Number from the PO Approval item type. Then press C T RL-V to paste the PO Number to your PO item type. Repeat the same copy-and-paste step for the PO Amount, the Requestor Name Line1, and the Approver User Name (see Figure).
You must then create the function that selects the approver, which is the next manager in H.R. Create a PL/SQL stored procedure that will search out the next manager based on the requestor and tie the stored procedure to a function activity. In this review question, you can assume that the stored procedure will always retrieve a valid manager. In this case, the result type of the function activity can be None and the function activity is NEW Get Next Manager in H.R.

Create notifications that allow the manager to approve or reject the PO and that send a
reminder if the notification timed out. You do this by creating a message that asks the
manager to approve or reject the PO. Use NEW_APPROVE as the internal name and New
Approval as the display name. You can type a message body like the one in Figure .

Your message must have a Respond message attribute. Use NEW_RESULT as the internal name. Since the display name becomes the prompt, use Approve as the display name. Enter Please either approve or reject the PO as the description. Select Lookup as the type and, since you are soliciting a response, select Respond as the source. Select Approval as the lookup type. This will allow the user to respond with either Approve or Reject (see Figure).

Once you have created the New Approval message, attach the message to a notification
activity called NEW_APPROVE_PO. Use a display name of NEW Approve PO. Select the
same result type as your message, which is Approval, and select New Approval as the
message. Click on the Details tab to change the Timeout field to 3 days. Create a reminder notification in the same way. Now you are ready to create the workflow process diagram.

You should start the workflow process with the Start function activity. You can find the
Start function activity from the Standard item type. Drag and drop the Start function into
the Process window. You are assuming that this NEW PO Process is initiated by a
CreateProcess API and StartProcess API with the correct attributes: PO Number, PO
Amount, Requestor Name Line1, and Approver User Name.

The Start function activity will be your source activity. The destination activity, NEW Get
Next Manager in H.R., will retrieve the appropriate manager. Create a transition by right clicking the mouse and dragging a line between the Start function activity and the NEW
Get Next Manager in H.R. function activity. Since the result code is None, there will be no need to select a result code. Your next activity will be NEW Approve PO notification
activity. Drag and drop the NEW Approve PO notification activity into the Process window. Since the result code from NEW Get Next Manager in H.R. function activity is None, you can just connect the NEW Get Next Manager in H.R. function activity to the NEW Approve PO notification activity.

You must identify the performer for the NEW Approve PO notification activity. The
performer is the role receiving the notification. In your case, select the item attribute
Approver User Name as the performer. To select a performer, double-click on the
notification activity in the Process window and select the performer. You can only do this if
you invoked the Notification Activity Property window inside the Process window; you
cannot do this if you invoked the Notification Activity Property window in the Navigator
(see Figures).

You can use the Attribute Values tab to specify a value for any selected attribute in this
tab. You do not need this feature for this review question.

The manager can ignore the notification, approve the PO, or reject the PO. Treat all three conditions with three different transitions. If the manager approves or rejects the PO, the workflow process is considered completed. In this case, it must flow to the End function activity. To show the Or condition, you can use the Or function activity. Both the End and Or function activities can be found under the Standard item type. If the manager chooses to ignore the notification, you must send a reminder to the manager and branch back to resend the NEW Approve PO notification activity.
To make sure that the NEW Approve PO notification can be resent, make sure that Loop
Reset is not checked. When you create a transition between the NEW Approve PO activity and the Or activity, a window appears and asks which result code should be tied to this transition. Your choices are Approved, Rejected, <Default>, or <Timeout> (see Figure 11- 20). The <Default> transition is used if result codes other than any selected result codes are returned.

Choose Approved for the transition. Repeat the same step and create a transition for
Rejected between the NEW Approve PO activity and the Or activity. Create a transition
between the NEW Approve PO activity to the NEW PO Reminder activity and select
<Timeout> for the transition. Since you want to route back from the NEW PO Reminder
activity to the NEW Approve PO activity, you must create a transition from the NEW
Approve PO activity to the NEW PO Reminder activity.

To see labels, which are display names in the Process window, you can either execute
Designer’s View | Show Label | Display Name menu command, or right-click on the Process window and execute the Show Label | Display Name menu command. See Figure 11-21 for the complete process you have created.


Other options in the Process window include copying diagrams, printing diagrams, and
displaying an Overview window. All of these options are found when you click the right
mouse button in the Process window. You can verify your workflow process by executing
the File | Verify menu command.

Review Questions
1. When will you need to select a label for a transition?
2. What is the purpose of the <Timeout> label?
3. How will your NEW PO Process be invoked?
4. What is a performer and how do you specify a performer for a notification activity?


1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17
*/

No comments:

Post a Comment