• No results found

Part B: Edit the flow

In document Build Your First Application Pega (Page 53-64)

The following steps describe editing the generated flow so that the items noted in the previous topic are addressed.

1. In the Application Explorer, expand EquipmentRequest to see the rule categories underneath it. Expand the Process category and then expand the Flow category. Click StartEquipmentRequest.

2. Click theFlow Editor1icon ( ) to open the flow in the flow editor. The flow editor uses Microsoft Visio.

You might be prompted to enable macros in Visio. If so, select to enable macros.

1This displays the application flow in an editable Visio diagram.

3. In the displayed flow diagram, observe the following items:

l The flow is in draft mode. You can tell when a flow is in draft mode by the yellow rectangle with the word Draft at the top of the flow diagram. Draft mode allows you to work with shapes in the flow with-out having to create all of the underlying rules for the shapes.

l The shapes from the Discovery Map that are specified as Human Based Steps (green shapes) are rep-resented as assignment shapes in the flow diagram.

l The Discovery Map shapes that are specified as System Steps (yellow shapes) are represented as utility shapes.

l The Discovery Map shapes that are specified as alternate steps (Reject and Update Status) appear in a separate branch.

4. Click to save the flow with the flow diagram. After the system completes saving the flow, a warning ( ) shape might appear in the diagram. This image marks where a shape's required values or underlying rules are incomplete. When a flow is saved, the system validates whether rules exist for each shape in the flow. Ignore any ( ) warnings that appear at this point, because the missing rules are created in the following steps of this topic.

5. Create flow action rules for the locations in the running process where the user interface is displaying "Flow Action does not yet exist" by following these steps:

a. Select the connector that runs between the SelectHardware shape and the SelectSoftware shape.

The Connector Properties panel displays in the upper left corner.

b. In the Connector Properties panel, enterSelectHardwarein theFlow Actionfield. Do not use spaces in this field, because this value is the flow action rule name, which does not allow spaces.

c. Click next to the Flow Action field. In the New Rule dialog for the flow action, confirm the following values:

o Applies ToisGLBX-FW-OnboardingFW-Work-EquipmentRequest o Action NameisSelectHardware

o RuleSetisOnboardingFW o Versionis01-01-01

o Templateis blank (the default)

d. Click Create to create the flow action rule.

e. Click to save the SelectHardware flow action. Then click in its tab to close that tab.

f. In the Connector Properties panel in the flow editor, do not change any other values in the other fields in the panel. Click Apply in the Connector Properties panel. (Ignore the warning next to theFlow Actionfield. This warning clears the next time you click to save the rule and the system validates references to the new SelectHardware flow action rule.)

g. Repeat steps 5.a through 5.f for the connector that runs between the SelectSoftware shape and the Approve shape. EnterSelectSoftwarein theFlow Actionfield, and confirm the following values in the New Rule dialog for the flow action:

o Applies ToisGLBX-FW-OnboardingFW-Work-EquipmentRequest o Action NameisSelectSoftware

o RuleSetisOnboardingFW o Versionis01-01-01

o Templateis blank (the default)

Remember to save ( ) the new SelectSoftware flow action rule.

h. Select the connector that runs between the Approve shape and the UpdateStatus shape. In the

Connector Properties panel, use the SmartPrompt in theFlow Actionfield to see the list of available flow action rules. The first choices displayed by the SmartPrompt are the two flow actions just created, SelectHardware and SelectSoftware. Double-click theMorein the SmartPrompt list to see the list of standard flow action rules. Double-clickApproveto select it for theFlow Actionfield.

i. Click Apply.

6. When the process first creates the work item, the work item's status is set toNew. Adjust the flow to set the status of the work item toOpenas it enters the first assignment (Select Hardware) and toPending-Approval as it enters the Approve step.

a. Select the Select Hardware assignment shape.

