Você está na página 1de 134

Developer Fast Start

PegaRULES Process Commander V6.1 SP1

ii Developer Fast Start

Copyright 2010
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 by 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
PegaRULES Process Commander
Document: Developer Fast Start
Software Version 6.1 SP1
Updated: August 4, 2010

Contents
Chapter 1: Overview ................................................................................................................... 1-1
Business Process Management .......................................................................................... 1-3
Structure of This Document ................................................................................................ 1-4
Support Knowledgebase ..................................................................................................... 1-5
Prerequisites ......................................................................................................................... 1-6
Chapter 2: Using the Application .............................................................................................. 2-1
Creating a Purchase Order .................................................................................................. 2-2
Adding Items to Your Purchase Order ........................................................................ 2-6
Approving the Purchase Order Request .......................................................................... 2-12
Chapter 3: Improving the Application....................................................................................... 3-1
Changing the Purchase Order Request Process............................................................... 3-4
Defining a New Decision Table Rule.......................................................................... 3-13
Editing the Flow........................................................................................................... 3-19
Chapter 4: Updating the User Interface .................................................................................... 4-1
Building a New Flow Action rule ......................................................................................... 4-2
Building a Section rule ................................................................................................. 4-3
Adding a Section rule to a Flow Action ....................................................................... 4-9
Editing the Flow .................................................................................................................. 4-12
Adding a Data Field ............................................................................................................ 4-15
Inspecting Declarative Rules............................................................................................. 4-21
Using the Declarative Rules Inspector ...................................................................... 4-22
Chapter 5: Reviewing Your Application.................................................................................... 5-1
Developing Applications by Changing Rules .................................................................... 5-1
Technology Under the Covers ............................................................................................ 5-3
Chapter 6: Documenting Your Application .............................................................................. 6-1
Documenting the ESupply Application .............................................................................. 6-2
Appendix A: Application Document for ESupply .................................................................... A-1
Appendix B: The Designer Studio Toolbar and Tab Bar ......................................................... B-1
Toolbar Buttons and Functions .......................................................................................... B-1
Tab Bar Button and Functions ............................................................................................ B-4

2 Developer Fast Start

Appendix C: Workstation Setup ................................................................................................ C-1


Internet Explorer Settings.................................................................................................... C-2
Temporary Internet Files Settings ............................................................................... C-2
Downloaded Program Files .......................................................................................... C-2
Other Security Settings ................................................................................................ C-3
Performance Tips and Keyboard Shortcuts....................................................................... C-5
Visio Settings ........................................................................................................................ C-6
Visio Versions................................................................................................................ C-6
Setting up Visio to Work With Flows ........................................................................... C-6
Appendix D: Installing the ESupply Application and Application Profile.............................. D-1
Installing the ESupply Application and Application Profile ...................................... D-1
Appendix E: Contacting Pegasystems ..................................................................................... E-1
Education Services ....................................................................................................... E-1
Documentation Feedback............................................................................................. E-1

Chapter 1:
Overview
Welcome to the Developer Fast Start. 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.

1-2 Developer Fast Start

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.

Developer Fast Start

1-3

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.

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.

1-4 Developer Fast Start

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.

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.

Developer Fast Start

Support Knowledgebase
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.

1-5

1-6 Developer Fast Start

Prerequisites
To follow the steps in the hands-on exercises in this book, you need:

Access to a Process Commander Version 6.1 SP1 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 Pega-ProcessCommander 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.

A Windows VISTA or Windows XP workstation with Microsoft Visio 2002,


2003 or 2007 (any edition).

Microsoft Word 2002, on the workstation.

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.

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.

2-2 Developer Fast Start

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

Developer Fast Start

2-3

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).

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

2-4 Developer Fast Start

contains a list of work items assigned to that user, prioritized by Urgency


level.

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

Developer Fast Start

2-5

5. Click the Create button at the bottom of the form. This action transmits your
input to the Process Commander server and creates a work object
according to the purchase order process defined in this application. The
system assigns a sequential identifier called the work object ID to the work
object. In the work object form displayed in the portal, this ID is visible in
the top bar of the form (circled in Figure 2-6). The work object form displays
for you to enter input. In this application, the work object 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 object form to

close it. The worklist refreshes and an assignment row for this work object
appears on your worklist. Because additional steps are needed before your
tasks with the work object can be completed, a row for this assignment for
appears in your worklist. Figure 2-7 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

2-6 Developer Fast Start

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.

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.

Developer Fast Start

3. Click the Add a row icon

2-7

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).

2-8 Developer Fast Start

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 objects 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 object has
passed through and are complete. Following the diagram from the top downward,
the work object was created, then was assigned to the Current Operator, which is
WorkUser here.

Developer Fast Start

2-9

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 object can continue through the process. When you clicked the
Submit button, the work object 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 object is at the Confirm Order assignment.

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).

2-10 Developer Fast Start

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.

Figure 2-11. Shipping Details


9. Click Submit.

Developer Fast Start

