Vous êtes sur la page 1sur 111

White Paper

PegaRULES Process Commander Personal Edition Developer FastStart Guide


Version 6.1 SP2

Copyright 2011 Pegasystems Inc., Cambridge, MA


All rights reserved. This document describes products and services of Pegasystems Inc. It may contain trade secrets and proprietary information. The document and product are protected by copyright and distributed under licenses restricting their use, copying distribution, or transmittal in any form without prior written authorization of Pegasystems Inc. This document is current as of the date of publication only. Changes in the document may be made from time to time at the discretion of Pegasystems. This document remains the property of Pegasystems and must be returned to it upon request. This document does not imply any commitment to offer or deliver the products or services described. This document may include references to Pegasystems product features that have not been licensed by your company. If you have questions about whether a particular capability is included in your installation, please consult your Pegasystems service consultant. For Pegasystems trademarks and registered trademarks, all rights reserved. Other brand or product names are trademarks of their respective holders. Although Pegasystems Inc. strives for accuracy in its publications, any publication may contain inaccuracies or typographical errors. This document or Help System could contain technical inaccuracies or typographical errors. Changes are periodically added to the information herein. Pegasystems Inc. may make improvements and/or changes in the information described herein at any time. This document is the property of: Pegasystems Inc. 101 Main Street Cambridge, MA 02142-1590 Phone: (617) 374-9600 Fax: (617) 374-9620 www.pega.com Personal PegaRULES Process Commander Document: Personal Edition Developer FastStart Guide Software Version: 6.1 SP2 Updated: March 15, 2011

Contents
Chapter 1: Overview .................................................................................... 6
Business Process Management ................................................................................................. 6 Structure of This Document ...................................................................................................... 7 Knowledgebase and Community .............................................................................................. 8 Prerequisites ................................................................................................................................. 8

Chapter 2: Using the Application ............................................................ 9


Creating a Purchase Order ......................................................................................................... 9 Adding Items to Your Purchase Order .............................................................................. 13 Approving the Purchase Order Request ................................................................................ 18

Chapter 3: Improving the Application ................................................. 22


Changing the Purchase Order Request Process .................................................................. 24 Defining a New Decision Table Rule .................................................................................. 33 Editing the............................................................................................................................... 38

Chapter 4: Updating the User Interface ............................................. 47


Building a New Flow Action rule ............................................................................................. 47 Building a Section rule ......................................................................................................... 48 Adding a Section rule to a Flow Action ............................................................................. 55 Editing the Flow .......................................................................................................................... 56 Adding a Data Field ................................................................................................................... 59 Inspecting Declarative Rules .............................................................................................. 64 Using the Declarative Rules Inspector .............................................................................. 66

Chapter 5: Reviewing Your Application .............................................. 68


Developing Applications by Changing Rules ........................................................................ 68 Technology Under the Covers ................................................................................................. 68

Chapter 6: Documenting Your Application ........................................ 70


Documenting the ESupply Application .................................................................................. 70

Appendix A: Application Document for ESupply.............................. 73


Overview of ESupply 01.01.01 ............................................................................................... 78 Description .............................................................................................................................. 78 Business Objectives .............................................................................................................. 78 Actors ....................................................................................................................................... 78 Work Types ............................................................................................................................. 78
Personal Edition Developer FastStart Guide

Supporting Types .................................................................................................................. 78 RuleSets .................................................................................................................................. 79 PurchaseOrder ............................................................................................................................ 79 PurchaseOrder - Flow ........................................................................................................... 79 Primary Path ...................................................................................................................... 80 Alternate Path 1 ................................................................................................................ 86 Alternate Path 2 ................................................................................................................ 86 Alternate Path 3 ................................................................................................................ 87 Other Referenced Rules .................................................................................................. 87 Other Use Cases (Not Referenced in the Application)................................................... 88 ESupply PurchaseOrder EnterDeptInformation - Use Case ..................................... 88 ESupply PurchaseOrder RejectOrder - Use Case ....................................................... 88 Entity Relationship Diagram ............................................................................................... 89 Properties Referenced .......................................................................................................... 89 Common....................................................................................................................................... 91 Security ........................................................................................................................................ 91 Navigation ................................................................................................................................... 91 DataManagement ....................................................................................................................... 91 SysAdmin ..................................................................................................................................... 91 Other Classes .............................................................................................................................. 92 Data-Party............................................................................................................................... 92 Properties Referenced ..................................................................................................... 92 Data-Portal.............................................................................................................................. 92 Properties Referenced ..................................................................................................... 92 ECorp-Data-LineItemDetails ............................................................................................... 92 Properties Referenced ..................................................................................................... 92 ECorp-Data-Order ................................................................................................................. 92 Properties Referenced ..................................................................................................... 92 Reports ......................................................................................................................................... 93 List Views ................................................................................................................................ 93 Summary Views ..................................................................................................................... 93 Correspondence ......................................................................................................................... 93 Acknowledgement Email ...................................................................................................... 93 Integration................................................................................................................................... 93
Personal Edition Developer FastStart Guide

Services ................................................................................................................................... 93 Connectors .............................................................................................................................. 94 Decisions ...................................................................................................................................... 94 Tables....................................................................................................................................... 94 VPApproveOrder ............................................................................................................... 94 Trees ........................................................................................................................................ 94 ManagerReview ................................................................................................................. 94 Map Values.............................................................................................................................. 94 Whens ...................................................................................................................................... 95 ReportFilter ........................................................................................................................ 95 ItemPrice ............................................................................................................................ 95 Security ........................................................................................................................................ 95 SLAs .............................................................................................................................................. 95 Activities ...................................................................................................................................... 96 Properties .................................................................................................................................... 97 Declaratives ................................................................................................................................ 98 Expressions ............................................................................................................................. 98 Triggers ................................................................................................................................... 98 pyTrackSecurityChanges ................................................................................................ 98 OnChange ............................................................................................................................... 98 Requirements Matrix ................................................................................................................. 99 Use Case Matrix ......................................................................................................................... 99

Appendix B: The Designer Studio Toolbar and Tab Bar .............. 100
Toolbar Buttons and Functions ............................................................................................. 100 Tab Bar Button and Functions ............................................................................................... 102

Appendix C: Workstation Setup.......................................................... 103


Internet Explorer Settings ..................................................................................................... 103 Temporary Internet Files Settings ................................................................................... 103 Downloaded Program Files ................................................................................................ 104 Other Security Settings...................................................................................................... 104 Performance Tips and Keyboard Shortcuts ........................................................................ 105 Visio Settings ............................................................................................................................ 105 Visio Versions ....................................................................................................................... 105 Setting up Visio to Work With Flows ............................................................................... 106
Personal Edition Developer FastStart Guide

Add Pegasystems as a trusted source of Visio macros .......................................... 106 Alternatively, set macro security to Medium or Low .............................................. 107

Appendix D: Contacting Pegasystems............................................... 109


Education Services .................................................................................................................. 109 Documentation Feedback ....................................................................................................... 109

Personal Edition Developer FastStart Guide

Personal Edition Developer FastStart Guide

Chapter 1: Overview
Welcome to the Personal Edition. This book introduces PegaRULES Process Commander and provides hands-on instructions for modifying an application built on PegaRULES Process Commander. It also introduces terms and skills for application developers. (For brevity, the product is hereafter called Process Commander.) The hands-on tasks involve working with a small application called ESupply. The application allows employees of ECorp to submit purchase order requests using their Web browser and it automates the process of entering, routing, and approving purchase orders. The ESupply application is intentionally incomplete and simplified. Your assignment is to make changes and enhancements to it. The tasks presented in this book show you how to extend the application by adding and modifying rules to meet the needs of ECorp. By following these exercises, you will learn to:
Navigate within the Designer Studio Change the rules to reflect new steps in a business process Create rules that enhance the application user interface and behavior Produce a Microsoft Word document that describes the application and lists its files, functions, and features.

You make the modifications on your Process Commander system in a RuleSet designated for development. This book takes you step-by-step through each modification.

Business Process Management


According to the Business Process Management Group (at www.bpmg.org), Business Process Management (BPM) is the organizational activity "that incorporates: Planning, Designing, Building, Operating, Maintaining, and Improving the business processes and their enabling capabilities forever and for everyone. Business processes are capabilities, as important as facilities, people, and technology. Like all assets they must be managed from inception to retirement. Process Commander supports Simply Smart Business Process Management through rules covering flows, assignments, routing, decisions, and automated processing. Process Commander applications provide process management and automation through six functional capabilities, informally known as the Six R's:
Receiving Accepting and capturing the essential data describing work from multiple sources, including keyboards, scanners, and external systems, in a wide range of media and formats. Routing Using characteristics of the work together with knowledge about the workforce to make intelligent matches and assignments. Personal Edition Developer FastStart Guide

Reporting Providing real-time visibility of work in progress, work completed, productivity, bottlenecks, and quality.

Responding Communicating status, requests for information, and progress to the work originator and to other people involved in the work, by e-mail, fax, written mail, and other means.

Researching Accessing external systems and databases through connectors to support analysis and decision-making.

Resolving Completing the work and updating downstream systems promptly through automated processing and automated support of users,

Process Commander is the only BPM solution that automates both the business rules and the business processes that drive work to completion. Additionally, Process Commander employs a sophisticated common object model to deliver the power of process and practice integration. This integration is achieved without the expense and resources associated with maintaining separate business process and rules databases, user interfaces, test environments, and production environments.

Structure of This Document


This book includes the following chapters and appendices:
Chapter 2 describes how to use the ESupply application. Chapter 3 describes how to improve the application by changing the purchase order request process. Chapter 4 describes how to update the user interface. Chapter 5 reviews all tasks you completed in the previous chapters. Chapter 6 describes how to document your application using Process Commander. Appendix A provides the ESupply application documentation. Appendix B provides a description of the icons and buttons found on the Designer Studio toolbar and tab bar. Appendix C provides additional information that might be useful when setting up your workstation. Appendix D describes how to contact Pegasystems for education services and documentation feedback.

Tip: Print Appendix B and have it available as you go through this book to help you learn about
the toolbar and tab bar buttons.

Personal Edition Developer FastStart Guide

Knowledgebase and Community


The Pega Developer Network (PDN), located at http:/pdn.pega.com, is the primary technical resource area for the PegaRULES Process Commander community. The PDN contains a broad range of technical articles including troubleshooting and how-to information as well as a comprehensive and searchable knowledgebase to help speed application development.

Prerequisites
To follow the steps in the hands-on exercises in this book, you need:
Access to a Process Commander Version 6.1 SP2 system. This specific software version is required to accommodate the ESupply application that is used in the hands-on exercises. The installed Pega-ProcessCommander RuleSet version should not be lower than 06-01-10. Typically, the system administrator for your organization provides access to the organizations installed Process Commander system. The process for obtaining access is determined by your organization. Contact your system administrator to obtain the appropriate access and for assistance in verifying the version of the installed PegaProcessCommander RuleSet. The URL for logging into the Process Commander system. The URL is usually obtained from your organizations system administrator. It is typically in the format: http://<hostname>:<port>/prweb/PRServlet, where <hostname> is the system on which Process Commander is installed and <port> is the assigned port. The URL is case sensitive. The ESupply application, installed into the Process Commander system. To install the application, follow the steps in Appendix D. If your organization has policies on who can install applications into the Process Commander system, contact your organizations system administrator for assistance. Intel-based dual-core processor with at least 4GB of free RAM running a 64-bit version of Microsoft Windows 7 or Vista. Microsoft Visio 2002, 2003, 2007, 2010 (any edition). Microsoft Word 2002 or later is needed to produce the Application document. Microsoft Internet Explorer (IE) version 6.0 SP1 or version 7 or version 8 with current Microsoft security patches, on the workstation. All pop-up blockers (such as those provided by Yahoo! or Google toolbars) must be disabled. Appendix C also describes Internet Explorer and Microsoft Visio settings appropriate for using Process Commander.

Personal Edition Developer FastStart Guide

Chapter 2: Using the Application


This chapter shows you how to use the application to experience it from the worker and manager points of view by:
Creating a purchase order request Approving the purchase order request

In Chapters 3 and 4, you assume the role of a designer and you change the business process, appearance, and functions supported by the application.

Creating a Purchase Order


1. Open your browser to the URL for logging into your Process Commander system. The Process Commander login screen appears (Figure 2-1).
Note: The URL is usually obtained from your organizations system administrator. It is
typically in the format: http://<hostname>:<port>/prweb/PRServlet, where <hostname> is the system on which Process Commander is installed and <port> is the assigned port. The URL is case sensitive.