b. In the Assignment Properties panel, use the SmartPrompt in the StatusWorkfield to select the stand-ardOpenstatus value. (You might have to expand the Assignment Properties panel to see the field labels and locate theStatusWorkfield). Click Apply.

c. Select the Approve assignment shape.

d. In the Assignment Properties panel, use the SmartPrompt in theStatusWorkfield to select the stand-ardPending-Approvalstatus value. (You might have to expand the Assignment Properties panel to see the field labels and locate theStatusWorkfield). Click Apply.

7. Use the following steps to select the standard status value for the Update Status step that follows the Approve step. Recall that the Globex subject matter experts specified that this Update Status step follows the Approve step, and in this process step, the system updates the status of the work item:

a. Select the UpdateStatus utility shape that follows the Approve assignment. The Utility Properties panel displays in the upper left corner. TheRulefield displays the name of the standard rule Upda-teStatus. Because the name on the shape is UpdateStatus, and a standard rule with that name already exists, the system uses that rule as the default for this shape.

b. In the Utility Properties panel, in theStatusWorkfield, use the SmartPrompt to list the available choices. Double-clickResolved-Completedin the list.

c. In the Utility Properties panel, in theNamefield, update the value toUpdate Status

-Resolved-Completed. It is a best practice to provide the specified status in the name of the utility shape in the diagram.

d. Click Apply.

8. Click to save the flow with the updates to this point. The system validates the references made to rules in the shapes, and clears the warnings ( ) on the shapes in the main branch of the flow. The main branch of the flow should look like the following image:

9. Use the following steps to incorporate the alternate process steps (Reject and Update Status) into the flow diagram:

a. In the branch with the alternate steps, select the FlowEnd ( ) shape at the end of that branch and press your keyboard's Delete key to delete it.

b. Select the disconnected head (arrow) of the connector that exits the bottom of the UpdateStatus util-ity shape and drag the head to connect to the connection point at the top of the remaining FlowEnd ( ) shape.

c. Select the UpdateStatus utility shape and drag it until it is to the right of the UpdateStatus

-Resolved-Completed shape. (The system automatically redraws the connectors. You adjust these in the next step.)

d. Select the tail of the connector at the bottom of the Reject assignment shape and drag it to connect at the rightmost connection point on the bottom of the Approve assignment shape.

e. With that connector selected, in the Connector Properties panel, in theFlow Actionfield, use the SmartPrompt to select the standardRejectflow action rule. Click Apply.

f. Select the UpdateStatus shape. In the Utility Properties panel, in theStatusWorkfield, use the Smart-Prompt to select the standardResolved-Rejectedstatus. In theNamefield, update the value to Update Status - Resolved-Rejected. Click Apply.

g. Because the rejection action is handled by the Reject connector shape, delete the Reject assignment shape by selecting it and pressing your keyboard's Delete key.

h. Because the approve and rejection actions are handled by the connectors, rename the Approve assign-ment shape to reflect that fact. Select the Approve shape. In the Assignassign-ment Properties panel, in the Name field, update the value toReview. Click Apply.

The flow should look like the following image.

10. Click to save the flow with the updated flow diagram.

11. Select the connector labeled Approve, 100%. In the Connector Properties panel, in theLikelihoodfield, enter 70. Click Apply.

12. Select the connector labeled Reject, 100%. In the Connector Properties panel, in theLikelihoodfield, enter 30. Click Apply.

In a Process Commander application, a likelihood value is a value between 1 and 100, which is interpreted as a probability associated with that path in the process. For example, a likelihood of 70 on a connector labeled Approve means that the subject matter experts expect participants in the process to choose the Approve action 70% of the time. These values determine the presentation order of actions in the user interface, so that the actions most likely to be chosen are displayed first.

The flow should look like the following image.

13. Click to exit the flow editor.

If a message displays asking if you want to save changes to the flow diagram, click Yes.

14. Close the flow rule form by clicking on its tab.

Continue to the next tutorial topic.

In document Build Your First Application Pega (Page 53-64)