2-11

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
object has gone to a manager for approval. An assignment for the approval
request is placed on the managers worklist.

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.)
Close the form by clicking the
log out of the portal.

(close) icon in the form. Then click Log Off to

2-12 Developer Fast Start

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.

Developer Fast Start

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

2-13

2-14 Developer Fast Start

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


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

Figure 2-17. Take Action Form

Developer Fast Start

2-15

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 Object Confirmation

Note: In this flow, after a manager Approves (or Rejects) the purchase
order request, the work object becomes resolved with a status of
Resolved-Completed (or Resolved-Rejected).
Other gadgets in the Manager portal allow managers or supervisors to review
staff members worklists, transfer work between staff members, and review realtime reports about progress, volume, backlogs, and trends.
Close the form by clicking the
log out of the portal.

(close) icon in the form. Then click Log Off to

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

Bill Customer

Order Total

IT

>$1,000

HR

>$500

Finance

No

Finance

Yes

>$200

Legal

Yes

>$500

Legal

No

>$200

IT

No

>$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)

3-2 Developer Fast Start

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


However, if these three conditions are all true:

The Department Name is set to Finance

The Bill Customer check box is checked

The Order Total is $199.00

Then none of the rows contain criteria that are all met. In this case, no VP
approval is required.

Developer Fast Start

3-3

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.

Figure 3-2. Revised Process Flow Diagram

3-4 Developer Fast Start

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

Developer Fast Start

3-5

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

to see the rule types

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.)

Figure 3-6. PurchaseOrder Flow Rule in Application Explorer

3-6 Developer Fast Start

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 0101-03. Then you make updates to the new copy.

Developer Fast Start

3. Click Save As

3-7

to save a copy of the process flow rule into the

ESupply:01-01-03 RuleSet Version. A Save As 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.
Select ESupply from the RuleSet drop-down list. The Version field defaults
to 01-01-03.
4. Click the Save As button.
5. 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)

3-8 Developer Fast Start

6. Click the Flow Editor toolbar icon (

) as shown in Figure 3-9. This opens

the Visio Flow Editor.

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.

Developer Fast Start

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.

3-9

3-10 Developer Fast Start

Processing of each purchase order proceeds along the connectors from


shape to shape.
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 dropdown 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

Developer Fast Start

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

3-11

) on the toolbar

to reverse the most recent action. Do not attempt to log off while Visio is
active.
7. Add a decision shape to the process flow below the existing
ManagerReview assignment shape as follows:
a. Click and drag a decision shape

from the Shapes stencil onto the

flow diagram.
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.

3-12 Developer Fast Start

Figure 3-14. Decision Properties Panel


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

Developer Fast Start

The RuleSet should be ESupply; if not, change it

The Version should be 01-01-03; if not, change it

3-13

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

Figure 3-16. Decision Table Rule Form

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

3-14 Developer Fast Start

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

Bill Customer

Order Total

IT

>$1,000

HR

>$500

Finance

No

Finance

Yes

>$200

Legal

Yes

>$500

Legal

No

>$200

IT

No

>$2,000

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 pop-up
window displays (Figure 3-18).

Developer Fast Start

3-15

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 () to access the list. For the Property field here,
this 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.

3-16 Developer Fast Start

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
3-20).

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

Developer Fast Start

b. Click the Insert Column After icon

3-17

. A new column appears to the right

of the starting column. Do this again to add a second column (Figure


3-21).

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

3-18 Developer Fast Start

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

(Figure

3-24).

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
3-25. 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 the Show Conflicts button 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).

Developer Fast Start

3-19

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 the Show Conflicts button 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 the Apply
button 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.

3-20 Developer Fast Start

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
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

Developer Fast Start

3-21

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 object processing.)

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

3-22 Developer Fast Start

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

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 then 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
.

Developer Fast Start

3-23

When the decision table rule returns a value of False, the Vice Presidents
approval is not required. The following events occur automatically:

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.

3-24 Developer Fast Start

e. Connect the second connector head to the UpdateStatus Rejected utility


shape (Figure 3-35).

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.

Developer Fast Start

3-25

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).

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.)

3-26 Developer Fast Start

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

. The display returns to the flow

rule form.
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
3-40). 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


To complete the test, do the following:

Developer Fast Start

3-27

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.

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.

4-2 Developer Fast Start

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
object 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

to see the Flow

Action rule type.


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

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.
b. For the Action Name, enter VPApprove.
c.

For the RuleSet, select ESupply.

d. For the Version, select 01-01-03.

Developer Fast Start

4-3

Figure 4-2. New Flow Action Rule Instance


4. Click the Create button to create the new VPApprove flow action and
display the rule form in the Designer Studio. Click Save

to save the

VPApprove flow action rule to the system (Figure 4-3).

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.
b. Click the + icon to expand the User Interface category
Section rule type.

to see the

4-4 Developer Fast Start

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

Developer Fast Start

4-5

3. Click the Create button 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

4-6 Developer Fast Start

) to open the Basic panel. Select the

