+ All Categories
Home > Documents > DeveloperFastStart_V61SP1

DeveloperFastStart_V61SP1

Date post: 01-Jun-2018
Category:
Upload: anonymous-uurvuct
View: 215 times
Download: 0 times
Share this document with a friend

of 134

Transcript
  • 8/9/2019 DeveloperFastStart_V61SP1

    1/134

     

    Developer Fast Start

    PegaRULES Process Commander ®  V6.1 SP1

  • 8/9/2019 DeveloperFastStart_V61SP1

    2/134

    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 namesare 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 StreetCambridge, MA 02142-1590

    Phone: (617) 374-9600Fax: (617) 374-9620www.pega.com

    PegaRULES Process Commander®

     Document: Developer Fast StartSoftware Version 6.1 SP1

    Updated: August 4, 2010

  • 8/9/2019 DeveloperFastStart_V61SP1

    3/134

     

    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 Appl ication .............................................................................................. 2-1 

    Creati ng a Purchase Order .................................................................................................. 2-2 

     Adding Items to Your Purchase Order ........................................................................ 2-6 

     Approv ing the Purchase Order Request .......................................................................... 2-12 

    Chapter 3: Improving the Appl ication ....................................................................................... 3-1 

    Changing the Purchase Order Request Process ............................................................... 3-4 

    Defining a New Decision Table Rule .......................................................................... 3-13 

    Edi ting 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 Secti on ru le to a Flow Act ion ....................................................................... 4-9 

    Edi ting the Flow .................................................................................................................. 4-12 

     Adding a Data Field ............................................................................................................ 4-15 

    Inspecting Declarative Rules ............................................................................................. 4-21 

    Using the Declarative Rules Inspector ...................................................................... 4-22 

    Chapter 5: Review ing Your Appl ication.................................................................................... 5-1 

    Developing Applications by Changing Rules .................................................................... 5-1 

    Technology Under the Covers ............................................................................................ 5-3 

    Chapter 6: Document ing Your Appl ication .............................................................................. 6-1 

    Documenting the ESupply Application .............................................................................. 6-2 

     Appendix A: Appl ication Document fo r 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 

  • 8/9/2019 DeveloperFastStart_V61SP1

    4/134

    2  Developer Fast Start 

     Appendix C: Workstat ion Setup ................................................................................................ C-1 

    Internet Explorer Sett ings .................................................................................................... C-2 

    Temporary Internet Files Settings ............................................................................... C-2 

    Downloaded Program Files .......................................................................................... C-2 

    Other Securi ty Setti ngs ................................................................................................ C-3 

    Performance Tips and Keyboard Shortcuts ....................................................................... C-5 

    Visio Setti ngs ........................................................................................................................ C-6 

    Visio Versions................................................................................................................ C-6 

    Setting up Visio to Work With Flows ........................................................................... C-6  

     Appendix D: Instal ling the ESupply Appl ication and Appl ication Profi le .............................. 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 

  • 8/9/2019 DeveloperFastStart_V61SP1

    5/134

     

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

  • 8/9/2019 DeveloperFastStart_V61SP1

    6/134

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    7/134

    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, andImproving 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.

    http://www.bpmg.org/http://www.bpmg.org/http://www.bpmg.org/http://www.bpmg.org/

  • 8/9/2019 DeveloperFastStart_V61SP1

    8/134

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    9/134

    Developer Fast Start  1-5

    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 includingtroubleshooting and “how-to” information as well as a comprehensive and

    searchable knowledgebase to help speed application development.

    http://pdn.pega.com/http://pdn.pega.com/http://pdn.pega.com/http://pdn.pega.com/

  • 8/9/2019 DeveloperFastStart_V61SP1

    10/134

  • 8/9/2019 DeveloperFastStart_V61SP1

    11/134

     

    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 thebusiness process, appearance, and functions supported by the application.

  • 8/9/2019 DeveloperFastStart_V61SP1

    12/134

    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 organization’s system

    administrator. It is typically in the format:

    http ://:/prweb/PRServlet, where  is the

    system on which Process Commander is installed and  is the

    assigned port. The URL is case sensitive.

    Figure 2-1. Process Commander Login Screen

  • 8/9/2019 DeveloperFastStart_V61SP1

    13/134

    Developer Fast Start  2-3

    2. Log into the system as [email protected] 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 yourcompany’s 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 user’s worklist . In the above example, the worklist is empty

    (displaying the message “No matching data was found”). Each user’s worklist

    mailto:[email protected]:[email protected]

  • 8/9/2019 DeveloperFastStart_V61SP1

    14/134

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

    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

  • 8/9/2019 DeveloperFastStart_V61SP1

    15/134

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

  • 8/9/2019 DeveloperFastStart_V61SP1

    16/134

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

  • 8/9/2019 DeveloperFastStart_V61SP1

    17/134

    Developer Fast Start  2-7

    3. Click the Add a row  icon  to add another row. Select another item and

    enter its quantity. If you want, you can add additional rows and more items.

    Figure 2-8 shows an example.

    Figure 2-8. Purchase Order Line Items

    Note:  If you make a mistake and want to delete an item’s 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).

  • 8/9/2019 DeveloperFastStart_V61SP1

    18/134

    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 process’s

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    19/134

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

  • 8/9/2019 DeveloperFastStart_V61SP1

    20/134

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    21/134

    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 manager’s 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 (close) icon in the form. Then click Log Off  to

    log out of the portal.

  • 8/9/2019 DeveloperFastStart_V61SP1

    22/134

    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 [email protected] 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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    23/134

    Developer Fast Start  2-13

    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 manager’s worklist appears in the portal.

    Figure 2-15. Manager’s Worklist

  • 8/9/2019 DeveloperFastStart_V61SP1

    24/134

    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 order’s work object ID to open it so that you can act on it

    (Figure 2-17).

    Figure 2-17. Take Action Form

  • 8/9/2019 DeveloperFastStart_V61SP1

    25/134

    Developer Fast Start  2-15

    5. Click Approv e 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 purchaseorder 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 real-

    time reports about progress, volume, backlogs, and trends.

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

    log out of the portal.

  • 8/9/2019 DeveloperFastStart_V61SP1

    26/134

  • 8/9/2019 DeveloperFastStart_V61SP1

    27/134

     

    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 ECorp’s business practices, you will modify the

    process flow to require a Vice President’s (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)

  • 8/9/2019 DeveloperFastStart_V61SP1

    28/134

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    29/134

    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

  • 8/9/2019 DeveloperFastStart_V61SP1

    30/134

    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

    application’s 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

    mailto:[email protected]:[email protected]

  • 8/9/2019 DeveloperFastStart_V61SP1

    31/134

    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

  • 8/9/2019 DeveloperFastStart_V61SP1

    32/134

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

    01-03. Then you make updates to the new copy.

  • 8/9/2019 DeveloperFastStart_V61SP1

    33/134

    Developer Fast Start  3-7

    3. Click Save As 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 Appl ies 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)

  • 8/9/2019 DeveloperFastStart_V61SP1

    34/134

    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 thatcase, close the dialog box. Update Visio as described in Appendix C and

    try again.

  • 8/9/2019 DeveloperFastStart_V61SP1

    35/134

    Developer Fast Start  3-9

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    36/134

    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, auser or manager) to enter information or record their decisions. The orange

    diamond shape labeled ManagerReview identifies an automated decision. In

    this process, the automated decision has two outcomes: True or False.

    Note: The Visio tool contains a Flow Properties panel where you can

    choose which stencil to use to depict the flow. Each stencil has shapes

    that correspond to that stencil in terms of color, borders, etc. The default

    is the FlowStandard stencil. If you choose a different stencil in the drop-

    down list, the flow diagram in the Flow Editor refreshes to reflect that

    stencil’s 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

  • 8/9/2019 DeveloperFastStart_V61SP1

    37/134

    Developer Fast Start  3-11

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

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

    active.

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    38/134

    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, you’ll 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 Appl ies To field.

     – The Purpose field should be VPApproveOrder; if not, change it

  • 8/9/2019 DeveloperFastStart_V61SP1

    39/134

    Developer Fast Start  3-13

     – The RuleSet should be ESupply; if not, change it

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

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

    Figure 3-16. Decision Table Rule Form

    Defin ing a New Decision Table Rule1. In the Decision Table rule form, click the Results tab to bring it to the front

    (Figure 3-17). Complete two rows of the Al lowed Resul ts 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

  • 8/9/2019 DeveloperFastStart_V61SP1

    40/134

    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 Custom er Order Total

    IT >$1,000

    HR >$500

    Finance No

    Finance Yes >$200

    Legal Yes >$500Legal 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).

  • 8/9/2019 DeveloperFastStart_V61SP1

    41/134

    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 keyboard’s

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    42/134

    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 (Figure3-20).

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

  • 8/9/2019 DeveloperFastStart_V61SP1

    43/134

    Developer Fast Start  3-17

    b. Click the Insert Column After icon . A new column appears to the right

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

    3-21).

    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

  • 8/9/2019 DeveloperFastStart_V61SP1

    44/134

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

  • 8/9/2019 DeveloperFastStart_V61SP1

    45/134

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

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

  • 8/9/2019 DeveloperFastStart_V61SP1

    46/134

    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

  • 8/9/2019 DeveloperFastStart_V61SP1

    47/134

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

    [email protected] (Figure 3-31):

    a. Select and drag a router shape from the Shapes stencil onto the

    flow diagram.

    mailto:[email protected]:[email protected]

  • 8/9/2019 DeveloperFastStart_V61SP1

    48/134

    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

     Appl y. (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 inputbox 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

    .

  • 8/9/2019 DeveloperFastStart_V61SP1

    49/134

    Developer Fast Start  3-23

    When the decision table rule returns a value of False, the Vice President’s

    approval is not required. The following events occur automatically:

     – The request’s 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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    50/134

    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 Appl y.

    11. Complete the Connector Properties panel for the connector that leads to

    the UpdateStatus Rejected utility shape.

  • 8/9/2019 DeveloperFastStart_V61SP1

    51/134

    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 valuebetween 1 and 100. It reflects an assumed or known probability of the

    human actor taking that action.)

  • 8/9/2019 DeveloperFastStart_V61SP1

    52/134

    3-26  Developer Fast Start 

    Figure 3-39. Reject Connector Properties

    d. Click Appl y.

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

  • 8/9/2019 DeveloperFastStart_V61SP1

    53/134

    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 VP’sreview.

    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, therequest 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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    54/134

  • 8/9/2019 DeveloperFastStart_V61SP1

    55/134

     

    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, ECorp’s 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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    56/134

    4-2  Developer Fast Start 

    Build ing 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 form’s 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 Appl ies 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.

    mailto:[email protected]:[email protected]

  • 8/9/2019 DeveloperFastStart_V61SP1

    57/134

    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.

    Build ing 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 to see the

    Section rule type.

  • 8/9/2019 DeveloperFastStart_V61SP1

    58/134

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

  • 8/9/2019 DeveloperFastStart_V61SP1

    59/134

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

  • 8/9/2019 DeveloperFastStart_V61SP1

    60/134

    4-6  Developer Fast Start 

    5. Click the Basic control group ( ) to open the Basic panel. Select the

    Input Box item and drag it to the Field column cell next to the Appr ov al

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

  • 8/9/2019 DeveloperFastStart_V61SP1

    61/134

    Developer Fast Start  4-7

    b. Click the Open icon ( ) next to the Property field. This opens a

    Properties New Rule Instance dialog (Figure 4-10).

    Figure 4-10. New Property Rule Instance

    c. Make sure that ESupply is selected in the RuleSet field and that 01-01-

    03 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 Approv al Code label). Open the Cell

    Properties Panel (by clicking ) and enter Note in the Value field. Click

    OK.

  • 8/9/2019 DeveloperFastStart_V61SP1

    62/134

    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 Appl y.

    Figure 4-12. Property List from SmartPrompt

  • 8/9/2019 DeveloperFastStart_V61SP1

    63/134

    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 tab’s close button ( ) to close the VPApproval

    section’s rule form.

     Adding a Section rule to a Flow Act ion

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    64/134

    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 theVPApprove rule form to where 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

  • 8/9/2019 DeveloperFastStart_V61SP1

    65/134

    Developer Fast Start  4-11

    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 tab’s close button ( ) to close the VPApprove flow

    action’s rule form.

  • 8/9/2019 DeveloperFastStart_V61SP1

    66/134

    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 ManagerApprov e with VPApprove.

    Figure 4-19. Connector Properties for VPApprove

  • 8/9/2019 DeveloperFastStart_V61SP1

    67/134

    Developer Fast Start  4-13

    c. 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 ( ) to save your changes.

    e. Click Return to close the Flow Editor and return to the

    PurchaseOrder rule form.

    3. Test the revised process to verify that the VP is now required to enter an

     Approval Code and an optional note when approving a purchase order

    request.

    To complete the test, do the following steps:

    a. Click the Run icon ( ) in the Quick Launch bar and select Run Process

    > Purchase Order .

    b. Create a purchase order request that requires VP approval. The

    requirements are stated in the decision rule table you created in Figure

    3-25. For example, enter HR as the Department Name and select one

    laptop, which requires VP approval because it is over $500.

    c. As manager, approve the request.

    d. Click the VP Approval Required link. The VP sees the Take Action box

    shown in Figure 4-21. 

    Figure 4-21. Take Action for VP

  • 8/9/2019 DeveloperFastStart_V61SP1

    68/134

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    69/134

    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

  • 8/9/2019 DeveloperFastStart_V61SP1

    70/134

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

  • 8/9/2019 DeveloperFastStart_V61SP1

    71/134

    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

  • 8/9/2019 DeveloperFastStart_V61SP1

    72/134

    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 Al low Text Field En try check box. This selection

    provides a text field in the work object form in which users can

    type to enter a date.

  • 8/9/2019 DeveloperFastStart_V61SP1

    73/134

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

  • 8/9/2019 DeveloperFastStart_V61SP1

    74/134

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    75/134

    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 item’s 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

  • 8/9/2019 DeveloperFastStart_V61SP1

    76/134

    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 don’t 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 eachproperty that is calculated by a declarative rule.

  • 8/9/2019 DeveloperFastStart_V61SP1

    77/134

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

    Declarative Rules.

  • 8/9/2019 DeveloperFastStart_V61SP1

    78/134

  • 8/9/2019 DeveloperFastStart_V61SP1

    79/134

     

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

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    80/134

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    81/134

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

  • 8/9/2019 DeveloperFastStart_V61SP1

    82/134

  • 8/9/2019 DeveloperFastStart_V61SP1

    83/134

     

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    84/134

    6-2  Developer Fast Start 

    Documenting the ESupply Application

    1. In the Designer Studio, select the Pega logo button ( ) and then click

     Appl ic ation > Tools > Document  (Figure 6-1).

    Figure 6-1. Document Menu Item

  • 8/9/2019 DeveloperFastStart_V61SP1

    85/134

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    86/134

    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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    87/134

     

     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.

  • 8/9/2019 DeveloperFastStart_V61SP1

    88/134

     A-2  Developer Fast Start 

    Application Document for ESupply

    01.01.01

    ESupply  

    Created by: DesignerOn July 20, 2010

  • 8/9/2019 DeveloperFastStart_V61SP1

    89/134

    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 secretsand 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 includedin 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 StreetCambridge, MA 02142-1590

    Phone: (617) 374-9600Fax: (617) 374-9620www.pega.com

    Document Name: Application Document

    Updated: July 20, 2010

  • 8/9/2019 DeveloperFastStart_V61SP1

    90/134

     A-4  Developer Fast Start 

    Contents

    Overview of ESupply 01.01.01 .................................................................................................... A-6 

    Descr ip tion ............................................................................................................................ A-6 

    Business Object ives ............................................................................................................ 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-Por tal .......................................................................................................................... A-17 

    ECorp -Data-LineItemDetail s .............................................................................................. 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 

    Decis ions .................................................................................................................................... A-22 

    Tables .................................................................................................................................. A-22 

    Trees .................................................................................................................................... A-22 

    Map Values .......................................................................................................................... A-22 

    Whens .................................................................................................................................. A-23 

    Securi ty ...................................................................................................................................... A-24 

    SLAs ........................................................................................................................................... A-25 

  • 8/9/2019 DeveloperFastStart_V61SP1

    91/134

    Developer Fast Start   A-5

     Activi ties ..................................................................................................................................... A-26 

    Properties ................................................................................................................................... A-27 

    Declarat ives ............................................................................................................................... A-28 

    Expressions ........................................................................................................................ A-28 

    Triggers ............................................................................................................................... A-28 

    OnChange ........................................................................................................................... A-28 

    Requirements Matr ix ................................................................................................................. A-29 

    Use Case Matr ix ......................................................................................................................... A-30 

  • 8/9/2019 DeveloperFastStart_V61SP1

    92/134

     A-6  Developer Fast Start 

    Overview of ESupply 01.01.01

    DescriptionInitial implementation of a system that will centralize