Figure 2-1. Process Commander Login Screen

2. Log into the system as WorkUser@ECorp.com with the password rules to access the ESupply application. The User portal appears (Figure 2-2).

Personal Edition Developer FastStart Guide

Figure 2- 2. User Portal

If prompted with a Windows Security warning, click Install (Figure 2-3 shows an example). This might occur a few more times as Windows downloads each needed ActiveX control.

Figure 2-3. ActiveX Control Warning

Figure 2-2 shows the portal layout typical for application users who are not managers. It provides access to work, status information, and facilities for searching through both incomplete and completed work. The colors, fonts, and logo you see in this layout are customized for ECorp. Process Commander provides defaults. You can build applications using your companys standards and formats. The area in the portal labeled My Work shows any purchase orders that the WorkUser previously entered that are not processed to completion. This area is known as the users worklist. In the above example, the worklist is empty (displaying the message No matching data was found). Each users worklist contains a list of work items assigned to that user, prioritized by Urgency level.

Personal Edition Developer FastStart Guide

10

Note: You can exit from the ESupply application at any time by clicking the Log Off link at
the upper right of the portal. Log off before closing the browser window. Do not use the Internet Explorer Back button when using Process Commander. Instead, navigate using the tabs and buttons within the portal layout.

3. Select Purchase Order from the New selection box (Figure 2-4).

Figure 2- 4. New Selection Box Purchase Order

A form labeled New Purchase Order appears in the portal workspace. 4. In the New Purchase Order form, select IT from the Department Name selection box. In the Department Number field, enter a number (Figure 2-5). Optionally enter a note in the Note field.

Figure 2-5. New Order Entry Form in the Workspace

5. Click Create at the bottom of the form. This action transmits your input to the Process Commander server and creates a work item according to the purchase order process defined in this application. The system assigns a sequential identifier called the work item ID to the work item. In the work item form displayed in the portal, this ID is visible in the top bar of the form (circled in Figure 2-6). The work

Personal Edition Developer FastStart Guide

11

item form displays for you to enter input. In this application, the work item IDs begin with the prefix P- to identify purchase orders.

Figure 2- 6. Purchase Order Request P-1

6. Click the (close) icon in the upper right corner of the work item form to close it. The worklist refreshes and an assignment row for this work item appears on your worklist. Because additional steps are needed before your tasks with the work item can be completed, a row for this assignment for appears in your worklist. Figure 27 shows a worklist containing one selected assignment row for the purchase order.

Figure 2-7. Purchase Order in the Worklist

An Urgency value is a number between 0 and 100 that indicates the importance (priority) of completing and resolving the work assignments. Here, the ESupply application initially assigns an urgency of 10 to a new assignment. As time passes, the urgency increases, reflecting the priority of completing the assignment. The Instructions column displays a text phrase that indicates what the user needs to do for that assignment. Here, items for the purchase order need to be added to the request.

Personal Edition Developer FastStart Guide

12

Adding Items to Your Purchase Order


1. On your worklist, locate the purchase order you created. Click the ID to reopen the purchase order form for additional processing. The Enter Item Information section appears in the form. 2. In the Item Name column, select an item from the drop-down list. When an item is selected, its price appears in the Price column and the cursor moves to the Quantity field. Enter a number for the quantity to be purchased and press the Tab key. The total charge (price multiplied by quantity) appears for that line item.
Note: Use the Tab key to advance from field to field. Do not use the Enter key, as pressing Enter submits the form.

3. Click the Add a row icon to add another row. Select another item and enter its quantity. If you want, you can add additional rows and more items. Figure 2-8 shows an example.

Figure 2-8. Purchase Order Line Items

Note: If you make a mistake and want to delete an items row, click the garbage can icon
( ) at the right end of the row.

4. Click Submit to move to the next step in the purchase order process (if necessary, use the right-hand scroll bar to bring the Submit button into view).
Personal Edition Developer FastStart Guide

13

5. After clicking Submit, the Confirm Order section appears in the form (note the Confirm Order label circled in Figure 2-9).

Figure 2-9. Purchase Order with Add Shipping Details

To see where this point of the process occurs within the overall process flow, click the Where-Am-I icon . The You Are Here window opens and displays the flow diagram for the process (Figure 2-10). This is the path that this processs work item follow. The shapes in this diagram are types of building blocks in the Process Commander representation of the business process. Common shapes are explained in Chapter 3. Check marks appear next to those process steps that the work item has passed through and are complete. Following the diagram from the top downward, the work item was created, then was assigned to the Current Operator, which is WorkUser here. That first assignment shape (green rectangle) labeled Enter Data Information corresponds to the form where a user must select some items and the quantities before the work item can continue through the process. When you clicked the Submit button, the work item moved to the next assignment shape, the one labeled Confirm Order. The arrow shape indicates the current step of the flow. The P-1 work item is at the Confirm Order assignment.

Personal Edition Developer FastStart Guide

14

Figure 2-10. Location of Request in Process Flow

An assignment shape corresponds to a human-based step in the flow. Assignments are points in the process that are to be handled by a person (to provide input or take other actions). Here, the Confirm Order assignment shape is where a user confirms the order and adds shipping details to the purchase order request. 6. Close the You Are Here window. 7. Select the Add Shipping Details check box. The Shipping Information fields appear in the form (Figure 2-11). 8. Enter the shipping information for your purchase order.
Note: Use the Tab key to advance from field to field. Do not use the Enter key, as that
submits the form.

Personal Edition Developer FastStart Guide

15

Figure 2-11. Shipping Details

9. Click Submit. The Confirmation section appears (Figure 2-12). The Status in the form says Pending-Approval, and the line in the Confirmation section shows that the work item has gone to a manager for approval. An assignment for the approval request is placed on the managers worklist.

Personal Edition Developer FastStart Guide

16

Figure 2-12. Confirmation of Purchase Order

In the ESupply Purchase Order process, the purchase order request automatically routes to a manager for approval when the order total is greater than $100. (You can test this by creating a second purchase order request with a total of $100 or less.) 10. Close the form by clicking the Off to log out of the portal. (close) icon in the form. Then click Log

Personal Edition Developer FastStart Guide

17

Approving the Purchase Order Request


Managers or supervisors have access to all of the facilities available to application users and more. In this sample application, managers have the ability to approve or reject certain purchase orders. 1. Log into the system as Manager@ECorp.com with the password rules to access the ESupply application as a manager. The Manager portal appears (Figure 2-13).

Figure 2-13. Manager Portal

Managers use different portal gadgets and tools than their staff members do. As you are acting as a manager, you may be prompted with a Windows warning regarding one or a few additional ActiveX controls. Click Install each time. Figure 2-14 shows an example.

Personal Edition Developer FastStart Guide

18

Figure 2-14. ActiveX Control Warning

2. Click the Process Work bar (bottom left of the portal) to change the work space on the right. The managers worklist appears in the portal.

Figure 2-15. Managers Worklist

3. Find the purchase order that you entered most recently as the WorkUser. Hold the mouse pointer over its row to see Smart Info details for that purchase order (Figure 2-16).

Figure 2-16. Worklist Item and Smart Info Pop-Up Details Personal Edition Developer FastStart Guide

19

4. Click the purchase orders work item ID to open it so that you can act on it (Figure 2-17).

Figure 2-17. Take Action Form

5. Click Approve to approve the purchase order request. The ESupply application displays a confirmation form (Figure 2-18). The resolved status indicates the business process is complete.

Figure 2-18. Work Item Confirmation

Note: In this flow, after a manager Approves (or Rejects) the purchase order request, the
work item becomes resolved with a status of Resolved-Completed (or Resolved-Rejected). Personal Edition Developer FastStart Guide

20

Other gadgets in the Manager portal allow managers or supervisors to review staff members worklists, transfer work between staff members, and review real-time reports about progress, volume, backlogs, and trends. 6. Close the form by clicking the Off to log out of the portal. (close) icon in the form. Then click Log

Personal Edition Developer FastStart Guide

21

Chapter 3: Improving the Application


In this chapter, by working as a developer, you will extend the purchase order process to require a second approval on some purchase orders. To make the application more closely match ECorps business practices, you will modify the process flow to require a Vice Presidents (VP) approval for those purchase order requests that meet all of the criteria for any row of the following table (Figure 3-1). At least one row must match the criteria for the purchase order to go to the VP for approval.
Dept Name
IT HR Finance Finance Legal Legal IT No Yes Yes No No >$200 >$200

Bill Customer

Order Total
>$1,000 >$500

>$200 >$2,000

Figure 3-1. ECorp Purchase Order VP Approval Criteria

For example, according to the third row of the criteria table:


If
The Department Name in the submitted purchase order is set to Finance And The Bill Customer check box is unchecked (clear)

Then
VP approval is required, regardless of the total amount of the order

However If
The Department Name is set to Finance The Bill Customer check box is checked The Order Total is $199.00 None of the rows contain criteria that are all met. In this case, no VP approval is required

When you complete the changes to the application to implement this policy, the revised process diagram will look like Figure 3-2, with the added shapes shown within the dashed red lines.

Personal Edition Developer FastStart Guide

22

Figure 3-2. Revised Process Flow Diagram

Personal Edition Developer FastStart Guide

23

Changing the Purchase Order Request Process


Follow these steps to learn about the Process Commander Designer Studio. The Designer Studio is the portal in which application designers and developers perform their work. 1. Log into the system as Designer with the password password to access the Designer Studio. If prompted with a Windows Security warning, click Install (Figure 3-3 shows an example). This might occur a few more times as Windows downloads each needed ActiveX control.

Figure 3-3. ActiveX Control Warning

The Designer Studio opens (Figure 3-4).

Figure 3- 4. Designer Studio

The Application Explorer in the left panel provides quick access to this applications rules. It presents a multi-level tree structure to browse for and perform operations on rules. Rules are organized into Process Commander rule categories. For example, the ESupply application contains the Purchase
Personal Edition Developer FastStart Guide

24

Order class which contains rules that belong to various rule type categories such as Process, Decision, and User Interface (Figure 3-5).

Figure 3-5. Process Rule Category in Application Explorer

2. Open the PurchaseOrder flow rule (Figure 3-6): a. Click the + icon to expand the PurchaseOrder class and see the categories it contains (Figure 3-5). b. Click the + icon to expand the Process category it contains. c. Click the + icon to expand the Flow rule type. d. Click the PurchaseOrder link to open the flow rule. (In the Application Explorer, a green arrow icon ( ) preceding a name indicates a starting flow rule. A blue dot icon ( ) preceding a name identifies a single rule.) to see the rule types

Figure 3-6. PurchaseOrder Flow Rule in Application Explorer

Personal Edition Developer FastStart Guide

25

Note: If Windows presents an additional ActiveX warning, click Install to accept.

The Flow rule form for the PurchaseOrder process opens (Figure 3-7).

Figure 3-7. PurchaseOrder Flow Rule

Process Commander has dozens of rule types; each type is identified in the text label at the upper left of the corresponding form (in this case, FLOW). Tabs provide access to individual fields on the form, and tools on the toolbar operate on the rule. The PurchaseOrder flow rule is marked read-only ( ), so you cannot alter this instance directly. Instead, you will save a copy of this flow rule into a RuleSet named ESupply with a higher RuleSet Version of 01-01-03. Then you make updates to the new copy.

Personal Edition Developer FastStart Guide

26

3. Click Save As to save a copy of the process flow rule into the ESupply:01-01-03 RuleSet Version. A SaveAs Rule Instance dialog opens (Figure 3-8).

Figure 3-8. Save Rule Instance Dialog

The two fields labeled Applies To and Flow Type identify the keys of the flow rule. Do not alter the values in these fields. The new flow rule should use the same keys as the original you are copying. 4. Select ESupply from the RuleSet drop-down list. The Version field defaults to 01-01-03. 5. Click Save As. The next steps change the Purchase Order flow to include a decision shape that determines whether the VP must approve a purchase order request. A decision shape, represented in the flow diagram by an orange diamond, identifies an automatic step where processing may advance along any one of two or more outcomes. In this case, the decision shape has two outcomes:
VP approval is required (True) VP approval is not required (False)

6. Click the Flow Editor toolbar icon ( the Visio Flow Editor.

) as shown in Figure 3-9. This opens

Personal Edition Developer FastStart Guide

27

Figure 3-9. PurchaseOrder Flow Rule and Flow Editor Button

Note: When the Visio Flow Editor opens, it may display a security warning (Figure 3-10). If
it does, select Always trust macros from this publisher and then click Enable Macros. If the Enable Macros button remains disabled, your Visio security settings are set too high. In that case, close the dialog box. Update Visio as described in Appendix C and try again.