5. Click the Basic control group (

Input 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.

Figure 4-8. Add the Input Box Field


6. Click the magnifying glass icon (

) next to the Input Box cell. This opens

a Cell Properties panel (Figure 4-9).

Figure 4-9. Input Box Field Cell Properties Panel


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).

Developer Fast Start

b. Click the Open icon (

4-7

) 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 01-0103 is selected in the Version field. Click the Quick Create button 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.
7. 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

4-8 Developer Fast Start

8. 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.

Figure 4-11. Add the Text Area Field


9. 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.

Figure 4-12. Property List from SmartPrompt

Developer Fast Start

4-9

b. In the Display As field, use the SmartPrompt to select


TextAreaWithExpand (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.

10. 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.

11. 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.

4-10 Developer Fast Start

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
4-15). (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).

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

Developer Fast Start

3. Save the VPApprove flow action by clicking


4. 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. Click the X button at the top right of the Preview area to close it.
6. Click the VPApprove tabs close button ( ) to close the VPApprove flow
actions rule form.

4-11

4-12 Developer Fast Start

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.
1. Open the PurchaseOrder flow using the Application Explorer.
2. 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

Developer Fast Start

c.

4-13

Click the Apply button 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


d. Click Save (
e. Click Return

) to save your changes.


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

4-14 Developer Fast Start

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).

Figure 4-22. Approval Code


Click the Expand button ( ) to enter a note. Enter the information and click
Submit to finish the process.

Developer Fast Start

4-15

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).

Figure 4-25. Section Insert Row After Button

4-16 Developer Fast Start

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

to see the

Property rule type.


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


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.

Developer Fast Start

4-17

5. In the Label column, open the Cell Properties panel for the PaymentDate
label cell (click on

). 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 on
7. Click the

icon next to the Display As field (Figure 4-29). The Param

Window opens (Figure 4-30).

Figure 4-29. Display As Selection

4-18 Developer Fast Start

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 the Params button 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 object 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 object form in which users can
type to enter a date.

Developer Fast Start

4-19

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

to save the updated VPApproval section

rule form.
12. Click the Preview toolbar button

to view the effect of your changes in

the bottom half of the portal (Figure 4-32).

4-20 Developer Fast Start

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.

Developer Fast Start

4-21

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
ECorp-FW-ESupply-Work class, expand the Decision category, and then expand
the Declare Expressions category as shown in Figure 4-33.

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

4-22 Developer Fast Start

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.

Using the Declarative Rules Inspector


You can use the Declarative Rules Inspector to see which properties in the work
object 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 object form, a D link appears next to each
property that is calculated by a declarative rule.

Developer Fast Start

4-23

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


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
Declarative Rules.

> Rules Inspector >

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
industry-standard 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 Approval Code 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.

5-2 Developer Fast Start

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-the-box standard rules that are present in every Process Commander
system and which form the foundation building blocks of applications.

Developer Fast Start

5-3

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:

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 objects.

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).

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.

6-2 Developer Fast Start

Documenting the ESupply Application


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

Figure 6-1. Document Menu Item

) and then click

Developer Fast Start

6-3

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.

Figure 6-2. Application Documentation Wizard


2. On the Create Document screen of the wizard, click the Create Document
button. 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.

6-4 Developer Fast Start

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 Developer Fast Start guide. More information on the
ESupply application and appendices describing the Designer Studio toolbar and
tab bar and the typical workstation setup can be found in the following pages.

Appendix A:
Application Document for ESupply
The following pages show the document created by Process Commander for the
ESupply application.

Note: Page breaks and fonts in the generated ESupply document have been
modified for inclusion in this book.

A-2 Developer Fast Start

Application Document for ESupply


01.01.01
ESupply

Created by: Designer


On July 20, 2010

Developer Fast Start

A-3

Copyright 2010
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: July 20, 2010

A-4 Developer Fast Start

Contents
Overview of ESupply 01.01.01 .................................................................................................... A-6
Description ............................................................................................................................ A-6
Business Objectives ............................................................................................................ A-6
Actors .................................................................................................................................... A-6
Work Types ........................................................................................................................... A-6
RuleSets ................................................................................................................................ A-6
PurchaseOrder............................................................................................................................. A-7
PurchaseOrder - Flow .......................................................................................................... A-7
Other Use Cases (Not Referenced in the Application) .................................................... A-14
Properties Referenced ....................................................................................................... A-15
Other Classes ............................................................................................................................ A-17
Data-Party ........................................................................................................................... A-17
Data-Portal .......................................................................................................................... A-17
ECorp-Data-LineItemDetails .............................................................................................. A-17
ECorp-Data-Order ............................................................................................................... A-17
Reports ....................................................................................................................................... A-19
List Views ............................................................................................................................ A-19
Summary Views .................................................................................................................. A-19
Correspondence ........................................................................................................................ A-20
Acknowledgement Email ................................................................................................... A-20
Integration .................................................................................................................................. A-21
Services............................................................................................................................... A-21
Connectors ......................................................................................................................... A-21
Decisions.................................................................................................................................... A-22
Tables .................................................................................................................................. A-22
Trees .................................................................................................................................... A-22
Map Values.......................................................................................................................... A-22
Whens.................................................................................................................................. A-23
Security ...................................................................................................................................... A-24
SLAs ........................................................................................................................................... A-25

Developer Fast Start

A-5

Activities..................................................................................................................................... A-26
Properties ................................................................................................................................... A-27
Declaratives ............................................................................................................................... A-28
Expressions ........................................................................................................................ A-28
Triggers ............................................................................................................................... A-28
OnChange ........................................................................................................................... A-28
Requirements Matrix ................................................................................................................. A-29
Use Case Matrix ......................................................................................................................... A-30

A-6 Developer Fast Start

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

Type

Count

Access Method

employee

Operator

2000 Total Users Per Week

Browser

Fulfillment

Operator

3 Total Users Per Day

Browser

Manager

Operator

50 Total Users Per Week

Browser

Work Types
Name

Implementation Class

PurchaseOrder ECorp-FW-ESupply-Work-PurchaseOrder

RuleSets
RuleSet
ESupply

Version

Description

01-01-03 RuleSet to identify, manage, and control the set of rule


instances that define ESupply application

Prerequisites
Pega-ProcessCommander:06-01-01
ESupplyInt:01-01-01

ESupplyInt 01-01-01 Integration RuleSet for ESupply framework

Pega-ProcessCommander:06-01-01

ECorp

01-01-01 RuleSet to identify, manage, and control the set of rule


instances that define ECorp application

ECorpInt:01-01-01

ECorpInt

01-01-01 Integration RuleSet for ECorp organization

Pega-ProcessCommander:06-01-01

Developer Fast Start

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

Flow Diagram

A-7

A-8 Developer Fast Start

Primary Path
Start - Start

Implementation:
New
Referenced By:
PurchaseOrder - Flow (Page A-7)
Applies to Class: ECorp-FW-ESupply-Work
Short Description: New form for work objects
RuleSet:
ESupply : 01-01-02

ESupply PurchaseOrder PurchaseOrder - Use Case


Referenced By:
PurchaseOrder - Flow (Page A-7)
Rule Name: ESupply | PurchaseOrder | PurchaseOrder
Short Description: PurchaseOrder
RuleSet:
ESupply : 01-01-01
Details
Actors:
Triggers:
Complexity:

Any
Web Browser
Low

Description
Enter department information

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 A-8) in PurchaseOrder - Flow (Page A-7)
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

Interval from when assignment is ready


Days 2
+ HH:MM:SS 0 : 0 : 0
In Business Days? Yes
Urgency 0
Escalation Activity

Late
Repeating interval from Deadline

5
0:0:0

::

Yes

No

Developer Fast Start

Perform - Harness

Referenced By:
Enter Item Information - Assignment (Page A-9) in PurchaseOrder - Flow (Page A-7)
Applies to Class: ECorp-FW-ESupply-Work
Short Description: Perform form for work object
Long Description: Perform form for work objects
RuleSet:
ESupply : 01-01-02

ToCurrentOperator - Router

Implementation:
ToCurrentOperator
Parameters:
CheckAvailability = False

EnterItemInformation,100% - Transition

Implementation:
EnterItemInformation
Referenced By:
PurchaseOrder - Flow (Page A-7)
Applies to Class: ECorp-FW-ESupply-Work-PurchaseOrder
Short Description: Enter Item Information
RuleSet:
ESupply : 01-01-02

ESupply PurchaseOrder EnterItemInformation - Use Case


Referenced By:
PurchaseOrder - Flow (Page A-7)
Rule Name: ESupply | PurchaseOrder | EnterItemInformation
Short Description: EnterItemInformation
RuleSet:
ESupply : 01-01-02
Details
Actors:
Triggers:
Complexity:

Any
Web Browser
Medium

Description
Enter the items to purchase

Confirm Order - Assignment


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

Default - SLA
Referenced By:

Confirm Order - Assignment (Page A-8) in PurchaseOrder - Flow (Page A-7)

See Default (Page A-8)

Perform - Harness
Referenced By:

Confirm Order - Assignment (Page A-9) in PurchaseOrder - Flow (Page A-7)

See Perform (Page A-9)

A-9

A-10 Developer Fast Start

Withdraw - Local Action

Applies to Class: WorkShort Description: Withdraw Work Object


RuleSet:
Pega-ProCom : 06-01-01

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

Withdraw - FlowAction (Page A-10)


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:
ConfirmOrder
Referenced By:
PurchaseOrder - Flow (Page A-7)
Applies to Class: ECorp-FW-ESupply-Work-PurchaseOrder
Short Description: Confirm Order
RuleSet:
ESupply : 01-01-02

ESupply PurchaseOrder ConfirmOrder - Use Case


Referenced By:
PurchaseOrder - Flow (Page A-7)
Rule Name: ESupply | PurchaseOrder | ConfirmOrder
Short Description: Confirm Order
RuleSet:
ESupply : 01-01-01
Details
Actors:
Triggers:
Complexity:

Web Browser
Low

Description
Not Yet Defined