Personal Edition Developer FastStart Guide

28

Figure 3-10. Visio Macro Warning

When Visio opens, it displays the flow diagram as shown in Figure 3-11.

Figure 3-11. Visio Flow Diagram

The blue rectangle at the top of the flow diagram identifies the start of the business process where a new purchase order request is created. Processing of each purchase order proceeds along the connectors from shape to shape.
Personal Edition Developer FastStart Guide

29

The three green rectangles with clocks on them mark assignment shapes (Enter Item Information, Confirm Order, and Manager Approve Order). Assignments are the steps in the process that require a human actor (here, a user or manager) to enter information or record their decisions. The orange diamond shape labeled ManagerReview identifies an automated decision. In this process, the automated decision has two outcomes: True or False.
Note: The Visio tool contains a Flow Properties panel where you can choose which stencil to
use to depict the flow. Each stencil has shapes that correspond to that stencil in terms of color, borders, etc. The default is the FlowStandard stencil. If you choose a different stencil in the drop-down list, the flow diagram in the Flow Editor refreshes to reflect that stencils shapes.

The Visio tool contains a Visio Shapes panel that displays the 18 Process Flow shapes that Process Commander uses for the selected stencil (Figure 3-12). Each shape has a descriptive ToolTip. (If the names under the icons do not display, right click on the Shapes heading and select Icons and Names from the context menu).

Figure 3-12. Process Flow Shapes and the Shapes Context Menu

Note: While using Visio, you can click the Undo button (

) on the toolbar to reverse the

most recent action. Do not attempt to log off while Visio is active.

Personal Edition Developer FastStart Guide

30

7. Add a decision shape to the process flow below the existing ManagerReview assignment shape as follows: a. Click and drag a decision shape flow diagram. from the Shapes stencil onto the

b. Position the decision shape below the Manager Approve Order assignment shape (Figure 3-13).

Figure 3-13. Position of Decision Shape

8. Click on the decision shape to select it. The Decision Properties panel appears above the Shapes panel to the left of the process flow. 9. In the Decision Properties panel, specify the following items as shown in Figure 3-14: a. Select Decision Table as the Type. b. Enter VPApproveOrder (with no spaces) in the Rule field. c. The Name field is arbitrary and may contain spaces. Accept the default value (which Process Commander copies from the Rule field) by doing nothing, or enter other brief text to identify this task.

Figure 3-14. Decision Properties Panel Personal Edition Developer FastStart Guide

31

At this point, the flow rule references a decision table rule, but the decision table rule does not yet exist. Next, youll create that rule. 10. In the Decision Properties panel, click the Open icon ( ) next to the VPApproveOrder Rule field to create a new decision table rule with that name. A New Rule Instance window appears (Figure 3-15).

Figure 3-15. New Rule Instance

11. Confirm or enter the following:


Do not change the Applies To field. The Purpose field should be VPApproveOrder; if not, change it The RuleSet should be ESupply; if not, change it The Version should be 01-01-03; if not, change it

12. Click Create. The Decision Table rule form appears (Figure 3-16).

Figure 3-16. Decision Table Rule Form

Personal Edition Developer FastStart Guide

32

Defining a New Decision Table Rule


1. In the Decision Table rule form, click the Results tab to bring it to the front (Figure 3-17). Complete two rows of the Allowed Results array to identify the allowed results for this decision table. In this case, the allowed results are:
True: This purchase order requires VP approval False: This purchase order does not require VP approval

Figure 3-17. Results Tab

When completing arrays, click: to add a new row at the bottom of the array to insert a new row between existing rows to delete a row
Note: No changes are needed to the Set Properties?, Options, or Preset Property
Values areas of this tab.

2. Click the Table tab to bring it to the front. In this tab, you record the decision table logic as presented previously in Figure 3-1:
Dept Name
IT HR Finance Finance Legal Legal IT No Yes Yes No No >$200

Bill Customer

Order Total
>$1,000 >$500

>$200 >$200 >$2,000

Personal Edition Developer FastStart Guide

33

3. The decision table in this example has three inputs that are identified by property rules: DepartmentName, BillCustomer, and OrderTotal. Each column in the decision table (except the Return column) corresponds to a property. Use these steps to complete the Table tab: a. Click the column heading cell (the cell just below the Conditions column title) to label the column in the matrix. A Property Chooser popup window displays (Figure 3-18).

Figure 3-18. Decision Table Rule Decision Property Chooser

Note: The green triangle at the bottom right corner of the Property input field is a
SmartPrompt control. SmartPrompts appear on many rule and data forms to provide a selection list available for fast entry. To complete a field that contains this control, press your keyboards Down Arrow key ( ) t o a cc e s s t h e lis t . Fo r t h e Pr o p e r t y fie ld h e r e , t h is SmartPrompt control displays a list of available property rules that you can select.

b. With the cursor in the Property field, press the Down Arrow key () to use the SmartPrompt control to access a list of the available properties. Continue pressing the Down Arrow key to scroll down the list until you see the DepartmentName property. When DepartmentName is highlighted, press Enter to enter it into the field. (Figure 3-19). You can also double-click the property name to enter it.

Personal Edition Developer FastStart Guide

34

Figure 3-19. Select a Property in the Decision Table Property Chooser

After you choose the DepartmentName property, the Label field displays a default value. c. Click Save to save the property to the decision table matrix. 4. The starting table contains a single input conditions column. You need to add two columns; one for the BillCustomer property and one for the OrderTotal property. To add a column to the right of the starting column: a. Click the cell under Department Name to select that column (Figure 320).

Figure 3-20. Decision Table Rule Adding a Column (before)

b. Click the Insert Column After icon ( ). A new column appears to the right of the starting column. Do this again to add a second column (Figure 3-21).

Personal Edition Developer FastStart Guide

35

Figure 3-21. Decision Table Rule Adding a Column (after)

5. Add the BillCustomer and OrderTotal properties (Figure 3-22) to the columns using the Property Chooser (Figure 3-19).

Figure 3-22. Decision Table Rule Labeling a Column

6. Enter the first decision criteria as shown in Figure 3-1 to complete the first row of your decision table, following these steps: a. In the first cell under Department Name, click on the cell. The SmartPrompt appears in the cell. Use the SmartPrompt (press the Down Arrow key) to display the selection list and enter the name IT. b. Under Bill Customer, leave the entry blank for this row. c. Enter >1000 for the entry under Order Total. You can omit the dollar sign, commas, and pennies in the amount. d. In the Actions Return column, select True for the value (Figure 3-23). There are only two allowed return actions, True and False, which are defined by the results that you specified earlier on the Results tab.

Figure 3-23. Decision Table Rule First Row Completed

7. Enter additional rows by clicking the Insert Row After icon 24).