ManagerReview - Decision

Implementation:
ManagerReview
Referenced By:
PurchaseOrder - Flow (Page A-7)
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

Manager Approve Order - Assignment


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

Developer Fast Start

Default - SLA
Referenced By:

Manager Approve Order - Assignment (Page A-8) in PurchaseOrder - Flow (Page A-7)

See Default (Page A-8)

PerformManager - Harness

Referenced By:
Manager Approve Order - Assignment (Page A-11) in PurchaseOrder - Flow (Page A-7)
Applies to Class: ECorp-FW-ESupply-Work
Short Description: Perform form for work object
Long Description: Perform form for work objects
RuleSet:
ESupply : 01-01-02

ToOrgUnitManager - Router

Implementation:
ToOrgUnitManager
Parameters:
CheckAvailability = False

ManagerApprove,60% - Transition

Implementation:
ManagerApprove
Referenced By:
PurchaseOrder - Flow (Page A-7)
Applies to Class: ECorp-FW-ESupply-Work-PurchaseOrder
Short Description: Approve
RuleSet:
ESupply : 01-01-02

ESupply PurchaseOrder ApproveOrder - Use Case


Referenced By:
PurchaseOrder - Flow (Page A-7)
Rule Name: ESupply | PurchaseOrder | ApproveOrder
Short Description: ApproveOrder
RuleSet:
ESupply : 01-01-02
Details
Actors:
Triggers:
Complexity:

Any
Web Browser
Medium

Description
Manager must approve orders totaling more than $100

VPApproveOrder - Decision

Implementation:
VPApproveOrder
Referenced By:
PurchaseOrder - Flow (Page A-7)
Applies to Class: ECorp-FW-ESupply-Work-PurchaseOrder
Short Description: VPApproveOrder
RuleSet:
ESupply : 01-01-03
Conditions

Actions

Department Name Bill Customer Order Total

Return

if

IT

>1000

True

else if

HR

>500

True

else if

Finance

=False

True

A-11

A-12 Developer Fast Start

Conditions

Actions

else if

Finance

=True

>200

True

else if

Legal

=True

>500

True

else if

Legal

=False

>200

True

Otherwise

False

UpdateStatus Completed - Utility

Implementation:
UpdateStatus
Parameters:
StatusWork = Resolved-Completed
PurchaseOrder - Flow (Page A-7)
Referenced By:
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-01

Send Correspondence - Utility

Implementation:
CorrCreateAndSend
Parameters:
SendAllAttachments = False
Broadcast = False
CorrName = Acknowledgement
PartyRole = Originator
PurchaseOrder - Flow (Page A-7)
Referenced By:
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:

VPApproval - Assignment (Page A-8) in PurchaseOrder - Flow (Page A-7)

See Default (Page A-8)

Developer Fast Start

PerformManager - Harness
Referenced By:

VPApproval - Assignment (Page A-11) in PurchaseOrder - Flow (Page A-7)

See PerformManager (Page A-11)

ToVP - Router

Implementation:
ToVP
Parameters:
CheckAvailability = False

VPApprove,75% - Transition

Implementation:
VPApprove
Referenced By:
PurchaseOrder - Flow (Page A-7)
Applies to Class: ECorp-FW-ESupply-Work-PurchaseOrder
Short Description: VPApprove
RuleSet:
ESupply : 01-01-03

Alternate Path 2
Reject,25% - Transition

Implementation:
Reject
Referenced By:
PurchaseOrder - Flow (Page A-7)
Applies to Class: WorkShort Description: Reject
Long Description: This flow action is for rejecting the work object.
Usage:
Used by the StandardEvaluate flow. Approval flows should use the Disapprove flow action, not Reject.
RuleSet:
Pega-EndUserUI : 06-01-10

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

Reject - FlowAction (Page A-13)


WorkSet the resolved properties
Called by the flow action Resolve/Reject/ResolveAsDuplicate.

casad created in 050401


Pega-ProCom : 06-01-01

UpdateStatus Rejected - Utility

Implementation:
UpdateStatus
Parameters:
StatusWork = Resolved-Rejected
PurchaseOrder - Flow (Page A-7)
Referenced By:
See UpdateStatus (Page A-12)

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

Reject
PurchaseOrder - Flow (Page A-7)

See Reject (Page A-13)

A-13

A-14 Developer Fast Start

ActionResolve - Activity
Referenced By:

Reject - FlowAction (Page A-13)

See ActionResolve (Page A-13)

Other Referenced Rules


Confirm - Harness

Referenced By:
PurchaseOrder - Flow (Page A-7)
Applies to Class: ECorp-FW-ESupply-Work
Short Description: Confirmation form for work objects
RuleSet:
ESupply : 01-01-01

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:

employee
Web Browser
Low

Description
Department information is defaulted into the purchase request form but the employee can overwrite it if not correct.

ESupply PurchaseOrder RejectOrder - Use Case


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

Manager
Web Browser
Low

Description
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

RejectReason Reject
reason

Category
Business
Rule

Status
New

Description
A list of reject reasons is presented to managers and fulfillment operators who
select from the list.

Developer Fast Start

Properties Referenced
Rule Name

Label

Mode

Type

RuleSet

AddShipping

AddShipping

Single Value TrueFalse

ESupply

Approval Code

ApprovalCode

Single Value Text

ESupply

Bill Customer

Bill Customer

Single Value TrueFalse

ESupply

ContactInformation

Contact Information

Page

ESupply

Department Name

Department Name

Single Value Text

ESupply

Department Number

Department Number

Single Value Text

ESupply

Order

OrderTest

PageList

Order Date

Order Date

Single Value Date

ESupply

OrderTotal

Order Total

Single Value Decimal

ESupply

PaymentDate

PaymentDate

Single Value Date

ESupply

py AgeFromDate

Age From date

Single Value DateTime

Pega-ProCom

py AttachmentCategories pyAttachmentCategories

StringList

Pega-ProCom

py ButtonLabel

Button Label

Single Value Identifier

Pega-WB

py Caption

Caption

Single Value Identifier

Pega-WB

py ConfirmationNote

Confirmation Note

Single Value Text

Pega-ProCom

py DuplicateID

Duplicate ID

Single Value Text

Pega-ProCom

py ElapsedStatusNew

Elapsed in Status New

Single Value Decimal

Pega-ProCom

py ElapsedStatusOpen

Elapsed in Status Open

Single Value Decimal

Pega-ProCom

py ElapsedStatusPending Elapsed in Status Pending

Single Value Decimal

Pega-ProCom

py FlowName

Flow Name

Single Value Text

Pega-ProCom

py ID

Work ID

Single Value Text

Pega-ProCom

py Instructions

Instructions

Single Value Text

Pega-ProCom

py Label

Label

Single Value Text

Pega-ProCom

py NextEmail ThreadID

pyPropertyName

Single Value Integer

Pega-ProCom

py Note

Routing/Transfer note

Single Value Text

Pega-ProCom

py NotifyQuick Stream

pyNotifyQuickStream

Single Value Text

Pega-ProCom

py OrigDivision

Originating Division

Single Value Text

Pega-ProCom

py OrigOrg

Originating Organization

Single Value Text

Pega-ProCom

py OrigOrgUnit

Originating OrgUnit

Single Value Text

Pega-ProCom

py OrigUserDivision

Originating User Division

Single Value Text

Pega-ProCom

py OrigUserID

Originating User ID

Single Value Text

Pega-ProCom

py OrigUserWorkgroup

Originating User Workgroup

Single Value Text

Pega-ProCom

py OwnerDivision

Owner Division

Single Value Text

Pega-ProCom

py OwnerOrg

Owner Organization

Single Value Text

Pega-ProCom

py OwnerOrg Unit

Owner OrgUnit

Single Value Text

Pega-ProCom

Data-Party

ECorp-Data-Order ESupply

Text

A-15

A-16 Developer Fast Start

Rule Name

Label

Mode

Type

RuleSet

py ProblemReason

Problem Reason

Single Value Text

Pega-ProCom

py RootCause

Root Cause

Single Value Text

Pega-ProCom

py Selected

Selection Flag

Single Value TrueFalse

Pega-ProCom

py SLAName

SLA name

Single Value Text

Pega-ProCom

py StatusCustomerSat

Customer Satisfaction Status Single Value Text

Pega-ProCom

py StatusWork

Work Status

Single Value Text

Pega-ProCom

py TemplateInputBox

InputboxTemplate

Single Value Text

Pega-ProCom

py Urgency WorkAdjust

Urgency added by user

Single Value Decimal

Pega-ProCom

py Work IDPrefix

Work ID Prefix

Single Value Text

Pega-ProCom

Developer Fast Start

Other Classes
Data-Party
Properties Referenced
Rule Name

Label

Mode

Type

RuleSet

py City

City/Town

Single Value Text Pega-ProCom

py FirstName

First Name

Single Value Text Pega-ProCom

py HomeAddress1 pyHomeAddress1 Single Value Text Pega-ProCom


py HomeAddress2 pyHomeAddress2 Single Value Text Pega-ProCom
py LastName

Last Name

Single Value Text Pega-ProCom

py Postal Code

Postal Code

Single Value Text Pega-ProCom

py State

State/County

Single Value Text Pega-ProCom

Data-Portal
Properties Referenced
Rule Name

Label

Mode

Type

RuleSet

py Portal Skin 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

Label

Mode

Type

RuleSet

A-17

A-18 Developer Fast Start

Rule Name

Label

Mode

Type

ItemName

ItemName

LineItemTotal

LineItemTotal Single Value Decimal ESupply

Quantity

Quantity

Single Value Integer

UnitPrice

UnitPrice

Single Value Decimal ESupply

py ActionPrompt Action
py RowStatus

Single Value Text

RuleSet

Single Value Text

pyRowStatus Single Value Text

ESupply
ESupply
Pega-WB
Pega-UIEngine

Developer Fast Start

Reports
List Views
Applies To

Name