(Figure 3-

Personal Edition Developer FastStart Guide

36

Figure 3-24. Decision Table Rule Empty Rows Added

8. Using Figure 3-1 as your guide, complete the table so it looks like Figure 325. In the Bill Customer column, enter =False for No and =True for Yes. In the otherwise (final) row, set the return action to False.

Figure 3-25. Decision Table Rule Completed

9. Click Save ( ) to save the updated decision table rule. An icon at the top of the form indicates that the rule was saved, but with a warning. 10. Scroll down to read the warning message at the bottom of the rule form. Click Show Conflicts to check this rule for logic consistency (Figure 3-26). One logic error appears in the bottom row (indicated by a warning icon ). The bottom row contains an unreachable condition. It has a combination of input values that cannot be used. The top row is reached first (IT and order total > 1000) and masks the bottom row (IT and order total > 2000).

Personal Edition Developer FastStart Guide

37

Figure 3-26. Decision Table Rule Logic Errors

11. To delete a row, click in any cell in the row to select the row, then select the Delete Row icon . Click Show Conflicts again to confirm that no logic errors remain. A message displays The Decision Table is consistent. 12. Save the revised decision table and close the rule form by clicking the red arrow in its tab ( ). You are returned to the Visio Flow Editor.

Editing the Flow


1. In Visio Flow Editor, in the Decision Properties panel, click Apply to apply the properties to the decision shape. Process Commander automatically presents the True and False return values as connectors from the decision shape (Figure 3-27).

Figure 3-27. Visio Updates

2. Now you will redirect the flow action (connector) from the Manager Approve Order assignment shape to the VPApproveOrder decision shape, following the steps below: a. Click the ManagerApprove connector that starts at the Manager Approve Order assignment shape and ends at the UpdateStatus Completed utility shape. b. Click the red square connected to the UpdateStatus Completed utility shape, drag the arrow head of the connector to the top of the VPApproveOrder decision shape, and connect the arrow head to the
Personal Edition Developer FastStart Guide

38

point at the top of the decision shape (Figure 3-28). If the ManagerApprove label does not appear, pull the decision shape down to reveal it.

Figure 3-28. Visio Updates

This connection means that the business process requires a decision after a purchase order request is approved by the manager. 3. Select and drag an assignment shape from the Shapes stencil and drop it below the decision shape, so that purchase order requests can be routed to the Vice President. Position the assignment shape below the VPApproveOrder decision shape (Figure 3-29).

Figure 3- 29. Assignment Shape

4. With the assignment shape selected, complete the Assignment Properties panel as shown in Figure 3-30. In the HarnessPurpose field, use the SmartPrompt to select PerformManager. (A Process Commander harness rule provides the basis of a form for work item processing.)
Personal Edition Developer FastStart Guide

39

Figure 3-30. Assignment Properties

Note: The blue triangles that appear at the bottom right corners of the fields are
SmartPrompt controls. In the HarnessPurpose field, press the Down Arrow key to access the appropriate list. The top items in the lists are ones specific to the ESupply application.

5. In the StatusWork field, use the SmartPrompt to select Pending-Approval. Enter text into the Name, Instructions, and ConfirmationNote fields. Then click Apply to apply these inputs to the assignment shape. 6. Add a router shape to the VPApproval assignment shape so that the purchase order is routed to the user identified by the Operator ID VP@ECorp.com (Figure 3-31): a. Select and drag a router shape flow diagram. from the Shapes stencil onto the

b. Connect the router shape to the VPApproval assignment shape.

Personal Edition Developer FastStart Guide

40

Figure 3-31. Router Shape

7. Select the router shape. In the Router Properties panel, in the Rule field, use the SmartPrompt control to select ToVP (Figure 3-32) and click Apply. (The system automatically sets the Name field to match the Rule field.)

Figure 3-32. Router Properties

Note: The blue triangle at the bottom right corner of the Rule field input box is a
SmartPrompt control. Press the Down Arrow key to access the list. This SmartPrompt displays a list of router rule names from which you can select.

8. The True and False connectors from the decision shape are currently dangling or unattached to other shapes. Process Commander uses red connectors to indicate that they are not attached to a shape. Follow the steps below to attach the connectors. a. Attach the True connector to the VPApproval assignment shape to send the purchase order request to the Vice President for approval when the decision table calculates a return value of True. b. Attach the False connector to the UpdateStatus Completed utility shape . When the decision table rule returns a value of False, the Vice Presidents approval is not required. The following events occur automatically:
Personal Edition Developer FastStart Guide

41

The requests status is updated to Resolved-Completed. The purchase order request is resolved.

Figure 3-33 shows all the shapes connected correctly.

Figure 3-33. True / False Connector

9. Add connectors leading from the VPApproval assignment shape by following these steps: a. Click the connector shape in the Shapes stencil and drag it anywhere on the flow diagram. (Typically, it is convenient to put the connectors somewhere in the white space near where you plan to attach them.) b. Repeat to add a second connector (Figure 3-34).

Figure 3-34. Unattached Connectors

c. Attach the tail (top) ends to the bottom of the VPApproval assignment shape. d. Connect one connector head to the UpdateStatus Completed utility shape. e. Connect the second connector head to the UpdateStatus Rejected utility shape (Figure 3-35).

Personal Edition Developer FastStart Guide

42

Figure 3-35. Connectors from VPApproval Assignment Shape

10. The newly added connectors are labeled [no data] because their properties are not yet defined. Select the connector that ends on the UpdateStatus Completed utility shape. In the Connector Properties panel, define the connector properties for this connector. a. In the Flow Action field, use the SmartPrompt to select ManagerApprove (Figure 3-36).

Figure 3-36. Manager Approve Connector Properties

b. In the Likelihood field, enter 75. (Process Commander uses the likelihood values to determine the order of actions in the action list in the user interface.) c. Click Apply. 11. Complete the Connector Properties panel for the connector that leads to the UpdateStatus Rejected utility shape. a. In the Flow Action field, use the SmartPrompt to see the list of available choices. Double-click on More to expand the list (Figure 3-37).

Personal Edition Developer FastStart Guide

43

Figure 3- 37. SmartPrompt More Choice

b. Scroll down and select the Reject choice (Figure 3-38).

Figure 3- 38. Reject Flow Action Choice

c. In the Likelihood field, enter 25 (Figure 3-39). (A likelihood is a value between 1 and 100. It reflects an assumed or known probability of the human actor taking that action.)

Personal Edition Developer FastStart Guide

44

Figure 3-39. Reject Connector Properties

d. Click Apply. 12. Click anywhere in white space in the Visio work area. Confirm that none of the connector arrows are red, including the small boxes at the arrow head and arrow tail. Process Commander marks incomplete connectors in red and floating connectors (those with both head and tail unconnected) in gray. Drag the connector arrows to connect them to the shapes if necessary. Your diagram should look like Figure 3-2. 13. Click to save your flow changes. If errors appear, fix the errors to correct the diagram and then re-save it. 14. Exit the Flow Editor by clicking Return rule form. . The display returns to the flow

15. Test your process changes using the Run menu. Click the Run icon ( ) in the Quick Launch bar and create a new purchase order request (Figure 340). You do not need to log out, but can act as the work user, manager, and VP.

Figure 3-40. Run Menu from Quick Launch Bar

Personal Edition Developer FastStart Guide

45

To complete the test, do the following: a. Create a new purchase order request, using data values similar to those entered in the example in Chapter 2. b. Enter line items and quantities that produce a total amount that meets one of the criteria for requiring VP approval as shown in Figure 3-1. For example, if the Department is IT, any order over $1000 requires the VPs review. c. Confirm the purchase order request. d. Click the link displayed at the bottom of the confirmation note that indicates the purchase order is assigned to the manager (Figure 3-41).

Figure 3-41. Purchase Order Sent for Manager Approval

e. As manager, approve the request. f. Verify that after the manager approves the purchase order request, the request is routed to the Vice President for approval.

Of course, more complete testing of every condition in the decision table rule is required in real-world development situations. You may log off now or continue with the next chapter. To log off, click the Logout link in the upper right area of the Designer Studio.

Personal Edition Developer FastStart Guide

46

Chapter 4: Updating the User Interface


Currently, the Vice President sees the same user interface as the manager when approving or rejecting a purchase order request. However, ECorps business policy requires the VP to enter an approval code. The business policy also gives the VP the option to enter a note about the approval. In this chapter you will enhance the user interface to enable the VP to enter these details.

Building a New Flow Action rule


Recall from Chapter 2 that assignments are points in the process that are to be handled by a person (to provide input or take other actions). Rules known as flow actions determine which inputs are requested from the user in the work item forms Take Action area when the user is completing the assignment. To provide the VP the opportunity to enter input during the VPApproval assignment, a new flow action rule is needed to implement those details. 1. Log in as Designer with the password password, as in Chapter 3. 2. From the Application Explorer tree in the left panel, locate the Flow Action rule type: a. Click the + icon to expand the PurchaseOrder class. b. Click the + icon to expand the User Interface category Flow Action rule type. to see the

3. Right-click on Flow Action and select New from the context menu (Figure 41).

Figure 4-1. Flow Action Context Menu

The New Rule Instance window opens (Figure 4-2). Specify the following: a. Keep the Applies To value as it is.
Personal Edition Developer FastStart Guide

47

b. For the Action Name, enter VPApprove. c. For the RuleSet, select ESupply. d. For the Version, select 01-01-03.

Figure 4-2. New Flow Action Rule Instance

4. Click Create to create the new VPApprove flow action and display the rule form in the Designer Studio. Click Save action rule to the system (Figure 4-3). to save the VPApprove flow

Figure 4-3. VPApprove Flow Action Rule Form

At this point the new VPApprove flow action rule displays no user interface items for the VP to enter information. Section rules are used to implement these user interface features for a flow action.

Building a Section rule


1. From the Application Explorer tree in the left panel, locate the Section rule type: a. Click the + icon to expand the PurchaseOrder class.
Personal Edition Developer FastStart Guide

48

b. Click the + icon to expand the User Interface category Section rule type.

to see the

2. Right-click on Section and select New from the context menu (Figure 4-4).

Figure 4-4. Section Context Menu

The New Rule Instance window opens (Figure 4-5). Specify the following: a. Keep the Applies To value as it is. b. For the Purpose, enter VPApproval. c. For the RuleSet, select ESupply. d. For the Version, select 01-01-03.

Figure 4-5. New Section Rule Instance

Personal Edition Developer FastStart Guide

49

3. Click Create to create the new VPApproval section and display the rule form in the Designer Studio (Figure 4-6). An initial layout appears on the Layout tab. Click Save to save the VPApproval section rule to the system.

Figure 4-6. VPApproval Section Rule Form

The first update is to add a field where the VP is required to enter an approval code. 4. Click the first empty cell in the first Label column and click the magnifying glass icon ( ) that appears. In the Cell Properties panel that opens, enter the text Approval Code in the Value field as shown in Figure 4-7. On the General tab, select the Required box. This selection will display a required icon ( ) next to the label in the user interface. Click OK to save these choices to the section layout.

Figure 4- 7. Adding the Approval Code Label on the VPApproval Section

5. Click the Basic control group ( ) to open the Basic panel. Select the Text Box item and drag it to the Field column cell next to the Approval Code on the top row as shown in Figure 4-8.
Personal Edition Developer FastStart Guide

50

Figure 4- 8. Add the Text Box Field

6. Click the magnifying glass icon ( ) next to the Text Box cell. This opens a Cell Properties panel (Figure 4-9).

Figure 4-9. Text Box Field Cell Properties Panel

7. In the Cell Properties panel, specify the following items: a. In the Property field, enter .ApprovalCode (using the exact case and being sure to include a leading period).

Personal Edition Developer FastStart Guide

51

b. Click the Open icon ( ) next to the Property field. This opens a Properties New Rule Instance dialog (Figure 4-10).

Figure 4-10. New Property Rule Instance

c. Make sure that ESupply is selected in the RuleSet field and that 0101-03 is selected in the Version field. Click Quick Create to create the new property rule. d. Return to the Cell Properties panel, select the General tab, and click the Required box. This ensures that a value is entered in the work form before it is submitted. Otherwise, an error message appears and reminds the user to enter a value. Click OK. 8. In the Layout tab of the Section rule form, click the cell on the second row of the Label column (under the Approval Code label). Open the Cell Properties Panel (by clicking OK. ) and enter Note in the Value field. Click

9. From the Basic panel, drag a Text Area item to the cell in the second row Field column to the right of the Note label, as shown in Figure 4-11.

Personal Edition Developer FastStart Guide

52

Figure 4-11. Add the Text Area Field

10. Open the Cell Properties panel for the newly added text area. In the Cell Properties panel, specify the following items: a. In the Property field, use the SmartPrompt (by pressing the Down Arrow key) to display a list of available properties (Figure 4-12). Select ApprovalCode from the list, to set it as the value for the Property field, and click Apply.

Personal Edition Developer FastStart Guide

53

Figure 4-12. Property List from SmartPrompt

b. In the Control field, use the SmartPrompt to select pxTextInput (Figure 4-13).

Figure 4-13. TextAreaWithExpand Format Option

c. Click OK to save the selections for the text area and close the Cell Properties panel. 11. Close the Basics panel by clicking the X in its upper right corner, and click Save ( ) to save your changes to the Section rule form.

Personal Edition Developer FastStart Guide

54

12. Click the VPApproval tabs close button ( ) to close the VPApproval sections rule form.

Adding a Section rule to a Flow Action


Now that the section is created, add it to the VPApprove flow action so that the approval code and note user interface elements are displayed in the Take Action area when the VP completes the assignment. 1. Return to the VPApprove flow action rule form by clicking on its tab in the Designer Studio (Figure 4-14).

Figure 4-14. VPApprove Flow Action Rule Form

2.

In the Application Explorer, expand the Section rule type to locate the newly created VPApproval section. Select the blue dot ( ) to the left of the VPApproval section in the Application Explorer and drag it into the VPApprove rule form to where <drag section here> is displayed (Figure 415). (Each blue dot identifies a single rule.)

Figure 4-15. Drag VPApproval Section into VPApprove Flow Action

The VPApprove flow action rule form displays a section reference that references the VPApproval section and its user interface elements (Figure 4-16).

Personal Edition Developer FastStart Guide

55

Figure 4-16. VPApprove Flow Action with Section Reference to VPApproval

3. 4.

Save the VPApprove flow action by clicking

Click Preview ( ) to see the runtime presentation of the new flow action rule, at the bottom of the window (Figure 4-17).

Figure 4-17. User Interface Preview of Flow Action

5. 6.

Click the X button at the top right of the Preview area to close it. Click the VPApprove tabs close button ( ) to close the VPApprove flow actions rule form.

Editing the Flow


At this point, the new flow action VPApprove is complete, but not referenced by any shape in the flow rule. In this section you will use the Flow Editor again to update the PurchaseOrder flow, so that the new VPApprove flow action runs when the VP approves a purchase order request.

Personal Edition Developer FastStart Guide

56

1. 2.

Open the PurchaseOrder flow using the Application Explorer. Click the Flow Editor toolbar button . Replace the ManagerApprove flow action (a connector) that starts at the VPApproval Assignment shape with the new VPApprove flow action, following these steps: a. Select the ManagerApprove connector that starts from the VPApproval Assignment shape (Figure 4-18).

Figure 4-18. ManagerApprove Connector Selected

b. In the Connector Properties panel, for the Flow Action field, use the SmartPrompt to replace ManagerApprove with VPApprove.

Figure 4-19. Connector Properties for VPApprove

c. Click Apply in the Connector Properties panel. The connector in the flow is now labeled VPApprove (Figure 4-20).

Figure 4-20. VPApprove Connector from VPApproval Assignment

Personal Edition Developer FastStart Guide

57

d. Click Save (

) to save your changes.

e. Click Return to close the Flow Editor and return to the PurchaseOrder rule form. 3. Test the revised process to verify that the VP is now required to enter an Approval Code and an optional note when approving a purchase order request. To complete the test, do the following steps: a. Click the Run icon ( ) in the Quick Launch bar and select Run Process > Purchase Order. b. Create a purchase order request that requires VP approval. The requirements are stated in the decision rule table you created in Figure 3-25. For example, enter HR as the Department Name and select one laptop, which requires VP approval because it is over $500. c. As manager, approve the request. d. Click the VP Approval Required link. The VP sees the Take Action box shown in Figure 4-21.

Figure 4-21. Take Action for VP

When the VP clicks the VPApprove button, the approval screen appears. The VP is now required to enter an approval code and may also enter an optional note (Figure 4-22).

Personal Edition Developer FastStart Guide

58

Figure 4-22. Approval Code

e. Enter a note and click Submit to finish the process.

Adding a Data Field


When approving purchase order requests, the Vice President would like to add a payment date. To support this requirement, add a Payment Date field to the Vice President Approval form. 1. Log in as Designer with the password password. 2. In the Application Explorer, the section that you created earlier (VPApproval) appears as part of the User Interface category. Click the VPApproval section link to open the rule (Figure 4-23 and Figure 4-24).

Figure 4-23. VPApproval Section

Figure 4-24. VPApproval Section Current Form

3. Select the Approval Code cell and then click the Insert Row After button to insert a new row below the Approval Code row (Figure 4-25).
Personal Edition Developer FastStart Guide

59

Figure 4-25. Section Insert Row After Button

4. A property rule named PaymentDate already exists. Add this property to the new row following these steps: a. In the Application Explorer, click the + icon to expand the PurchaseOrder class. b. Click the + icon to expand the Data Model category Property rule type. to see the

c. Click the + icon to expand the Property rule type (Figure 4-26). Each blue dot ( ) identifies a simple property rule, one that holds only a single value such as a date or amount. Other icons in this tree, such as , identify aggregate properties, which are similar to arrays and structures. d. Select the blue dot to the left of the PaymentDate link. (Do not click the PaymentDate link.)

Figure 4-26. Payment Date Using an Existing Property

e. Hold the mouse button down, and drag the property onto the VPApproval section rule form (Figure 4-27). Drop the property into the Field cell (second column) of the new row.

Figure 4-27. Payment Date Label and Entry Field

Personal Edition Developer FastStart Guide

60

The cell now contains the .PaymentDate property. This property holds a date and time. Process Commander supports a wide variety of input and output formats for dates and times. 5. In the Label column, open the Cell Properties panel for the PaymentDate label cell (click ). In the Value field, insert a space so that the label is two words (Payment Date) as shown in Figure 4-28. Click OK to save the change to the form.

Figure 4-28. Label for Payment Date Property

6. Click the cell in the Field column next to the Payment Date label, and open the Cell Properties panel by clicking .

7. Click the icon next to the Control field (Figure 4-29). The Param Window opens (Figure 4-30).

Figure 4-29. Display As Selection

Personal Edition Developer FastStart Guide

61

Figure 4-30. Param Window for Display As

8. Complete the fields in the Param window following these steps: a. Select DateTime for the Format field. (SmartPrompt is available.) b. Click Params and in the Parameters section, select display parameters for the DateTime format (Figure 4-31):
Set the Display Mode field to Popup window. Select the Calendar Icon check box. This selection provides a calendar control icon in the work tem form that the users can click to select a date. Select the Allow Text Field Entry check box. This selection provides a text field in the work item form in which users can type to enter a date.

Personal Edition Developer FastStart Guide

62

Figure 4-31. Param Window for DateTime Property Display Settings

9. Click OK in the Param window to save the display format selections to the Cell Properties panel. The Param window closes. 10. In the Cell Properties panel, click OK. 11. Click the Save toolbar button rule form. to save the updated VPApproval section

12. Click the Preview toolbar button to view the effect of your changes in the bottom half of the portal (Figure 4-32).

Personal Edition Developer FastStart Guide

63

Figure 4-32. Preview of Changes

13. Test the changes, following these steps: a. Click the Run icon ( ) in the Quick Launch bar and select Run Process > Purchase Order. b. Choose order quantities that will require Vice President approval. c. Enter shipping details and complete the manager approval step. d. As Vice President, confirm that the payment date is requested (the Payment Date field is displayed). e. Click the calendar icon to enter a date and time.

Inspecting Declarative Rules


This application calculates several properties with declarative rules, which are rules that define calculations among property values. For example, each LineItemTotal is the value of the items Price multiplied by Quantity. To see the list of declarative rules, go to the Application Explorer, select the ECorpFW-ESupply-Work class, expand the Decision category, and then expand the Declare Expressions category as shown in Figure 4-33.

Personal Edition Developer FastStart Guide

64

Figure 4-33. Declare Expressions in Application Explorer

To open a rule from the Application Explorer, click on the rule name. Figure 4-34 and Figure 4-35 show the .OrderTotal and LineItemTotal.Order() rule forms respectively. The dashed lines in the figures enclose the property values for each rule.

Figure 4-34. Declarative Expression for .OrderTotal

Figure 4-35. Declarative Expression for .LineItemTotal

Like formulas in a Microsoft Excel spreadsheet, properties controlled by declarative rules are computed automatically whenever a value changes that affects the computation. For example, the target property LineItemTotal is computed whenever the Price or Quantity changes. Similarly, you dont need to create an explicit program to recalculate the OrderTotal after you input a quantity.

Personal Edition Developer FastStart Guide

65

Using the Declarative Rules Inspector


You can use the Declarative Rules Inspector to see which properties in the work item form are dependent upon these rules, and to graphically illustrate those dependencies. 1. To enable the Declarative Rules Inspector, click the Run icon ( ) in the Quick Launch bar and select Rules Inspector > Declarative Rules (Figure 4-36).

Figure 4-36. Declarative Rules Inspector

2. Create a new purchase order request by selecting > Run Process > Purchase Order. On the work item form, a D link appears next to each property that is calculated by a declarative rule. For example, assume that you select the Laptop item and enter two for the quantity. Notice that a D appears next to the LineItemTotal property (Figure 4-37). Click the D link to inspect how that property value is calculated.

Figure 4-37. Reviewing Declarative Rules

After clicking the D, the Dependency Network Viewer opens and shows the Dependency Network for the LineItemTotal property (Figure 4-38).

Figure 4-38. Dependency Network Viewer Personal Edition Developer FastStart Guide

66

The symbols shown are described below:


A function symbol ( ) references a declarative rule.

The arrows show how computations depend on each other where results from one computation feed into inputs of a later computation.

Process Commander supports complex declarative rules and lets you test and debug declarative computations interactively. To disable the Declarative Rules Inspector feature, click Inspector > Declarative Rules. > Rules

Personal Edition Developer FastStart Guide

67

Chapter 5: Reviewing Your Application


By following Chapters 3 and 4 in this tutorial, you used rule forms and the flow editor to refine the ESupply application. Process Commander uses sophisticated industrystandard technologies to implement your changes without requiring you to directly specify coding-level details. You do not need advanced IT skills to produce applications that are functional, easy to use, and visually appealing.

Developing Applications by Changing Rules


You created a few new rules in the ESupply RuleSet that include the following:
A decision table rule VPApproveOrder that controls which purchase order requests are routed to the VP for review A property rule ApprovalCode that holds an input value entered by the Vice President A flow action VPApprove that prompts the VP with two new fields after the VP approves a purchase order request A section VPApproval that provides the user interface for the VPApprove flow action

These new rules supplement the original set of rules in the ESupply RuleSet, which defined the application before you changed it. As you will see in Chapter 6, Documenting Your Application, and from the application document in Appendix A, the ESupply RuleSet contains about 125 rules. The Application Explorer provides designers and developers with quick access to rules in the ESupply RuleSet. These rules, in turn, build on hundreds of built-in, out-of-thebox standard rules that are present in every Process Commander system and which form the foundation building blocks of applications.

Technology Under the Covers


If you are familiar with the technologies mentioned below, you can appreciate the power and breadth of Process Commander as a development environment.
A property rule (for example the ApprovalCode property) corresponds to a scalar variable. Flow action rules are converted to HyperText Markup Language (HTML). The Visio representation of a business process is converted internally to an XML (eXtended Markup Language) document that later becomes a Java class. Rules and other data are stored in a relational database supported by any of several popular database products from Oracle, Microsoft, or IBM. Computations such as declarative rules and decision table rules are transformed into efficient Java programs.

The architecture and design of Process Commander provides these benefits:


Personal Edition Developer FastStart Guide

68

Inheritance and polymorphism enable you to build applications by overriding or extending existing rules. For example, the flow rule that you saved into the higher RuleSet Version overrides (supersedes) the initial flow rule that came with the ESupply application.

Through hardware clustering, one Process Commander system can support thousands of users in multiple locations who enter, work on, and resolve millions of work items.

Applications can be developed iteratively with incremental enhancements. Developers can quickly switch from a development task to a testing task and back as you did by using the Run menu from the Quick Launch bar.

Process Commander applications can interface with other systems using a wide variety of industry-standard technologies (such as SOAP / Web services, e-mail, relational databases, J2EE facilities including Enterprise JavaBeans, and JavaServer Pages).

Personal Edition Developer FastStart Guide

69

Chapter 6: Documenting Your Application


Process Commander includes tools that enable you to easily document what you have built. This chapter describes how to use those tools.
Note: Microsoft Word 2002 or later is needed to produce the Application document

Documenting the ESupply Application


1. In the Designer Studio, select the Pega logo button ( Application > Tools > Document (Figure 6-1). ) and click

Figure 6-1. Document Menu Item

The Application Document wizard opens. On the first screen, select the ESupply application and the ApplicationDocument template (Figure 6-2) and click Next >>. On each subsequent screen of the wizard, select the items you would like to include in the document and click Next >> to proceed through the wizard until you reach the Create Document screen.

Personal Edition Developer FastStart Guide

70

Figure 6-2. Application Documentation Wizard

2. On the Create Document screen of the wizard, click the Create Document. Process Commander generates a Word document that lists all of the rules in the application. The generation process might take a minute or two (Figure 6-3).

Figure 6-3. Create Document

Appendix A contains the document created by Process Commander for the ESupply application. When your work with Process Commander is complete, click the Logout link at the upper right corner of the Designer Studio to end the client session. This is the conclusion of the Personal Edition guide. More information on the ESupply application and appendices describing the Designer Studio
Personal Edition Developer FastStart Guide

71

toolbar and tab bar and the typical workstation setup can be found in the following pages.

Personal Edition Developer FastStart Guide

72

Appendix A: Application Document for ESupply


The following pages show the document created by Process Commander for the ESupply application.
Note: Page breaks, page numbering and fonts in the generated ESupply document have
been modified for inclusion in this book.

Personal Edition Developer FastStart Guide

73

Application Document for ESupply 01.01.01 ESupply

Created by: Designer On March 15, 2011

Personal Edition Developer FastStart Guide

74

Copyright 2011 Pegasystems Inc., Cambridge, MA


All rights reserved. This document describes products and services of Pegasystems Inc. It may contain trade secrets and proprietary information. The document and product are protected by copyright and distributed under licenses restricting their use, copying distribution, or transmittal in any form without prior written authorization of Pegasystems Inc. This document is current as of the date of publication only. Changes in the document may be made from time to time at the discretion of Pegasystems. This document remains the property of Pegasystems and must be returned to it upon request. This document does not imply any commitment to offer or deliver the products or services described. This document may include references to Pegasystems product features that have not been licensed by your company. If you have questions about whether a particular capability is included in your installation, please consult your Pegasystems service consultant. For Pegasystems trademarks and registered trademarks, all rights reserved. Other brand or product names are trademarks of their respective holders. Although Pegasystems Inc. strives for accuracy in its publications, any publication may contain inaccuracies or typographical errors. This document or Help System could contain technical inaccuracies or typographical errors. Changes are periodically added to the information herein. Pegasystems Inc. may make improvements and/or changes in the information described herein at any time.

This document is the property of: Pegasystems Inc. 101 Main Street Cambridge, MA 02142-1590 Phone: (617) 374-9600 Fax: (617) 374-9620 www.pega.com Document Name: Application Document Updated: March 15, 2011

Personal Edition Developer FastStart Guide

75

Contents

Overview of ESupply 01.01.01 ..................................................... 78


Description ..................................................................................................... 78 Business Objectives ...................................................................................... 78 Actors .............................................................................................................. 78 Work Types .................................................................................................... 78 Supporting Types .......................................................................................... 78 RuleSets .......................................................................................................... 79

PurchaseOrder ..................................................................................... 79
PurchaseOrder - Flow ................................................................................ 79 Other Use Cases (Not Referenced in the Application) .......................... 88 Entity Relationship Diagram ....................................................................... 89 Properties Referenced .................................................................................. 89

Common .................................................................................................. 91 Security ................................................................................................... 91 Navigation .............................................................................................. 91 DataManagement ................................................................................ 91 SysAdmin................................................................................................ 91 Other Classes ........................................................................................ 92
Data-Party ...................................................................................................... 92 Data-Portal ..................................................................................................... 92 ECorp-Data-LineItemDetails....................................................................... 92 ECorp-Data-Order ......................................................................................... 92

Reports .................................................................................................... 93
List Views ........................................................................................................ 93 Summary Views ............................................................................................ 93

Correspondence ................................................................................... 93
Acknowledgement Email ........................................................................... 93

Integration ............................................................................................ 93
Services........................................................................................................... 93 Connectors ..................................................................................................... 94

Decisions ................................................................................................ 94
Personal Edition Developer FastStart Guide

76

Tables .............................................................................................................. 94 Trees ................................................................................................................ 94 Map Values ..................................................................................................... 94 Whens .............................................................................................................. 95

Security ................................................................................................... 95 SLAs .......................................................................................................... 95 Activities ................................................................................................. 96 Properties............................................................................................... 97 Declaratives........................................................................................... 98


Expressions .................................................................................................... 98 Triggers ........................................................................................................... 98 OnChange ....................................................................................................... 98

Requirements Matrix ......................................................................... 99 Use Case Matrix ................................................................................... 99

Personal Edition Developer FastStart Guide

77

Overview of ESupply 01.01.01


Description
Initial implementation of a system that will centralize and automate the purchasing function for corporate employees.

Business Objectives
Centralize the purchasing function for employees across the corporation Automate decisioning and routing of purchase orders

Actors
Actor employee Fulfillment Manager Type Operator Operator Operator Count 2000 Total Users Per Week 3 Total Users Per Day 50 Total Users Per Week Access Method Browser Browser Browser

Work Types
Name Implementation Class PurchaseOrder ECorp-FW-ESupply-Work-PurchaseOrder

Supporting Types
Name Common Security Navigation Description Use cases shared by multiple work types Use cases dealing with authentication, authorization Use cases specific to getting between work types and general application processing

DataManagement Use cases specific to managing lists of products, reference data tables, broadcast messages SysAdmin Use cases specific to managing operator profiles, calendars, skills, rule migration/promotion

Personal Edition Developer FastStart Guide

78

RuleSets
RuleSet ESupply Version Description Prerequisites Pega-ProcessCommander:06-01-20 ESupplyInt:01-01-01 Pega-ProcessCommander:06-01-20 ECorpInt:01-01-01 Pega-ProcessCommander:06-01-20 01-01-03 RuleSet to identify, manage, and control the set of rule instances that define ESupply application

ESupplyInt 01-01-01 Integration RuleSet for ESupply framework ECorp ECorpInt 01-01-01 RuleSet to identify, manage, and control the set of rule instances that define ECorp application 01-01-01 Integration ruleset for ECorp organization

PurchaseOrder
Implementation: Description: ECorp-FW-ESupply-Work-PurchaseOrder Purchase Order

PurchaseOrder - Flow
Applies to Class: ECorp-FW-ESupply-Work-PurchaseOrder Short Description: Purchase Order RuleSet: ESupply : 01-01-03

Personal Edition Developer FastStart Guide

79

Flow Diagram

Primary Path
Start - Start
Implementation: Referenced By: Applies to Class: Short Description: RuleSet:

New PurchaseOrder - Flow (Page 79) ECorp-FW-ESupply-Work New form for work objects ESupply : 01-01-02

Referenced By: Rule Name:

ESupply PurchaseOrder PurchaseOrder - Use Case


PurchaseOrder - Flow (Page 79) ESupply | PurchaseOrder | PurchaseOrder

Personal Edition Developer FastStart Guide

80

Short Description: PurchaseOrder RuleSet: ESupply : 01-01-01 Details Actors: Triggers: Complexity: Description Enter department information Any Web Browser Low

Enter Item Information - Assignment


Implementation: WorkList Parameters: StatusWork = New Instructions = Select Items to Add HarnessPurpose = Perform

Default - SLA
Referenced By: Applies to Class: Short Description: Long Description: Usage: RuleSet:

Enter Item Information - Assignment (Page 81) in PurchaseOrder - Flow (Page 79) Workdefault service level Default service level The goal is that each work object will be completed in two days. The deadline is that each work object must be completed within 5 days. Pega-ProCom : 06-01-01

Initial Urgency: 0 Assignment is ready for work: Goal Deadline Late Repeating interval from Deadline

Interval from when assignment is ready Days 2 + HH:MM:SS 0 : 0 : 0 In Business Days? Yes Urgency 0 Escalation Activity 5 0:0:0 Yes 0

:: No

Perform - Harness
Referenced By: Applies to Class: Short Description: Long Description: RuleSet:

Enter Item Information - Assignment (Page 81) in PurchaseOrder - Flow (Page 79) ECorp-FW-ESupply-Work Perform form for work object Perform form for work objects ESupply : 01-01-02

Personal Edition Developer FastStart Guide

81

ToCurrentOperator - Router
Implementation: ToCurrentOperator Parameters: CheckAvailability = False

EnterItemInformation,100% - Transition
Implementation: Referenced By: Applies to Class: Short Description: RuleSet: EnterItemInformation PurchaseOrder - Flow (Page 79) ECorp-FW-ESupply-Work-PurchaseOrder Enter Item Information ESupply : 01-01-02

Referenced By: Rule Name: Short Description: RuleSet: Details Actors: Triggers: Complexity: Description

ESupply PurchaseOrder EnterItemInformation - Use Case


PurchaseOrder - Flow (Page 79) ESupply | PurchaseOrder | EnterItemInformation EnterItemInformation ESupply : 01-01-02

Any Web Browser Medium

Enter the items to purchase

Confirm Order - Assignment


Implementation: WorkList Parameters: StatusWork = Open Instructions = Confirm Your Order HarnessPurpose = Perform

Default - SLA
Referenced By: See Default (Page 81)

Confirm Order - Assignment (Page 81) in PurchaseOrder - Flow (Page 79)

Perform - Harness
Referenced By: See Perform (Page 81)

Confirm Order - Assignment (Page 81) in PurchaseOrder - Flow (Page 79)

Withdraw - Local Action

Applies to Class: WorkShort Description: Withdraw Work Object RuleSet: Pega-ProCom : 06-01-01

Personal Edition Developer FastStart Guide

82

ActionSetTicket - Activity
Referenced By: Applies to Class: Short Description: Long Description: Usage: RuleSet:

Withdraw - FlowAction (Page 82) WorkSets a ticket on a work object Sets a ticket on a work object. Calls UpdateCustomerSatisfaction (because satisfaction props are in the flow action html) to calculate satisfaction properties and then sets the ticket which could be used in the flow. Pega-ProCom : 06-01-01

ConfirmOrder,100% - Transition
Implementation: Referenced By: Applies to Class: Short Description: RuleSet:

ConfirmOrder PurchaseOrder - Flow (Page 79) ECorp-FW-ESupply-Work-PurchaseOrder Confirm Order ESupply : 01-01-02

Referenced By: Rule Name: Short Description: RuleSet: Details Actors: Triggers: Complexity: Description Not Yet Defined

ESupply PurchaseOrder ConfirmOrder - Use Case


PurchaseOrder - Flow (Page 79) ESupply | PurchaseOrder | ConfirmOrder Confirm Order ESupply : 01-01-01

Web Browser Low

ManagerReview - Decision
Implementation: Referenced By: Applies to Class: Short Description: RuleSet:

ManagerReview PurchaseOrder - Flow (Page 79) ECorp-FW-ESupply-Work-PurchaseOrder ManagerReview ESupply : 01-01-02

if .OrderTotal > 100 then RETURN review otherwise RETURN noreview

Manager Approve Order - Assignment


Implementation: WorkList Parameters: StatusWork = Pending-Approval Instructions = Manager Approval HarnessPurpose = PerformManager

Personal Edition Developer FastStart Guide

83

Default - SLA
Referenced By: See Default (Page 81)

Manager Approve Order - Assignment (Page 81) in PurchaseOrder - Flow (Page 79)

PerformManager - Harness
Referenced By: Applies to Class: Short Description: Long Description: RuleSet:

Manager Approve Order - Assignment (Page 84) in PurchaseOrder - Flow (Page 79) ECorp-FW-ESupply-Work Perform form for work object Perform form for work objects ESupply : 01-01-02

ToOrgUnitManager - Router
Implementation: ToOrgUnitManager Parameters: CheckAvailability = False

ManagerApprove,60% - Transition
Implementation: Referenced By: Applies to Class: Short Description: RuleSet:

ManagerApprove PurchaseOrder - Flow (Page 79) ECorp-FW-ESupply-Work-PurchaseOrder Approve ESupply : 01-01-02

Referenced By: Rule Name: Short Description: RuleSet: Details Actors: Triggers: Complexity: Description

ESupply PurchaseOrder ApproveOrder - Use Case


PurchaseOrder - Flow (Page 79) ESupply | PurchaseOrder | ApproveOrder ApproveOrder ESupply : 01-01-02

Any Web Browser Medium

Manager must approve orders totaling more than $100

Personal Edition Developer FastStart Guide

84

VPApproveOrder - Decision
Implementation: Referenced By: Applies to Class: Short Description: RuleSet:

VPApproveOrder PurchaseOrder - Flow (Page 79) ECorp-FW-ESupply-Work-PurchaseOrder VPApproveOrder ESupply : 01-01-03 Actions Return

Conditions Department Name Bill Customer Order Total = if else if else if else if else if else if Otherwise IT HR Finance Finance Legal Legal =False =True =True =False >200 >500 >200 = = >1000 >500

True True True True True True False

UpdateStatus Completed - Utility

Implementation: UpdateStatus Parameters: StatusWork = Resolved-Completed Referenced By: PurchaseOrder - Flow (Page 79) Applies to Class: WorkShort Description: Updates the status of a work item Long Description: Update the status of a work item, and call Resolve if it has been Resolved. Usage: The activity gets called from various places including Work-NewAssign, Work-NewAssignBasket etc. It sets the status and calls another activity 'RecalculateAndSave' to update the urgency, timestamps and to save the work object. RuleSet: Pega-ProcessEngine : 06-01-20

pyCheckResolvedStatus - Tree
Referenced By: Applies to Class: Short Description: RuleSet:

UpdateStatus - Activity (Page 85) WorkDecides what action to take based on pyworkstatus Pega-ProcessEngine : 06-01-20

if "Resolved-Completed" then RETURN "check" if "Resolved-Withdrawn" then RETURN "cancel" if "Resolved-Duplicate" then RETURN "cancel" if "Resolved-Revoked" then RETURN "cancel" if "Resolved-Rejected" then RETURN "cancel" otherwise RETURN "other"

Personal Edition Developer FastStart Guide

85

Send Correspondence - Utility

Implementation: CorrCreateAndSend Parameters: SendAllAttachments = False Broadcast = False CorrName = Acknowledgement PartyRole = Originator Referenced By: PurchaseOrder - Flow (Page 79) Applies to Class: WorkShort Description: CorrCreateAndSend Long Description: Creates a single correspondence Usage: This activity is called by CorrNew activity. It creates the correspondence record and calls the activity CorrUpdate. RuleSet: Pega-ProCom : 06-01-01

Alternate Path 1
VPApproval - Assignment

Implementation: WorkList Parameters: DoNotPerform = False ConfirmationNote = VP Review is required StatusWork = Pending-Approval Instructions = VP Approval Required HarnessPurpose = PerformManager

Default - SLA
Referenced By: See Default (Page 81)

VPApproval - Assignment (Page 81) in PurchaseOrder - Flow (Page 79)

PerformManager - Harness
Referenced By: See PerformManager (Page 84)

VPApproval - Assignment (Page 84) in PurchaseOrder - Flow (Page 79)

VPApprove,75% - Transition
Implementation: Referenced By: Applies to Class: Short Description: RuleSet:

VPApprove PurchaseOrder - Flow (Page 79) ECorp-FW-ESupply-Work-PurchaseOrder VPApprove ESupply : 01-01-03

Alternate Path 2
Reject,25% - Transition
Implementation: Referenced By:

Reject PurchaseOrder - Flow (Page 79)

Personal Edition Developer FastStart Guide

86

Applies to Class: Short Description: Long Description: Usage: RuleSet:

WorkReject This flow action is for rejecting the work object. Used by the StandardEvaluate flow. Approval flows should use the Disapprove flow action, not Reject. Pega-EndUserUI : 06-01-10

ActionResolve - Activity
Referenced By: Applies to Class: Short Description: Usage:

Reject - FlowAction (Page 87) WorkSet the resolved properties Called by the flow action Resolve/Reject/ResolveAsDuplicate. casad created in 050401 Pega-ProCom : 06-01-01

RuleSet:

UpdateStatus Rejected - Utility

Implementation: UpdateStatus Parameters: StatusWork = Resolved-Rejected Referenced By: PurchaseOrder - Flow (Page 79) See UpdateStatus (Page 85)

Alternate Path 3
Reject,40% - Transition
Implementation: Referenced By:

Reject PurchaseOrder - Flow (Page 79)

See Reject (Page 87)

Referenced By:

ActionResolve - Activity
See ActionResolve (Page 87)

Reject - FlowAction (Page 87)

Other Referenced Rules


Confirm - Harness
Referenced By: Applies to Class: Short Description: RuleSet:

PurchaseOrder - Flow (Page 79) ECorp-FW-ESupply-Work Confirmation form for work objects ESupply : 01-01-01

Personal Edition Developer FastStart Guide

87

Other Use Cases (Not Referenced in the Application)


ESupply PurchaseOrder EnterDeptInformation - Use Case
Rule Name: ESupply | PurchaseOrder | EnterDeptInformation Short Description: Enter Dept Information RuleSet: ESupply : 01-01-01 Details Actors: Triggers: Complexity: Description Department information is defaulted into the purchase request form but the employee can overwrite it if not correct. employee Web Browser Low

ESupply PurchaseOrder RejectOrder - Use Case


Rule Name: ESupply | PurchaseOrder | RejectOrder Short Description: Reject Order RuleSet: ESupply : 01-01-01 Details Actors: Triggers: Complexity: Description Manager Web Browser Low

The order is rejected by the manager. Manager selects a reject reason. Order is either routed back to employee for update and resubmission or resolved.
Use Case Requirements
ID Name Category Business Rule Status New Description A list of reject reasons is presented to managers and fulfillment operators who select from the list. RejectReason Reject reason

Personal Edition Developer FastStart Guide

88

Entity Relationship Diagram


ECorp-FW-ESupply-Work-PurchaseOrder +*pyID +ContactInformation : Data-Party +Order : ECorp-Data-Order +AddShipping +ApprovalCode +BillCustomer +DepartmentName +DepartmentNumber +OrderDate +OrderTotal +PaymentDate +pyAgeFromDate +pyAttachmentCategories +pyButtonLabel +pyCaption +pyConfirmationNote +pyDuplicateID +pyElapsedStatusNew +pyElapsedStatusOpen +pyElapsedStatusPending +pyFlowName +pyInstructions +pyLabel +pyNextEmailThreadID +pyNote +pyNotifyQuickStream +pyOrigDivision +pyOrigOrg +pyOrigOrgUnit +pyOrigUserDivision +pyOrigUserID +pyOrigUserWorkgroup +pyOwnerDivision +pyOwnerOrg +pyOwnerOrgUnit +pyProblemReason +pyRootCause +pySLAName +pySelected +pyStatusCustomerSat +pyStatusWork +pyTemplateInputBox +pyUrgencyWorkAdjust +pyWorkIDPrefix Data-Party +*pyWorkPartyUri +pyCity +pyFirstName +pyHomeAddress1 +pyHomeAddress2 +pyLastName +pyPostalCode +pyState ECorp-Data-LineItemDetails +*ItemName

ECorp-Data-Order +*pyLabel +ItemName +LineItemTotal +Quantity +UnitPrice +pyActionPrompt +pyRowStatus

0..*

Data-Portal +*pyOwner +pyPortalSkin : Embed-Pega-PortalSkin 1

Embed-Pega-PortalSkin

Classes Referenced In Diagram: Data-Party, Data-Portal, ECorp-Data-LineItemDetails, ECorp-Data-Order, Embed-Pega-PortalSkin

Properties Referenced
Rule Name AddShipping Approval Code Bill Customer Label AddShipping ApprovalCode Bill Customer Mode Type RuleSet ESupply ESupply ESupply Single Value TrueFalse Single Value Text Single Value TrueFalse

Personal Edition Developer FastStart Guide

89

Rule Name ContactInformation Department Name Department Number Order Order Date OrderTotal PaymentDate py AgeFromDate py AttachmentCategories py ButtonLabel py Caption py ConfirmationNote py DuplicateID py ElapsedStatusNew py ElapsedStatusOpen py ElapsedStatusPending py FlowName py ID py Instructions py Label py NextEmail ThreadID py Note py NotifyQuick Stream py OrigDivision py OrigOrg py OrigOrgUnit py OrigUserDivision py OrigUserID py OrigUserWorkgroup py OwnerDivision py OwnerOrg py OwnerOrg Unit py ProblemReason

Label Contact Information Department Name Department Number OrderTest Order Date Order Total PaymentDate Age From date pyAttachmentCategories Button Label Caption Confirmation Note Duplicate ID Elapsed in Status New Elapsed in Status Open Elapsed in Status Pending Flow Name Work ID Instructions Label pyPropertyName Routing/Transfer note pyNotifyQuickStream Originating Division Originating Organization Originating OrgUnit Originating User Division Originating User ID Originating User Workgroup Owner Division Owner Organization Owner OrgUnit Problem Reason

Mode Page

Type Data-Party

RuleSet ESupply ESupply ESupply

Single Value Text Single Value Text PageList

ECorp-Data-Order ESupply ESupply ESupply ESupply Pega-ProCom Pega-ProCom Pega-WB Pega-WB Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom

Single Value Date Single Value Decimal Single Value Date Single Value DateTime StringList Text

Single Value Identifier Single Value Identifier Single Value Text Single Value Text Single Value Decimal Single Value Decimal Single Value Decimal Single Value Text Single Value Text Single Value Text Single Value Text Single Value Integer Single Value Text Single Value Text Single Value Text Single Value Text Single Value Text Single Value Text Single Value Text Single Value Text Single Value Text Single Value Text Single Value Text Single Value Text

Personal Edition Developer FastStart Guide

90

Rule Name py RootCause py Selected py SLAName py StatusCustomerSat py StatusWork py TemplateInputBox py Urgency WorkAdjust py Work IDPrefix

Label Root Cause Selection Flag SLA name

Mode Single Value Text

Type

RuleSet Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-ProCom Pega-UIDesign Pega-ProCom Pega-ProCom

Single Value TrueFalse Single Value Text

Customer Satisfaction Status Single Value Text Work Status InputboxTemplate Urgency added by user Work ID Prefix Single Value Text Single Value Text Single Value Decimal Single Value Text

Common
Description: Use cases shared by multiple work types

Security
Description: Use cases dealing with authentication, authorization

Navigation
Description: Use cases specific to getting between work types and general application processing

DataManagement
Description: Use cases specific to managing lists of products, reference data tables, broadcast messages

SysAdmin
Description: Use cases specific to managing operator profiles, calendars, skills, rule migration/promotion

Personal Edition Developer FastStart Guide

91

Other Classes
Data-Party
Properties Referenced
Rule Name py City py FirstName py HomeAddress1 py HomeAddress2 py LastName py Postal Code py State Label City/Town First Name Mode Type RuleSet Single Value Text Pega-ProCom Single Value Text Pega-ProCom

pyHomeAddress1 Single Value Text Pega-ProCom pyHomeAddress2 Single Value Text Pega-ProCom Last Name Postal Code State/County Single Value Text Pega-ProCom Single Value Text Pega-ProCom Single Value Text Pega-ProCom

Data-Portal
Properties Referenced
Rule Name py Portal Skin Label Mode Type RuleSet pyPortalSkin Page Embed-Pega-PortalSkin Pega-WB

ECorp-Data-LineItemDetails
Properties Referenced
Rule Name ItemName Label Mode Type RuleSet Item Name Single Value Text ESupply

ECorp-Data-Order
Properties Referenced
Rule Name ItemName LineItemTotal Label ItemName Mode Type RuleSet ESupply Single Value Text

LineItemTotal Single Value Decimal ESupply

Personal Edition Developer FastStart Guide

92

Rule Name Quantity UnitPrice py ActionPrompt py RowStatus

Label Quantity UnitPrice Action

Mode

Type

RuleSet ESupply

Single Value Integer

Single Value Decimal ESupply Single Value Text Pega-WB Pega-UIEngine

pyRowStatus Single Value Text

Reports
List Views
Applies To Assign-Worklist ECorp-Data-LineItem Details Name Work ListEmbed Description RuleSet ESupply Added by wizard ESupply

DataTableClass Editor

Summary Views
None found

Correspondence
Acknowledgement Email
Applies to Class: ECorp-FW-ESupply-Work Short Description: Acknowledgement RuleSet: ESupply : 01-01-02

Integration
Services
None found
Personal Edition Developer FastStart Guide

93

Connectors
None found

Decisions
Tables
VPApproveOrder
Applies to Class: ECorp-FW-ESupply-Work-PurchaseOrder Short Description: VPApproveOrder RuleSet: ESupply : 01-01-03 Conditions Department Name Bill Customer Order Total = if else if else if else if else if else if Otherwise IT HR Finance Finance Legal Legal =False =True =True =False >200 >500 >200 = = >1000 >500 True True True True True True False Actions Return

Trees
ManagerReview
Applies to Class: ECorp-FW-ESupply-Work-PurchaseOrder Short Description: ManagerReview RuleSet: ESupply : 01-01-02 if .OrderTotal > 100 then RETURN review otherwise RETURN noreview

Map Values
None found

Personal Edition Developer FastStart Guide

94

Whens
ReportFilter
Applies to Class: Data-Report-Shortcut Short Description: ReportFilter RuleSet: ESupply : 01-01-02 Logic: A0

A0: true = @(Pega-RULES:ExpressionEvaluators).compareTwoValues(.pzApplicationName, "=", "ESupply")

ItemPrice
Applies to Class: ECorp-Data-LineItemDetails Short Description: ItemPrice RuleSet: ESupply : 01-01-02 Logic: A0

A0: true = @(Pega-RULES:ExpressionEvaluators).compareTwoValues(.ItemName, "=", "Laptop")

Security
Access Group ESupply:Administrators ESupply:WorkManager ESupply:WorkUser Role Name PegaRULES:SysAdm4 PegaRULES:WorkMgr4 PegaRULES:User4

SLAs
None found

Personal Edition Developer FastStart Guide

95

Activities
Applies To Assignment classes ECorp-Data-Order ESupply - Framework Work classes Name getOrderInfo Copy UnitPrice getItemDetails ToVP Description getWork ItemInfo Copy UnitPrice getItemDetails BPM Routing API: Assign to specific operator's worklist ESupply ESupply ESupply ESupply RuleSet Version 01-01-02 01-01-02 01-01-02 01-01-02

Personal Edition Developer FastStart Guide

96

Properties
Applies To ECorp-Data-LineItem Details ECorp-Data-LineItem Details ECorp-Data-Order ECorp-Data-Order ECorp-Data-Order ECorp-Data-Order ECorp-FW-ESupplyWork-PurchaseOrder ECorp-FW-ESupplyWork-PurchaseOrder ECorp-FW-ESupplyWork-PurchaseOrder ECorp-FW-ESupplyWork-PurchaseOrder ECorp-FW-ESupplyWork ECorp-FW-ESupplyWork ECorp-FW-ESupplyWork ECorp-FW-ESupplyWork ECorp-FW-ESupplyWork ECorp-FW-ESupplyWork ECorp-FW-ESupplyWork Name ItemName Price ItemName LineItemTotal Quantity UnitPrice AddShipping Approval Code ContactInformation PaymentDate Bill Customer Department Name Department Number ItemDetails Order Order Date OrderTotal Description Item Name Price ItemName LineItemTotal Quantity UnitPrice AddShipping Approval Code Contact Information PaymentDate Bill Customer Department Name Department Number Order OrderTest Order Date Order Total Mode String String String String String String String String Page String String String String PageList PageList String String RuleSet ESupply ESupply ESupply ESupply ESupply ESupply ESupply ESupply ESupply ESupply ESupply ESupply ESupply ESupply ESupply ESupply ESupply Version 01-01-02 01-01-02 01-01-02 01-01-02 01-01-02 01-01-02 01-01-02 01-01-03 01-01-02 01-01-02 01-01-02 01-01-02 01-01-02 01-01-02 01-01-02 01-01-02 01-01-02

Personal Edition Developer FastStart Guide

97

Declaratives
Expressions
.LineItemTotal .Order()
Applies to Class: ECorp-FW-ESupply-Work Short Description: .LineItemTotal RuleSet: ESupply : 01-01-02 Execute this expression: Only when the top-level page is of the Applies To class Calculate value: Whenever inputs change Set .LineItemTotal = Value of .Quantity*.UnitPrice

.OrderTotal

Applies to Class: ECorp-FW-ESupply-Work Short Description: .OrderTotal RuleSet: ESupply : 01-01-02 Execute this expression: Only when the top-level page is of the Applies To class Calculate value: Whenever inputs change Set .OrderTotal =

Triggers
pyTrackSecurityChanges
Applies to Class: ECorp-FW-ESupply-Work-PurchaseOrder Short Description: pyTrackSecurityChanges RuleSet: ESupply : 01-01-02 Trigger when an instance is: Saved Activity: TrackSecurityChanges Execute: Immediately

OnChange
None found

Personal Edition Developer FastStart Guide

98

Requirements Matrix
Requirement Category External Status ID Description Pruchase requests are routed to managers based on total dollar values as described in the corporate accounting manual. New New The list of items an employee can request is based on the employee's grade level. A list of reject reasons is presented to managers and fulfillment operators who select from the list. EnterItemInformation (Use Case) RejectOrder (Use Case) Linked To

Approval Level Business Rule Purchase Items Business Rule

RejectReason Business Rule

Use Case Matrix


Application ESupply ESupply ESupply ESupply ESupply ESupply ESupply ESupply Work type Use Case Linked To PurchaseOrder (Flow) PurchaseOrder (Flow) PurchaseOrder (Flow) PurchaseOrder (Flow) Flow Shape ManagerApprove (Flow Action) ConfirmOrder (Flow Action) 0 (Flow Action) ConfirmOrder (Flow Action) PurchaseOrder ApproveOrder PurchaseOrder ConfirmOrder PurchaseOrder ConfirmOrder PurchaseOrder ConfirmOrder PurchaseOrder EnterDeptInformation PurchaseOrder EnterItemInformation PurchaseOrder (Flow) PurchaseOrder PurchaseOrder PurchaseOrder RejectOrder PurchaseOrder (Flow) PurchaseOrder (Flow) EnterItemInformation (Flow Action) New (Harness) 0 (Flow Action)

Personal Edition Developer FastStart Guide

99

Appendix B: The Designer Studio Toolbar and Tab Bar


In the Designer Studio, use the buttons on the toolbar and tab bar to work with rules and data instances in your Process Commander system.

Toolbar Buttons and Functions


The specific tools and selection boxes that appear on the toolbar vary depending on your role, the type of workspace, and the contents of the form and list area. The toolbar contains only buttons both relevant to the open object and available to you. If a button does not appear or is unavailable (gray), the corresponding function is not available to you in the current context. Figure B-1 describes all of the buttons that might appear.
Name
Availability

Button

Function
Opens the Availability dialog to change the availability of the rule. Select Yes, No/Draft Mode, Final, Blocked, or Withdrawn to set the availability of the rule.

Check In

This button appears if: The rule is located in a RuleSet that is under rule management The rule is currently checked out to you. After you check out a rule to work on it (in your private RuleSet), use this Check In button to copy the modified rule instance over the original one in the public RuleSet.

Check Out

This button appears if: The rule is located in a RuleSet that is under rule management Your Operator ID settings allow you to check out rules The rule is not currently checked out to you. Creates a copy of the rule in your private RuleSet and marks the original rule as checked out (locked). No one else can check out a rule while it is checked out.

Delete Delete Checkout

Deletes a rule or data instance. Deletes a checked-out rule from your personal RuleSet, effectively cancelling the check out. The original instance is not affected.

Personal Edition Developer FastStart Guide

100

Name
Draft On/Off Favorites Flow Editor Help Launch

Button

Function
Click to toggle draft mode on or off. Elements of this flow rule may reference activities, flow actions, or other objects not yet defined. Click to save a link to a rule to your My Favorites menu, or to delegate a rule to another user or group of users. Starts Visio for editing or reviewing the flow. Opens the help system at the help topic for the currently displayed rule or data form. Moves the current rule or data form into a separate, floating browser window with a copy of its own toolbar. This action lets you compare two forms, or work with some information or values in the main portal window and paste them into another portal window.

Navigate Left

This button appears at the end of the toolbar when your workspace is not wide enough to display all of the available buttons. Click to scroll the toolbar to the left.

Navigate Right

This button appears at the end of the toolbar when your workspace is not wide enough to display all of the available buttons. Click to scroll the toolbar to the right.

New

Creates a new rule or data instance of the same type as the currently open rule or data instance. To create a new rule or data instance of a different type, click the arrow to display a menu to select another rule type.

Preview Recover Related Rules

Splits the workspace to present a partial preview of the runtime appearance of a rule in the bottom half of the split workspace. Recovers the most recent version of a deleted rule, if the RuleSet and version combination is unlocked. Lists rules related to the current rule. Clicking displays a menu that lists lower-numbered versions of the currently open rule, circumstance and circumstance-date, editions, and additional menu items.

Restore Return Rule Data Run Save Save As

Replaces the current checked-in copy of a rule with the last checked-in copy of that rule. Exits Visio and returns to normal editing mode. Shows the XML document that makes up the form displaying this instance. This is primarily a debugging tool. Starts execution or testing of the current rule, in the current context. Saves the instance to the PegaRULES database. Saves the instance under a different name, RuleSet, or version.

Personal Edition Developer FastStart Guide

101

Name
Show Java

Button

Function
After a rule is saved, displays an approximation of the generated Java to be created by this rule instance in a new window. (You cannot alter this Java code.) This button is visible to developers who hold the privilege @baseclass.ToolbarFull. Available for activities, when rules, and stream rules, among others.

Undo Visio Tools Zoom In (Visio) Zoom Out (Visio)

In Visio editing of flow, undoes the most recent operation. Toggle to display or hide Visio toolbars during Visio editing. Zoom in on the Visio diagram, to make the diagram larger. Zoom out from the Visio diagram, to make the diagram smaller.

Figure B-1. Workspace Toolbar Buttons

Tab Bar Button and Functions


The tab bar identifies currently open rule or data instances, the Instances list, and other displays. Tabs appear between the Home icon ( ) at the left and the Currently Open ( ), Refresh ( ), and Close ( ) icons. Click on a tab to make it the front tab. For a tab that represents a rule, hold the mouse pointer over the tab to see the type, full rule key, RuleSet, and version information of that rule. Figure B-2 describes the persistent tab bar buttons.
Name
Home Currently Open

Button

Function
Click to return to the Whats Happening display and your home view of the portal Click to list all currently open rules or other displays in a dropdown menu. Select from the menu to bring a specific form or display to the front.

Refresh

Click to refresh the Designer Studio display and display the most current data from the system. Any inputs you have entered but not sent are lost.

Close Figure B-2. Tab Bar Buttons

Click to close the currently open rule form or other display.

Personal Edition Developer FastStart Guide

102

Appendix C: Workstation Setup


This Appendix describes setting up your Process Commander workstation and includes information about:
Temporary Internet file settings Downloaded program files Other security settings Performance tips and keyboard shortcuts Visio settings

Internet Explorer Settings


Process Commander works with Microsoft Internet Explorer Web browser version 6 SP1, version 7, and version 8 with current Microsoft security patches installed. To use the Designer Studio you must use Internet Explorer. The V6.1 composite portals (User and Manager, not WorkUser and WorkManager) also support Firefox 2+ and Safari. Internet Explorer is also known as IE or MSIE, and serves as a thin client for both application developers and application users. All pop-up blockers (such as those provided by Yahoo! or Google toolbars) must be disabled. Several settings are important for best use of MSIE with Process Commander. In many cases, these may correspond to the settings you normally use for Local intranet or other Local Zone processing. For additional settings not needed by most Personal Edition readers, select Help > Developer Help to open the Process Commander help system, and search for the topics How to set up Internet Explorer 7 and How to set up Internet Explorer 8.

Temporary Internet Files Settings


Process Commander uses HTTP 1.1 and marks pages as expired as appropriate. To set this property in Internet Explorer version 6 SP1, navigate to Tools > Internet Options > General > Temporary Internet Files > Settings, and select Automatic. In Internet Explorer version 7 and version 8, navigate to Tools > Internet Options > General and click the Settings button under Browsing history. Select Automatically in the Temporary Internet Files options. The system responds best if your MSIE cache is enabled, because the cache can store images and other static files locally. However, caching is not required.

Personal Edition Developer FastStart Guide

103

Downloaded Program Files


Process Commander uses a few ActiveX controls on the workstation. Each automatically downloads on demand (only as needed) if permitted by your Windows network account and browser settings. If your Windows account has Power User or Administrator privileges, you can download these controls. If not, another user with appropriate privileges can download them for you, by signing on and using Process Commander briefly. (You do not need Power User or Administrator privileges to run the ActiveX controls.) From the Windows Control Panel, double-click Internet Options, or from Internet Explorer, select Tools > Internet Options. On the Security tab, select the Local intranet zone to confirm that you can download signed ActiveX controls. You can set security for the Local intranet zone to Low, or you can select Custom level and enable the download settings (Figure C-1 and Figure C-2):

Figure C-1. Download Enabled

Figure C-2. ActiveX Downloads Enabled

Other Security Settings


Typically, the Process Commander server operates on a local area network (LAN) and appears in the Local internet zone of Windows Internet Properties and Internet Explorer Internet Options. You can adjust security settings for the Local internet zone without affecting the security settings you want to apply for the Internet zone. The default Local internet zone security setting of Medium or Medium-Low is generally appropriate for Process Commander use. Some special cases requiring customization are noted here.
Cookies Process Commander uses cookies. Confirm that your browsers settings allow cookies. Pop-up windows Certain portal operations use pop-up windows. Pop-up blockers (such as the Google toolbar) may interfere with correct operation of these windows.

Personal Edition Developer FastStart Guide

104

Scripting Process Commander uses JavaScript. Applications based on Process Commander may use VBScript or JScript in addition to JavaScript. Users must have the ability to execute scripts in the Local Zone. This is available under the Low setting for the Local intranet zone or as a custom setting:

Windows XP SP2 restrictions on file downloads If your workstation operating system is Windows XP SP2 and your Process Commander server is identified (in the URL in the browsers Address or Location bar) by an IP address or by a domainqualified name (such as myserver.mydomain.sub), an Internet setting may restrict your ability to use file attachments. Go to the Control Panel and double-click on Internet Options, or in Internet Explorer, select Tools > Internet Options. Select the Security tab and the Local intranet zone, and click Custom level. Disable the Automatic Prompting for File Download setting.

Performance Tips and Keyboard Shortcuts


Designers, developers and users are most productive if they remember these tips:
Do not use the browsers Back button or Back keyboard shortcut. Do not use the browsers History capabilities to return to an earlier page. The older pages may contain stale information, and the browsers Back and History features may interfere with session synchronization. Click the Refresh button ( Explorer refresh button ( ) on the Designer Studio tab bar, not the Internet ) or the F5 key, to refresh the current display.

Press CTRL+F to search for text on a page. Press CTRL+P to print the current page. Click the Home Icon ( Home display. ) at the left of the Designer Studio tab bar to return to the

Visio Settings
Process Commander uses an ActiveX control to control support flows in Microsoft Visio. Follow the steps in this section to set up Microsoft Visio 2002 or 2003 to work with Process Commander flows.

Visio Versions
Process Commander V6.1 SP2 operates with Visio 2007 and 2010 if you save files in Visio 2002 format. To configure Visio 2007:
Personal Edition Developer FastStart Guide

105

1. Select the Visio 2007 Tools > Options menu item. 2. Select the Save tab. 3. In the Default Format field, select Save Visio files As Visio 2002 document. 4. Click OK. To configure Visio 2010: 1. Select Visio 2010 File>Options menu item. 2. From the Options panel select Save. 3. In the Save files in this format field, select Visio 2002 document. 4. Click OK.

Setting up Visio to Work With Flows


When you open a flow rule for the first time, Visio downloads an ActiveX control that contains Process Commander macros. The Visio Flow Editors in Process Commander use VBA (Visual Basic for Applications) macros. The following warning might appear when you first open a flow rule in Visio (Figure C-3).

Figure C-3. Visio Macro Security Warning

The presence of these macros signals Visio to warn you of a potential security issue until you take one of the following actions.

Add Pegasystems as a trusted source of Visio macros


1. In the Security Warning window, select Always trust macros from this source. This adds Pegasystems Inc. to the Trusted Sources list.

Personal Edition Developer FastStart Guide

106

Pegasystems Inc. has digitally signed the Visio XP macros with a Code Signing (level 3) Digital ID Certificate from VeriSign. 2. The Enable Macros button becomes available. Click Enable Macros to start a successful Visio flow editing session. The Security Warning dialog warning about macros from Pegasystems will not appear again.

Alternatively, set macro security to Medium or Low


Visio offers four levels of macro security that you control through settings in the Visio Security dialog. If you only edit flow rules created with Visio and have added Pegasystems Inc as a trusted source, you can leave the setting at High. Otherwise, use Medium or Low. To set the Visio macro security level: 1. Start Visio. Select the Tools> Macros> Security menu item in Visio to access the Security dialog (Figure C-4). 2. Set the Visio Macro security level to Medium (for prompting) or Low (for no prompting). Click OK.

Figure C-4. Visio Macro Security Levels

For more information on Visio security issues, search for the topic How to Set Up Visio in the Process Commander help system.

Personal Edition Developer FastStart Guide

107

Personal Edition Developer FastStart Guide

108

Appendix D: Contacting Pegasystems


This appendix describes how to contact Pegasystems for:
Education services Documentation feedback

For more information about our company and products, visit our Web site at www.pega.com.

Education Services
Pegasystems University of Pega offers a wide range of courses for our customers. For course descriptions and contact information, go to http://pega.com/services/university-of-pega/pega-education-services. University of Pega offers both live classes and e-Learning courses. Courses can be presented at customer sites also.

Documentation Feedback
Pegasystems strives to product high-quality documentation. If you have comments or suggestions about this guide or about the sample ESupply application, send us an email with the following information:
Document name, version number, and date it was updated (located at the bottom of the copyright page) Page number Brief description of the problem for example, what instructions are inaccurate, or what part of the ESupply application did not work as expected

Send the email to: mailto:docteam@pega.com.


Note: This email address is for providing feedback on this guide and sample application
only.

Personal Edition Developer FastStart Guide

109

Vous aimerez peut-être aussi