Assign-Worklist

Work ListEmbed

ECorp-Data-LineItem
Details

DataTableClass Editor

Summary Views
None found

Description

RuleSet
ESupply

Added by wizard

ESupply

A-19

A-20 Developer Fast Start

Correspondence
Acknowledgement Email

Applies to Class: ECorp-FW-ESupply-Work


Short Description: Acknowledgement
RuleSet:
ESupply : 01-01-02

Developer Fast Start

Integration
Services
None found

Connectors
None found

A-21

A-22 Developer Fast Start

Decisions
Tables
VPApproveOrder

Applies to Class: ECorp-FW-ESupply-Work-PurchaseOrder


Short Description: VPApproveOrder
RuleSet:
ESupply : 01-01-03
Conditions

Actions

Department Name Bill Customer Order Total

Return

if

IT

>1000

True

else if

HR

>500

True

else if

Finance

=False

else if

Finance

=True

>200

True

else if

Legal

=True

>500

True

else if

Legal

=False

>200

True

True

Otherwise

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

False

Developer Fast Start

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")

A-23

A-24 Developer Fast Start

Security
Access Group

Role Name

ESupply:Administrators

PegaRULES:SysAdm4

ESupply:WorkManager

PegaRULES:WorkMgr4

ESupply:WorkUser

PegaRULES:User4

Developer Fast Start

SLAs
None found

A-25

A-26 Developer Fast Start

Activities
Applies To

Name

Description

RuleSet

Version

Assignment classes

getOrderInfo

getWork ItemInfo

ESupply

01-01-02

ECorp-Data-Order

Copy UnitPrice

Copy UnitPrice

ESupply

01-01-02

ESupply - Framework

getItemDetails

getItemDetails

ESupply

01-01-02

Work classes

ToVP

BPM Routing API: Assign


to specific operator's
worklist

ESupply

01-01-02

Developer Fast Start

A-27

Properties
Applies To

Name

Description

Mode

RuleSet

Version

ECorp-Data-LineItem
Details

ItemName

Item Name

String

ESupply

01-01-02

ECorp-Data-LineItem
Details

Price

Price

String

ESupply

01-01-02

ECorp-Data-Order

ItemName

ItemName

String

ESupply

01-01-02

ECorp-Data-Order

LineItemTotal

LineItemTotal

String

ESupply

01-01-02

ECorp-Data-Order

Quantity

Quantity

String

ESupply

01-01-02

ECorp-Data-Order

UnitPrice

UnitPrice

String

ESupply

01-01-02

ECorp-FW-ESupplyWork

Bill Customer

Bill Customer

String

ESupply

01-01-02

ECorp-FW-ESupplyWork

Department Name

Department Name

String

ESupply

01-01-02

ECorp-FW-ESupplyWork

Department Number

Department Number

String

ESupply

01-01-02

ECorp-FW-ESupplyWork

ItemDetails

Order

PageList

ESupply

01-01-02

ECorp-FW-ESupplyWork

Order

OrderTest

PageList

ESupply

01-01-02

ECorp-FW-ESupplyWork

Order Date

Order Date

String

ESupply

01-01-02

ECorp-FW-ESupplyWork

OrderTotal

Order Total

String

ESupply

01-01-02

ECorp-FW-ESupplyWork-PurchaseOrder

AddShipping

AddShipping

String

ESupply

01-01-02

ECorp-FW-ESupplyWork-PurchaseOrder

Approval Code

Approval Code

String

ESupply

01-01-03

ECorp-FW-ESupplyWork-PurchaseOrder

ContactInformation

Contact Information

Page

ESupply

01-01-02

ECorp-FW-ESupplyWork-PurchaseOrder

PaymentDate

PaymentDate

String

ESupply

01-01-02

A-28 Developer Fast Start

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

Developer Fast Start

A-29

Requirements Matrix
Requirement

Category

External Status
ID

Approval Level Business


Rule
Purchase
Items

Description

Linked To

Purchase requests are routed to managers based on total


dollar values as described in the corporate accounting
manual.

Business
Rule

New

The list of items an employee can request is based on the


employee's grade level.

EnterItem
Information ( Use
Case)

RejectReason Business
Rule

New

A list of reject reasons is presented to managers and


fulfillment operators who select from the list.

RejectOrder (Use
Case)

A-30 Developer Fast Start

Use Case Matrix


Application

Work type

Use Case

Linked To

Flow Shape

ESupply

PurchaseOrder ApproveOrder

PurchaseOrder (Flow) ManagerApprove (Flow Action)

ESupply

PurchaseOrder ConfirmOrder

PurchaseOrder (Flow) ConfirmOrder (Flow Action)

ESupply

PurchaseOrder ConfirmOrder

PurchaseOrder (Flow) 0 (Flow Action)

ESupply

PurchaseOrder ConfirmOrder

PurchaseOrder (Flow) ConfirmOrder (Flow Action)

ESupply

PurchaseOrder EnterDeptInformation

ESupply

PurchaseOrder EnterItemInformation PurchaseOrder (Flow) EnterItemInformation (Flow Action)

ESupply

PurchaseOrder PurchaseOrder

PurchaseOrder (Flow) New (Harness)

ESupply

PurchaseOrder RejectOrder

PurchaseOrder (Flow) 0 (Flow Action)

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

Button

Function

Availability

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.

B-2 Developer Fast Start

Name
Check Out

Button

Function
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

Deletes a rule or data instance.

Delete Check-out

Deletes a checked-out rule from your personal RuleSet, effectively


cancelling the check out. The original instance is not affected.

Draft On/Off

Click to toggle draft mode on or off. Elements of this flow rule may
reference activities, flow actions, or other objects not yet defined.

Favorites

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.

Flow Editor

Starts Visio for editing or reviewing the flow.

Help

Opens the help system at the help topic for the currently displayed rule or
data form.

Launch

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

Splits the workspace to present a partial preview of the runtime


appearance of a rule in the bottom half of the split workspace.

Recover

Recovers the most recent version of a deleted rule, if the RuleSet and
version combination is unlocked.

Developer Fast Start

Name

Button

Function

Related Rules

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

Replaces the current checked-in copy of a rule with the last checked-in
copy of that rule.

Return

Exits Visio and returns to normal editing mode.

Rule Data

Shows the XML document that makes up the form displaying this instance.
This is primarily a debugging tool.

Run

Starts execution or testing of the current rule, in the current context.

Save

Saves the instance to the PegaRULES database.

Save As

Saves the instance under a different name, RuleSet, or version.

Show Java

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

In Visio editing of flow, undoes the most recent operation.

Visio Tools

Toggle to display or hide Visio toolbars during Visio editing.

Zoom In (Visio)

Zoom in on the Visio diagram, to make the diagram larger.

Zoom Out (Visio)

Zoom out from the Visio diagram, to make the diagram smaller.

Figure B-1. Workspace Toolbar Buttons

B-3

B-4 Developer Fast Start

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
), Refresh ( ), and Close ( ) icons. Click on a tab to
Currently Open (
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

Button

Function

Home

Click to return to the Whats Happening display and your home view of the
portal

Currently Open

Click to list all currently open rules or other displays in a drop-down 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

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

Figure B-2. Tab Bar Buttons

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

C-2 Developer Fast Start

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 Developer Fast Start 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.

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

Developer Fast Start

C-3

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.

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

C-4 Developer Fast Start

is identified (in the URL in the browsers Address or Location bar) by an IP


address or by a domain-qualified 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.

Developer Fast Start

C-5

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 (


the Home display.

) at the left of the Designer Studio tab bar to return to

C-6 Developer Fast Start

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 SP1 operates with Visio 2007 if you save files in Visio
2002 format. To configure Visio 2007:
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.

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.

Developer Fast Start

C-7

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 the Enable Macros
button 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.

Appendix D
Installing the ESupply Application
and Application Profile
The DeveloperFastStart_V61SP1.zip file contains two zip files:

ESupply_V61SP1.zip is the application

ESupply_AP.zip is the application profile on which the ESupply application


was based when initially created

You use the Import tool of Process Commander to first install the application, and
then install its application profile.

Installing the ESupply Application and Application Profile


1. Open the DeveloperFastStart_V61SP1.zip and locate the
ESupply_V61SP1.zip and ESupply_AP.zip files. Save both zip files to your
local directory.
2. Log into your Process Commander system using an operator ID and
password that has the appropriate privileges to import rules (for example,
privileges similar to those given by the PegaRULES:SysAdm4 access role).
The Designer Studio opens.
3. In the Designer Studio, select the Pega logo button (
Application > Import & Export > Import (Figure D-1).

) and then click

D-2 Developer Fast Start

Figure D-1. Designer Studio Import


4. Select Local Zip File for the import mode, and in the File Name field
browse for the ESupply_V61SP1.zip file. Click the Upload file button
(Figure D-2).

Figure D-2. Import gadget on Import & Export Landing Page

Developer Fast Start

5. When the system has uploaded the zip file, select the following import
options as shown in Figure D-3:

Compile Libraries

Update Only If Newer

Overwrite Existing Rules

Overwrite Existing Data

Figure D-3. Import Options


6. Click Import.
7. When the import process is complete, click the refresh button (
upper right corner to refresh the landing page.

) in the

D-3

D-4 Developer Fast Start

8. Select Local Zip File for the import mode, and in the File Name field
browse for the ESupply_AP.zip file. Click the Upload file button (Figure
D-4).

Figure D-4. Import ESupply_AP.zip


9. When the system has uploaded the zip file, select the following import
options as shown in:

Compile Libraries

Update Only If Newer

Overwrite Existing Rules

Overwrite Existing Data

Figure D-5. Import Options for ESupply_AP.zip


10. Click Import.
When the import process is complete, log out of Process Commander. The
ESupply application is ready to use in the hands-on exercises.

Appendix E
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/EducationalServices. 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)

E-2 Developer Fast Start

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: docteam@pega.com.

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

Você também pode gostar