+ All Categories
Home > Documents > PRPC Build Your First Application

PRPC Build Your First Application

Date post: 02-Jan-2016
Category:
Upload: abhijit-saha
View: 85 times
Download: 3 times
Share this document with a friend
Description:
Creating new Application in PRPC
Popular Tags:
134
1 Tutorial: Building Your First Application Tuesday, March 06, 2012
Transcript
Page 1: PRPC Build Your First Application

1

Tutorial: Building Your First Application

Tuesday, March 06, 2012

Page 2: PRPC Build Your First Application

1

© Copyright 2011

Pegasystems Inc., Cambridge, MA

All rights reserved.

This document describes products and services of Pegasystems Inc. It may contain trade secrets and proprietary infor-mation. The document and product are protected by copyright and distributed under licenses restricting their use, copyingdistribution, 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 thediscretion 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. Ifyou have questions about whether a particular capability is included in your installation, please consult your Pegasystemsservice consultant.

For Pegasystems trademarks and registered trademarks, all rights reserved. Other brand or product names are trade-marks of their respective holders.

Although Pegasystems Inc. strives for accuracy in its publications, any publication may contain inaccuracies or typo-graphical errors. This document or Help System could contain technical inaccuracies or typographical errors. Changesare periodically added to the information herein. Pegasystems Inc. may make improvements and/or changes in the infor-mation described herein at any time.

This document is the property of:

Pegasystems Inc.

101Main Street

Cambridge, MA 02142-1590

Phone: (617) 374-9600

Fax: (617) 374-9620

www.pega.com

Updated: Tuesday, March 06, 2012

Page 3: PRPC Build Your First Application

2

About this tutorial 1

Audience 1

The scenario 2

Tutorial structure 2

Conventions 3

Navigation 3

Images 3

Application login 3

Errors and enhancements 4

Prerequisites 4

Importing the starter kit 5

About the starter kit 6

Business objectives, work type, use cases, and requirements 7

Globex's Onboarding project's business objectives 7

Equipment Request process and work type 7

Business process atomic use cases 7

Actors 8

Business requirements 8

Use case descriptions 9

Step 1: Create the application profile 11

Part A: Capture basic project details 11

Part B: Capture essential process steps using the Discovery Map 17

Part C: Complete capturing information in the Application Profiler 25

Review 27

Step 2: Generate the base application 28

Part A: Running the Application Accelerator 28

Review 33

Page 4: PRPC Build Your First Application

3

Step 3: Review the application structure 34

Part A: Update the OnboardingFW RuleSet 34

Part B: Review the class structure 37

Part C: Review the rules generated by the Application Accelerator 39

Part D: Use the standard heat map to review the number and types of rules in the application 40

Review 41

Step 4: Adjust the initial process 43

Part A: Run the process 44

Part B: Edit the flow 47

Part C: Review the updated process 58

Review 60

Step 5: Create a data model 61

Part A: Create a single value property 62

Part B: Create properties using the Property Wizard 67

Part C: Create embedded properties 71

Review 76

Step 6: Extend the default user interface 77

Part A: Customize the CoreSummary section 79

Part B: Create the sections for selecting hardware and software items 85

Part C: Create the Budgets Section 95

Part D: Create the ReviewSelections section 96

Part E: Add sections to harnesses and flow actions 98

Review 102

Step 7: Refine the process definition 103

Part A: Modify the user interface for the Review step 104

Part B: Edit the flow to refine the process 104

Review 106

Page 5: PRPC Build Your First Application

4

Step 8: Create a finished user interface 108

Part A: Customize the Header section 108

Part B: Addmanager's note to the Header section 111

Review 113

Step 9: Create decision rules 114

Part A: Create when condition rules to control sections 115

Part B: Create rules to calculate budget amounts and totals 118

Review 123

Step 10: Document the application 125

Part A: Document the application 125

Review 129

Page 6: PRPC Build Your First Application

1

IntroductionTheBuilding Your First Application tutorial walks you through the steps of building a Process Commander appli-cation. In the business scenario for this tutorial, you are an application developer working at a fictional software com-pany namedGlobex. Globex is growing by leaps and bounds, and is having a surge in hiring new employees for anumber of its departments.

Required: Youmust use aV6.1 SP2 system with this tutorial. The steps do not work for systemsother than V6.1 SP2.

To increase the speed that the company can adapt to this surge, management is sponsoring development of anOnboarding application. They picture this application automating andmanaging all of the Globex processes involvedin onboarding a new hire. Within this broadOnboarding framework, your task is to design and develop the piece thathandles equipment setup for a new hire, while other teams at Globex work on the other onboarding-related proc-esses. Eventually, Globex wants to integrate all of the onboarding-related processes and applications. This tutorialis about the equipment setup process.

The application you build simplifies and automates an existingmanual process currently used by Globex’s HR staffto ensure new hires have the necessary equipment on their first day.

You begin by reviewing Globex's requirements and creating an Application Profile. Using this profile, you create thebasic structure of the application using the Application Accelerator. You continue by filling in this basic structure withthe class structure, flow, and datamodels needed tomeet these requirements. Later steps cover evolving and refin-ing the application to include decision and declarative rules to streamline the application's functionality.

Each step of this process is broken down into smaller tasks, with a review section at the end.

About this tutorial

Audience

This tutorial is intended for Process Commander users who wish to review the steps involved in creating a ProcessCommander application and improve their skills. The tutorial content assumes the reader has access to Process

Page 7: PRPC Build Your First Application

2

Commander V6.1 SP2, and is familiar with theDesigner Studio1 and with creating rules, editing flows, and runningprocesses in the Designer Studio.

The scenario

You are an application developer working at a fictional software company namedGlobex. Globex is growing by leapsand bounds, and is having a surge in hiring new employees for a number of its departments.

To increase the speed that the company can adapt to this surge, management is sponsoring development of anOnboarding application. They picture this application automating andmanaging all of the Globex processes involvedin onboarding a new hire.

Within this broadOnboarding framework, you’ve been charged with developing the piece that handles equipmentsetup for a new hire.

The steps of the tutorial cover work that, in a large company, might be done by several colleagues rather than onedeveloper. The header for each step indicates the role of the employee whowould typically do the work in that step.

Tutorial structure

A diagram of the general flow of application development helps indicate where you are in the process. The high-lighted stage in the diagram indicates the focus of the current tutorial step. This is the image for the step on creatinga datamodel:

Each step in the tutorial follows this pattern:

n The first screen of the step displays the relevant diagram, describes the situation within the scenario (whererelevant), indicates the skills you will exercise, and provides information youmay need to complete the step.

n The step is broken down into parts. Each part provides text and images to help you accomplish the step’sgoals.

n At the end of the step, a review screen summarizes the work you did and provides links for learningmoreabout the skills you used in the step.

1The Designer Studio is available to users who are associated with an access group that identifies the Developerrule as their current portal. It provides tools and resources organized into a development environment that speedsapplication planning, construction, testing, and updating.

Page 8: PRPC Build Your First Application

3

Conventions

The tutorial follows a few display conventions:

n A value that appears within the application, such as the name of a property or a field, appears highlighted inthe tutorial, such as GLBX-FW-OnboardingFW-Work and Name.

n A menu option you are to select appears as New > Data Model > Property.

n A reference to a button you are to click appears as “Click Create”, or may show an image of the button: “Click”.

n A small icon to the left of blue text ( ) indicates that more information is available. Click the icon to expandthe area and see the additional information. Click to collapse the area again.

Navigation

At the bottom of the first screen of each step are links to the parts of the step. You can proceed using these links, orby using the Previous Topic / Next Topic links that appear below the step links.

The left panel of the tutorial window has four sections to help you understand and navigate through the tutorial:

n TOC (table of contents) provides links to all the steps and parts of the tutorial. Click any closed book icon () to expand that entry and see the steps within it. Click any link to display the screen related to it.

n Glossary defines key words and concepts found in the tutorial.

n In the Search feature, provide a word or phrase and click Search. The display shows a set of screen titles,with the screenmost likely to satisfy your search at the top. Click any link to display that screen. Click themagnifying glass icon to the right of the Search button to add the current search term to your list of favorites(see next).

n The Favorites feature lists searches and topics that you have tagged as your favorites. To add a screen to the

list of Favorite Topics, display it in the right panel and click the icon at the extreme left of the task bar.

Images

The tutorial includes many images to illustrate the text. Hover themouse over any image to expand it to a larger sizefor easier viewing. Click away from the image to return it to its original size.

If images appear clipped on the left hand side of the content area, widen the content area (the right panel) of the tuto-rial window to avoid this behavior.

Application login

The initial import creates default administrator login credentials:

Name [email protected]

Password rules

Page 9: PRPC Build Your First Application

4

You can create additional operator IDs within the GLBX.com structure if necessary.

Errors and enhancements

If you find errors in the tutorial, or have suggestions for making it more useful, feel free to write to [email protected].

PrerequisitesBefore beginning the course in your Process Commander system, verify the following conditions:

Condition How to verifyYou have access to a V6.1 SP2 system, andhave an operator ID with which to access the sys-tem.

Your organization should provide you an operatorID and the URL to the system. After you log intothe system using that operator ID, select theHelp > Aboutmenu item to confirm the versionof your system.

You haveMicrosoft Visio 2003 or higher installedon your client machine.

Open yourWindows control panel and double-click Add/Remove Programs. See if Visio islisted.

Your operator ID references an access group con-taining the PegaRULES:SysAdm4 role

When you are logged into your system, accessthe operator menu (themenu with your name) atthe top of the Designer Studio window. SelectAccess Group from themenu.

The system does not contain RuleSets namedGLBX, GLBXInt, OnboardingFW, Onboard-ingFWInt

On the left panel of the Designer Studio, selectthe Rules Explorer. Expand theSysAdmin cat-egory. Click the RuleSet branch to view a list ofRuleSets in the right panel. If a list does notappear, select INSTANCES from the drop-downlist at the left of the top toolbar.

The system does not contain an organizationnamedGLBX.

On the left panel of the Designer Studio, selectthe Rules Explorer. Expand theOrganizationcategory. Click the Organization branch to view alist of organizations in the right panel. If a listdoes not appear, select INSTANCES from drop-down list at the left of the top toolbar.

Required: Youmust use aV6.1 SP2 system with this tutorial. The steps do not work for systemsother than V6.1 SP2.

Page 10: PRPC Build Your First Application

5

Importing the starter kit

Before beginning Step 1 of the tutorial, youmust import some Process Commander resources that set up the appro-priate organization and operators for the tutorial scenario, and provide some additional assets needed for the tutorialsteps.

1. Download file Build_Your_App_Organization.zip from http://pdn.pega.co-

m/DevNet/eLearning/byfpca/Content/Resources/Zips/Build_Your_App_Organ-

ization.zip and save it to a location on your network.

2. Log on to your V6.1 SP2 system using the operator ID that your organization has assigned to you for access-ing that system.

3. Open the Import & Export landing page by clicking > Application > Import & Export > Import.

4. Click Browse, and select the downloaded file.

Page 11: PRPC Build Your First Application

6

5. Click Upload File.

6. Check the following boxes -Overwrite Existing Rules, Overwrite Existing Data.

7. Click Import.

When the system indicates that all of the records have been copied, click Done. The resources are ready for you tobegin Step 1 of the tutorial.

Because Step 1 of the tutorial starts by having you log in with a different operator ID, log out of the system beforebeginning Step 1.

About the starter kit

When you import the starter kit, the following assets are imported into your Process Commander system.

Assets DescriptionGLBX organization and the relatedrules and data instances

TheGLBX organization and related rules and data instances provide the businesscontext for the tutorial scenario. Items such as the GLBX organization, related oper-ator IDs, and related access groups are imported.

Two data tables named "HardwareItems" and "Software Items" and theirsupporting rules.

These data tables and their supporting rules provide sample data values used in thetutorial scenario.

Two activities named "getHardware"and "getSoftware".

These activities are used to retrieve the sample data values from the data tablesandmake the values available for display at runtime.

Page 12: PRPC Build Your First Application

7

Business objectives, work type, use cases, and requirementsAs described, the Globex organization wants anOnboarding application. Within this broadOnboarding framework,you’ve been charged with the piece that handles the process for requesting the equipment setup for a new hire.

This section describes the needed background information about the application and the process. You will use thisinformation in subsequent steps of the tutorial.

Note: TheGlobex scenario and the details describing Globex's process, the use cases,and requirements are inten-tionally simple to allow you tomore quickly complete the tutorial steps while also illustrating the key concepts. In areal-world situation, an implementation is typically more complex than this tutorial scenario. In a real-world situation,the process, use cases, and requirements will involvemore details than are provided for this scenario. Throughoutthis tutorial, assume that the Globex subject matter experts have provided this information.

Globex's Onboarding project's business objectives

Business objectives describe why the application is being developed. They are the project goals that, when reached,provide the sought-after business return or benefit.

The business objectives that Globex wants to achieve with the overall Onboarding application are:

n Automate the approval process for employee onboarding requests

n Reduce turn-around time for new hire equipment setup

Equipment Request process and work type

You find out from theGlobex business subject matter experts that their manual (paper-based) equipment requestprocess today involves:

n Entering information about the new hire (name, department, hiringmanager's name)

n Specifying the hardware items to be purchased and set up for the new hire.

n Specifying the software items.

n Approving the equipment request or, alternatively, rejecting the equipment request.

n Stamping the filled-out paper form as "Approved" (if approved) or "Rejected" (if rejected).

The template from which these forms are created is called the work type. For this application, the work type isEquipment Request. A specific created instance is called the work item.

Business process atomic use cases

To facilitate reuse, a business process is broken down into atomic use cases. Each atomic use case represents oneaction owned by a single actor. By using atomic use cases in the system, it is easy to trace where a use case isimplemented in the application user interface, and assess whether the application is being built appropriately.

Page 13: PRPC Build Your First Application

8

The following table illustrates Globex's manual process steps broken down into atomic use cases and the actorinvolved in each use case.

Manual Business Process Step Associated Atomic Use Case Typical ActorEnter information about the new hire Enter New Hire Info HR Staff Member

Specify the hardware items Select Hardware HR Staff Member

Specify the software items Select Software HR Staff Member

Approve the equipment request Approve HiringManager

Reject the equipment request Reject HiringManager

Stamp the filled-out paper form Update Status System

Actors

An actor takes action on work at a specific business process point. The actors in this process are:

n HR Staff Member: Begins the process and fills out the request for the new hire’s equipment setup

n Hiring Manager: Approves equipment requests for the new hires in his or her department

n System: Updates status of the work

The system itself meets the definition of an actor for this application, because it takes action on work at specificprocess points. In this particular process, the Globex subject matter experts have identified points at which the sys-tem will update the status of the work item as it moves through the process: after the Approve step and after theReject step.

Business requirements

Requirements describe the capabilities the applicationmust fulfill, and typically provide additional details for anatomic use case. They can be viewed as the “success criteria” for the project: the stakeholders expect to see theseitems implemented to say the project was a success.

A Process Commander application enables you to capture requirements in the system itself, so that they can beassociated to use cases and tracked as the application is developed. For this project, Globex's subject matterexperts have provided a list of business requirements to enter into the system in Step 1 of the tutorial.

Note: The list below is not intended to represent the complete and exhaustive list of all business requirements a real-world equipment request process would typically have. In a real-world situation, an implementation is typically morecomplex that this tutorial scenario.

Requirement name DescriptionER001_Create_ER System should enable an employee to create an equipment

request.

ER002_Calculate_Cost System should calculate the cost of selected items during the

Page 14: PRPC Build Your First Application

9

Requirement name Descriptionprocess.

ER003_Calculate_Remainder System should calculate the remaining budget (where remainingbudget is the department budget minus the equipment total cost).

ER004_Add_Note System should enable amanager to add a note to the equipmentrequest.

Use case descriptions

Globex's subject matter experts have provided the descriptions for each atomic use case in their process. In a real-world situation, an implementation is typically more complex and would likely havemore use cases andmore com-plex descriptions.

Enter New Hire Info

When the process is started, the system displays fields for entering the information about the new hire.

First Name (entry field)Last Name (entry field)Department (drop-down list)Manager (entry field)

HR Staff Member specifies the information.

Select Hardware

System displays a repeating structure with one row per item selected:

Hardware (drop-down list)Price (read-only field)

HR Staff Membermakes selections from the Hardware list.

Select Software

System displays a repeating structure with one row per item selected:

Software (drop-down list)Price (read-only field)

HR Staff Membermakes selections from the Software list.

Approve

System displays:

Department Budget (read-only field)Hardware Total (read-only field; running total calculated from selections)Software Total (read-only field; running total calculated from selections)

Page 15: PRPC Build Your First Application

10

Remaining Budget (read-only field; running total calculated from subtracting the total costs from the DepartmentBudget)

Two lists for the selected Hardware and Software items:

Hardware (read-only field)Price (read-only field)

Software (read-only field)Price (read-only field)

An Approve button to approve the request and an optional Note text box.

HiringManager optionally enters a note and clicks the Approve button.

Reject

System displays:

Department Budget (read-only field)Hardware Total (read-only field; running total calculated from selections)Software Total (read-only field; running total calculated from selections)Remaining Budget (read-only field; running total calculated from subtracting the total costs from the DepartmentBudget)

Two lists for the selected Hardware and Software items:

Hardware (read-only field)Price (read-only field)

Software (read-only field)Price (read-only field)

A Reject button to reject the request and aRejection Note text box to record the reason for the rejection.

HiringManager enters a rejection note and clicks the Reject button.

Continue on to Step 1 of the tutorial.

Page 16: PRPC Build Your First Application

11

Step 1: Create the application profileTypically performed by In the previous

stepPurpose of this stepTo... So that...

Business Analysts No previous step Capture descriptions ofthe use cases and appli-cation requirements

Later steps can relate specific partsof the application to individual usecases and requirements

In this step, you use the Application Profiler tool to capture the project's objectives, use cases, and requirementsdirectly in the system. The input to this step is used in the next step to generate the base structure of the application.

Creating an application profile using the Application Profiler is the first step when creating an application. It answersthe question “What will I build?” In going through the Application Profiler, important information about the project iscaptured such as its business objectives, the stakeholder requirements, and the business process. Typically, a busi-ness analyst runs the Application Profiler with subject matter experts and other teammembers to directly capturethat information from them.

Within this tutorial's scenario, the project given to you is the Globex project described in the Business objectives,work type, use cases, and requirements topic. TheGlobex organization wants anOnboarding application that canprovide automation and efficiency for getting a new hire started in the company.

In this tutorial step, you run the Application Profiler and specify details about the project. The details you need toinput are provided as you go through the exercise. Running the Application Profiler results in two items:

l An application profile object, which the system uses as the basis for generating the basic structure of theapplication. You build out this application in subsequent steps.

l An application profile document, which is typically used by the project sponsors to review the project, val-idate that it is proceeding in the expected direction, and size the effort.

Continue to the next topic to begin this step of the tutorial.

Part A: Capture basic project detailsThe first task in the Application Profiler is to capture basic project details. For the Globex scenario, use the followingproject details.

Page 17: PRPC Build Your First Application

12

For this field Enter this valueProfile option New Application

Build New Framework And Implementation

Build on Framework None

Application Name Onboarding

Project Name Onboarding Version 1

Project Led By External Consultants

Organization Name Globex

Business Objectives Two objectives:

Automate the approval process for employee onboardingrequests

Reduce turn-around time for new hire equipment setup

Project Description Globex (GLBX) is a fast growing software company. Mak-ing the onboarding process more efficient will increase theability for the company to grow successfully.

1. Log on to the system as [email protected] with the password rules to access theDesigner Stu-dio1. (That operator ID is the one provided in the zip file archive that needs to be installed before beginningthe tutorial. See Prerequisites for details.)

2. Start the Application Profiler by selecting New Application > Application Profile from the Applicationmenu.

3. In the Application Overview window that displays when the Application Profiler starts, specify the details aslisted in the table above. You can copy text from the table and paste it into the fields.

1The Designer Studio is available to users who are associated with an access group that identifies the Developerrule as their current portal. It provides tools and resources organized into a development environment that speedsapplication planning, construction, testing, and updating.

Page 18: PRPC Build Your First Application

13

To add the second business objective, click . A new line is displayed and you can paste in the text for thesecond business objective.

Confirm that the completed Application Overview window looks like the following image, then click OK tosave the project details.

4. Select Actors from the Actions menu in the upper right area of the Application Profiler:

Page 19: PRPC Build Your First Application

14

5. In the Actors window that opens, leave theActors Background Information field blank. Specify the fol-lowing information for the actors that participate in Globex's current process for onboarding. Click twiceto add twomore rows.

Name Type AccessHR Staff Member Operator Browser

HiringManager Operator Browser

System This System System Agent

Page 20: PRPC Build Your First Application

15

This information will be used in the use cases that are entered in the Application Profiler.

6. Click OK to save the information in the Actors window.

7. After closing the Actors window, the current step is the Processes step. This step is for entering details aboutthe business processes that are part of this application.

Your assignment in Globex's Onboarding project is their Equipment Request process, as described in theBusiness objectives, work type, use cases, and requirements topic. Therefore, you first want to update thedefault values for the work type and the process name to reflect the Equipment Request process.

8. Select the drop-downmenu next to the default Onboarding label to update the work type information.

9. In the Edit Work Type window, update the following fields to the indicated values. Confirm that the

Page 21: PRPC Build Your First Application

16

Complexity field is set to Low (the default value). Then click OK to save the updates.

Field ValueName EquipmentRequest

Display Label Equipment Request

Complexity Low (the default value)

Prefix ER

Description Equipment request work item

10. To update the process name to reflect the fact that the process concerns an equipment request, select thedrop-downmenu next to the default label (StartOnboarding) and select Rename.

In the Edit Flow NameDetails window, note that the system has supplied a default value based on theupdated work type name (StartEquipmentRequest). Add spaces to the default value to set it to StartEquipment Request. Click OK.

At this point, the system refreshes the display for the Processes step and it should look like the followingimage.

Page 22: PRPC Build Your First Application

17

Continue to the next tutorial topic.

Part B: Capture essential process steps using the Dis-covery MapThe second task in the Application Profiler is to capture the essential process steps using theDiscovery Map1. Themain area on the Processes step displays the Discovery Map. The Discovery Map is an inventory of the essentialprocess steps that affect or alter the work item as it proceeds from its creation to its final resolution. Colored shapesrepresent these essential steps.

Note: TheGlobex scenario and the details describing Globex's process, the use cases,and requirements are inten-tionally simple to allow you tomore quickly complete the tutorial steps while also illustrating the key concepts. In areal-world situation, an implementation is typically more complex. In this tutorial, assume that the Globex subjectmatter experts have provided this information.

Globex's subject matter experts have identified the following essential process steps that affect the EquipmentRequest work item:

l Select Hardware

l Select Software

l Approve

1A Discovery Map is a graphical design tool integrated into the Processes tab of the Application Profiler and Appli-cation Accelerator. A Discovery Map provides a high-level presentation of steps in the starting business flows in theapplication including the subflows and alternate paths.

Page 23: PRPC Build Your First Application

18

l Update Status (system updates the work item status after approval)

l Reject (alternate step to the Approve step)

l Update Status (system updates the work item status after rejection)

Add the essential process steps to the Discovery Map using these steps:

1. In the Discovery Map, click the Step Name label on the default initial shape. Type Select Hardware.

2. Double-click the open shape space next to the Select Hardware shape to add a new green shape. Clickthe shape's label and type Select Software.

3. Double-click the open shape space next to the Select Software shape to add a new green shape. Clickthe shape's label and type Approve.

4. Double-click the open shape space next to the Approve shape to add a new green shape. Click the shape'slabel and type Update Status.

5. Right-click the Update Status shape, and select Add New Alternate Step to add the Reject step,becauseGlobex's subject matter experts have identified the Reject step as an alternate step in the process.A double red line appears in between the Update Status shape and the new shape to indicate where thealternate steps begin. Click the new shape's label and type Reject.

6. Double-click the open shape space to the right of the Reject shape to add an Update Status step (inwhich the system updates the work item status after rejection). Click the new shape's label and type UpdateStatus. (Youmight have to widen the Designer Studio window to add this shape.)

At this point, the Discovery Map should look like the following image.

The following steps describe how to capture the details of Globex's atomic use cases and requirements in the sys-tem and associate them with the appropriate shapes. This table shows the relationship between the shapes and theatomic use cases and requirements, using the information provided by Globex's subject matter experts. Somerequirements are associated with more than one use case. BecauseGlobex's subject matter experts have not iden-tified a requirement associated with the "Update Status" use case, a requirement is not entered for that use case.

The name of the use case is the same as the name of its associated shape.

Page 24: PRPC Build Your First Application

19

Shape Actor Use Case Description Associated RequirementsSelectHardware

HR StaffMember

System displays a repeating struc-ture with one row per item selected:

Hardware (drop-down list)Price (read-only field)

HR Staff Membermakes selectionsfrom the Hardware list.

Name:ER001_Create_ER

Details:

System should enable an employee tocreate an equipment request.

Importance:

1 - Critical

SelectSoftware

HR StaffMember

System displays a repeating struc-ture with one row per item selected:

Software (drop-down list)Price (read-only field)

HR Staff Membermakes selectionsfrom the Software list.

Name:ER001_Create_ER

Details:

System should enable an employee tocreate an equipment request.

Importance:

1 - Critical

Page 25: PRPC Build Your First Application

20

Shape Actor Use Case Description Associated RequirementsApprove Hiring

ManagerSystem displays a list for:

Department Budget (read-only field)

Hardware Total (read-only field; run-ning total calculated from selections)Software Total (read-only field; run-ning total calculated from selections)Remaining Budget (read-only field;running total calculated from sub-tracting the total costs from theDepartment Budget)

System displays a repeating struc-ture listing the selected hardware andsoftware items:

Hardware (read-only field)Price (read-only field)

Software (read-only field)Price (read-only field)

System displays an Approve buttonto approve the request and anoptional Note text box.

Note (optional; entry note box)

HiringManager optionally enters anote and clicks the Approve button.

Name:ER002_Calculate_Cost

Details:

System should calculate the cost ofselected items during the process.

Importance:

2 - Very Important

Name:ER003_Calculate_Remainder

Details:

System should calculate the remainingbudget (where remaining budget is thedepartment budget minus the equip-ment total cost).

Importance:

2 - Very Important

Name:ER004_Add_Note

Details:

System should enable amanager to adda note to the equipment request.

Importance:

4 - Desirable

Page 26: PRPC Build Your First Application

21

Shape Actor Use Case Description Associated RequirementsReject Hiring

ManagerSystem displays a list for:

Department Budget (read-only field)

Hardware Total (read-only field; run-ning total calculated from selections)Software Total (read-only field; run-ning total calculated from selections)Remaining Budget (read-only field;running total calculated from sub-tracting the total costs from theDepartment Budget)

System displays a repeating struc-ture listing the selected hardware andsoftware items:

Hardware (read-only field)Price (read-only field)

Software (read-only field)Price (read-only field)

System displays a Reject button toreject the request and aRejectionNote text box to record the reason forthe rejection.

Rejection Note (entry note box;required)

HiringManager enters a rejectionnote and clicks the Reject button.

Name:ER002_Calculate_Cost

Details:

System should calculate the cost ofselected items during the process.

Importance:

2 - Very Important

Name:ER003_Calculate_Remainder

Details:

System should calculate the remainingbudget (where remaining budget is thedepartment budget minus the equip-ment total cost).

Importance:

2 - Very Important

Name:ER004_Add_Note

Details:

System should enable amanager to adda note to the equipment request.

Importance:

4 - Desirable

UpdateStatus

System System automatically updates thestatus of an Equipment Request asrequired.

7. Perform the following steps on the first shape (Select Hardware) to capture the atomic use case, as well asthe relevant requirement for that shape. After you complete these steps on the first shape, repeat the stepsfor the remaining shapes according to the preceding table.

Note: If your V6.1 SP2 system has had hotfix HFix-3278 installed, the window and fields in which you enterthe use case and requirements information look slightly different from what is stated in the following stepsand shown in the images. If your system has HFix-3278 installed, the window has more than two tabs. In that

Page 27: PRPC Build Your First Application

22

case, enter the appropriate use case information on theDetails tab and the use case descriptions on theDescription tab (instead of on theUse Case tab as stated in the following steps).

a. Double-click the shape. After a few moments (depending on the speed of your network), the Detailswindow opens.

b. Enter the relevant information on theUse Case andRequirements tabs using the following steps:

i. On theUse Case tab:

l Confirm that theShape field is set to Human Based Step (the default value). In thisstep, the HR Staff Member selects the hardware items.

l Confirm that theUse Case field is set to the shape label (the default value). For the firstshape, the value should be Select Hardware.

The system uses the shape label as the default for the use case name. Globex's subjectmatter experts have agreed to use these default use case names.

l Confirm that theStatus field is set to New (the default value).

l In theActors field, specify HR Staff Member. To use the autocomplete feature, typethe first letter (H) into the field and press your keyboard's down arrow key. The systemdisplays the available choices. (The choices for actors are the ones you entered pre-viously. Click the HR Staff Member choice to select it from the displayed choices.

l Confirm that theUse Existing Sub Process field is set to None (the default value).

l Confirm that the Trigger field is empty (no value) and theComplexity field is set toLow. (The complexity values of the captured use cases are used in the Application Pro-filer to calculate project sizings for developing the project. This is not a concern in thistutorial scenario, so retain the default value.)

l In theBusiness Objective field, select the Automate the approval process

for employee onboarding requests choice.

l In theDescription field, enter the description of the Select_Hardware use case:

System displays a repeating structure with one row per item

selected:

Hardware (drop-down list)

Price (read-only field)

You can also copy and paste the text from the table above.

Page 28: PRPC Build Your First Application

23

i. On theRequirements tab:

l In theName field, enter the name for the requirement associated with this use case(ER001_Create_ER). Note that the autocomplete in theName field does not displayany choices because this requirement has not been previously entered into the system.Click the Expand icon ( ) to the left of the field to display the editor field. Enter therequirement's details in this field:

System should enable an employee to create an equipment

request.

l Confirm that theCategory field is set to Business Rule (the default value).

l For the Importance field, select Critical (as indicated in the preceding table for thisrequirement).

l Confirm that theStatus field is set to New (the default value), and that theExternal ReqID field is empty (the default).

c. Click OK to save the use case and requirement information and complete association with that step.

Page 29: PRPC Build Your First Application

24

In the Discovery Map, theSelect Hardware shape now has a document icon, which indicates a use casedescription is captured and associated with that step.

8. To save the work you have completed in the profile up to this point, select Actions > Save.

9. For each of the remaining shapes, repeat the previous steps to associate their use cases and requirements.You can copy text from the table and paste it into entry fields.

Note that once a requirement has been entered in the system for a previous use case, you do not re-enter itsinformation to associate it with a use case. Use the autocomplete feature to select the previously enteredrequirement: type the first letter in theName field (E) and press your keyboard's down arrow. The system dis-plays the previously entered requirements for you to select from. For example, when entering the requirementfor theSelect Software shape, after typing E into theName field and pressing the down arrow key, the sys-tem displays ER001_Create_ER as a choice. After clicking that choice, press your keyboard's Tab key tomove your cursor to the next field. After amoment (depending on the speed of your network) the system auto-matically fills in the Importance and other fields with the previously entered information for ER001_Create_ER. (Depending on the speed of your network, this might take a few moments to display.)

Some use cases havemore than one requirement associated with them. To add additional requirements in

theRequirements tab, click to add a new row for entry.

For the twoUpdate Status shapes, in the Shape field, select Automated Step (instead of the defaultHuman Based Step value).

After entering the use cases and requirements information, confirm that all of the shapes in the Discovery Map dis-play the document icon and that the two Update Status shapes are yellow. The Discovery Map should look like thefollowing image.

Page 30: PRPC Build Your First Application

25

Save the profile by selecting Actions > Save.

Continue to the next tutorial topic.

Part C: Complete capturing information in the Appli-cation ProfilerTheGlobex subject matter experts inform you that they want the first use case that they identified captured as theuse case for the starting screen of the process, because they want the system to display the fields to enter that infor-mation when the HR Staff Member begins the process.

1. Select the drop-downmenu next to theStart Equipment Request label and select Add > Use case for start-ing screen.

2. In the window that opens, specify the following items in the fields on theUse Case tab:

Field Specified valueUse Case Enter New Hire Info

Status New

Actors HR Staff Member

Trigger WebBrowser

(Use the SmartPrompt to select the value by putting your cursor in the field and pressingyour keyboard's down arrow. The system displays the available choices. Double-clickWeb Browser to select it for the field.)

Complexity Low

Business Objective Automate the approval process for employee onboarding requests

Description When the HR Staff member selects to start the process, the system displays fields forentering the information about the new hire.

HR staff member enters the following information about the new hire:

First Name (entry field)Last Name (entry field)Department (drop-down list)Manager (entry field)

Page 31: PRPC Build Your First Application

26

3. Click theRequirements tab. In theName field, use the autocomplete to select the ER001_Create_ERrequirement and press your keyboard's Tab button tomove to the next field. After a few moments, the sys-tem fills in the previously specified values for the remaining fields.

4. Click OK in the window to save the use case.

At this point, you have captured all of the details for the process-related requirements of the project. Each step of theApplication Profiler is designed to capture details of the project related to a specific area. These steps are listedalong the left side once you start the Application Profiler. For example, the Integration step is for capturing details ofconnections to external systems the application would have tomake, the Reports step is for capturing details of thetypes of reports expected from the application, and the Project Roles step is for capturing estimates of the staffingresources needed for the project.

While larger-scale projects would likely require you to enter information for all of these areas of the project, it is notneeded for this Globex scenario, and you canmove directly to the Profile Review part. (Note that even though thisproject is for a simple process and the use cases and requirements have been kept intentionally simple, larger-scaleprojects would follow this same progression of steps.)

5. Click Profile Review in the Application Profiler's left side navigation.

The display shows the work type you specified in the Application Profiler, as well as supporting types typ-ically used in a Process Commander application. (The system includes these by default.) You can optionallyexpand the EquipmentRequest work type and see the list of use cases you entered.

6. Click the Finish button to complete creation of the application profile.

The system works to generate the data it needs to create the application profile object. Once the system is done, theprofile is completed and the completion window displays.

Page 32: PRPC Build Your First Application

27

Optional: Create aWord document of the information in the created application profile that can be circulated to stake-holders by selecting Actions > Document. In the Document window, click Create Document. If you haveMicrosoftWord on your local system, the program opens and displays the application profile document. You can save a copyto your local system, or closeWord without saving. When you are done reviewing the document, close the Doc-ument window.

Typically the application is generated at this point. However, for this tutorial, move to Step 2 and complete Step 2before generating the application. Click Close to close the Application Profiler and complete this step of the tutorial.

Continue to the next tutorial topic.

ReviewIn this step, you created a profile for the Onboarding application by running the Application Profiler. You created aDiscovery Map that inventories the steps of the business process that the application is to implement, and youentered information about the use cases and associated requirements.

To readmore about the skills you used in this step, see:

l Implementation andMethdology - Getting Started ( )

l Business Analyst Resources overview ( )

l About Direct Capture of Objectives [KB 26133] ( )

l Creating an Application Profile [KB 26128] ( )

In the next step of the tutorial, you generate a starting application structure based on this profile.

Move to the next step in the tutorial.

Page 33: PRPC Build Your First Application

28

Step 2: Generate the base applicationTypically performed by In the previous

step, youPurpose of this stepTo... So that...

Business Analysts, withassistance from SystemArchitects (SAs)

Built the applicationprofile

Record your decisionsabout names and the pri-mary process

From the application profile, the Appli-cation Accelerator can automaticallygenerate rules that provide a solidbase starting point for later steps

This tutorial step generates the base application structure, using the information that you captured with the Appli-cation Profiler. In subsequent tutorial steps, from that base, you build out and customize the application to the organ-ization's specific needs.

Generating a base application using the Application Accelerator is the second step in creating a Process Com-mander application. The Application Accelerator takes the profile created by the Application Profiler and turns it intoa working application. It automates building a specific application by generating a base starting structure that youcan extend with requirements for a specific implementation.

In this tutorial step, you run the Application Accelerator, customize some details for the specific implementation ofan application for requesting new hire equipment, and generate the base application.

At the end of this tutorial step, a working application is created in the system.

Continue to the next topic to begin this step of the tutorial.

Part A: Running the Application AcceleratorThe Application Accelerator generates a basic application structure automatically from the application profile youcreated at the end of Step 1.C of this tutorial. The structure provides a starting point for later tutorial steps. The fol-lowing steps describe customizing some of the information from the profile to better align with the Globex team'sexpectations, and then generating the base application.

Page 34: PRPC Build Your First Application

29

1. In the Designer Studio, start theApplication Accelerator1 by selecting New Application > ApplicationAccelerator from the Applicationmenu.

2. In the Application Overview window that opens when the wizard starts, click theSelect the Application Pro-file field and select the entry that starts with Profile for Onboarding. That entry is the application pro-file created in Step 1.C of this tutorial.

The Application Overview window refreshes to display the default values from the profile.

3. In theNew Implementation Name field, change the default value to EquipReq.

1The Application Accelerator is a wizard that integrates with an Application Profile to launch an automated, best-practice process that jump-starts the creation of new application and the extension of existing applications andframeworks.

Page 35: PRPC Build Your First Application

30

4. Confirm the following values in the Application Overview window:

l Framework Name is OnboardingFW

l BothVersion fields display 01.01.01

l Business Objectives displays the two business objectives you entered in Step 1.A of this tutorial.

5. Click OK to save the changes.

6. By default, the Application Accelerator begins on theBase and RuleSets step. In this step, the system dis-plays default names based on the values from the application profile created in Step 1.C and theGLBX organ-ization structure. For this tutorial, these default values should be used. Confirm the following settings:

l Parent Class is OnboardingFW

l RuleSet Name is OnboardingFW

l Organization Name is GLBX.com andOrganization Class is GLBX-

l Division Name is GLBXDiv, Division Class is GLBXDiv-, andDivision RuleSet isGLBXGLBXDiv

l Application Class is EquipReq andApplication RuleSet is GLBXEquipReq

l Modify test operators checkbox is clear

7. Select theProcesses step of the Application Accelerator. Confirm that the Discovery Map you created in

Page 36: PRPC Build Your First Application

31

Step 1.B is displayed.

At this point, for a larger application, the business analyst would typically work with the subject matterexperts to provide information to update the other areas of the Application Accelerator before generating thebase application. In this tutorial scenario, the system provides default selections on the other steps based onthe information from the profile that you created earlier and entered in the preceding steps. No further updatesare needed before generating the base application structure.

8. Select theReview Objects step and confirm that the displayed use cases and requirements match the fol-lowing images. These are the use cases and requirements you entered into the Application Profiler in Step1.B of the tutorial. Expand the EquipmentRequest work type to display the use cases.

Select theRequirements tab to see the requirements.

9. Select theCreate Application step. In this step, the system displays a list of the rules that the system willgenerate for the starting structure.

10. Click Build the Application.

As the system creates the rules and classes for the application, progress is indicated in the Status column by

the clockwise circling arrows ( ). When theStatus column displays all check marks and the Finish button isavailable, click Finish.

Page 37: PRPC Build Your First Application

32

11. Click the Switch to new application button that appears.

The system refreshes the Designer Studio window to display the newly generated OnboardingFW application.

As part of this process, the Application Accelerator updated the [email protected] operator ID to setOnboardingFW as its default application. From now on, whenever you log into the system using [email protected] (password rules), the Designer Studio will display the OnboardingFW application by default.

Page 38: PRPC Build Your First Application

33

Continue to the next tutorial topic.

ReviewIn this step, you generated a starter structure for the Onboarding application by running the Application Accelerator,using information in the profile that you previously created.

To readmore about the skills you used in this step, see:

l Introduction to the SmartBPM ImplementationMethodology [KB 25665] ( )

l Business Analyst Resources overview ( )

l About the Direct Capture of Objectives [KB 26133] ( )

l Using the Application Accelerator [KB 26129] ( )

Because this is a starter application that you will extend tomeet your stakeholders' needs, it's best to review the gen-erated items to gain an understanding of what was created. In the next step of the tutorial, you review the generateditems.

Move to the next step in the tutorial.

Page 39: PRPC Build Your First Application

34

Step 3: Review the application structureTypically performed by In the previous

step, youPurpose of this stepTo... So that...

Lead System Architects(LSA)

Generated a baseapplication structure

Build upon the RuleSetsgenerated in the previousstep and familiarize you-self with the generatedbase structure

You are familiar with assets gen-erated in the previous step and havethe appropriate RuleSet prerequisitesfor creating and saving rules as youbuild out the process (screens, flow,logic) in the subsequent tutorial steps

This step builds upon the baseGLBX-FW-OnboardingFW-Work application structure that was generated in the pre-vious step. You explore the generated application structure, and set the prerequisites for the RuleSet into which newrules are saved as you create them in the application development process.

The Application Accelerator that you used in Step 2 created your application and populated it with a structure andassets that promote efficient development and reusability. For this tutorial, you also need to connect the RuleSetgenerated by the Application Accelerator with one that you imported before beginning the tutorial. That step wouldnot be necessary in a real business setting.

In this step of the tutorial you:

l Update the OnboardingFW RuleSet to add theGLBX RuleSet as a prerequisite and turn off “check-in / check-out” of rules.

l Review the class structure created for your application by the Application Accelerator.

l Review the rules the Application Explorer created for your application.

l Use the Heat Map to review your application’s assets.

Continue to the next topic to begin this step of the tutorial.

Part A: Update the OnboardingFW RuleSetThe RuleSets generated by the Application Accelerator have rule check-out specified by default. This is the defaultsetting because in a typical development effort involvingmore than one person, it is important to enforce rule check-

Page 40: PRPC Build Your First Application

35

out. If Developer A has checked out a rule, Developer B cannot make changes to it until Developer A has checked itin again. Rule check-out helps prevent colleagues from accidentally overwriting each others’ work.

In this tutorial scenario, the work is done on your own. Turning off rule check-out for the RuleSets into which onesaves rules reduces the number of steps involved each time one wants to create or update a rule. In this tutorial,rules are saved to the OnboardingFW RuleSet.

Rule check-out for the rules in a RuleSet is governed by a checkbox on the RuleSet form. The following stepsdescribe turning off rule check-out in the OnboardingFW RuleSet:

1. In the Application Explorer under GLBX-FW-OnboardingFW-Work, expand the SysAdmin category and thenexpand the RuleSet category to see the list of RuleSets:

l GLBX

l GLBXInt

l OnboardingFW

l OnboardingFWInt

2. Click OnboardingFW to open its rule form.

Even though there are four RuleSets in this application, check-out is turned off for only the OnboardingFWRuleSet. The reason is that this is the only RuleSet in which rules are saved in the course of performing thesteps of this tutorial. Because the steps of the tutorial do not involve updating or saving rules into the otherthree RuleSets, their check-out settings can be left as they are.

Page 41: PRPC Build Your First Application

36

3. Click the Security tab and clear the Use check-out? checkbox.

Before beginning Step 1 of the tutorial, you imported some Process Commander resources that set up the GLBXorganization and operators for the tutorial scenario. One of those resources is the GLBX RuleSet. So that the rulesthat you save to the OnboardingFW RuleSet can use rules in the GLBX RuleSet, youmust add theGLBX RuleSetas a prerequisite to the OnboardingFW RuleSet.

4. Click the Versions tab.

5. Click the Expand icon ( ) at the left of the 01-01-01 to view theRequired RuleSets And Versions sec-tion.

6. Click that is within theRequired RuleSets And Versions section to add a new row after the two exist-ing rows.

7. In the new row, use theSmartPrompt1 to choose from the list of available RuleSets:

a. Set your cursor in the entry field in the new row.

b. Press your keyboard's down arrow key. The system displays a list of appropriate choices.

c. Scroll down through the list until you seeGLBX, then double-click GLBX to select it for the entry field.

8. Type a colon (:) and 01-01-01 after GLBX in that row. The new row should look like the following image.

1A SmartPrompt text box, used onmany rule and data forms, makes a dynamic selection list available for fast userentry. Optionally, SmartPrompt processing can be added to fields on work object forms.

Page 42: PRPC Build Your First Application

37

9. Click to save the updated OnboardingFW RuleSet.

10. Close the form for the OnboardingFW RuleSet by clicking the icon in its tab.

Continue to the next tutorial topic.

Part B: Review the class structureClasses represent the applicability, or scope, of rules such as properties, sections, and flows. Your application is ahierarchy of classes, with more specific classes inheriting frommore generic classes. In general, if there is a rule ina generic class in your application, and a rule of the same name in amore specific class that inherits from the firstclass, the rule in themore specific class is the one the application uses. Your application cannot use rules that arenot part of the classes in its hierarchy.

Use the Application Explorer in the left panel of the Designer Studio to review your application’s class structure.Your application’s class hierarchy includes classes created by the Application Accelerator and standard classes pro-vided by Process Commander (as well as any standard classes from Frameworks your application uses). Mostrules operate on ("apply to") objects of a specific class. However, rules that apply to a parent class are also availableto child classes of that parent. In your application, objects in the EquipmentRequest child class have access to therules in its parent class.

Page 43: PRPC Build Your First Application

38

Right-click EquipmentRequest and select Structure from the context menu to open the Class Structure Viewer andsee the relationships among all the elements of your application.

Page 44: PRPC Build Your First Application

39

Use the + and – icons in the Class Structure Viewer to explore the relationships. The full name of the Equip-mentRequest class is GLBX-FW-OnboardingFW-Work-EquipmentRequest. This class is a direct child of GLBX-FW-OnboardingFW-Work-, which is a child of GLBX-FW-OnboardingFW-, and so on. The top class in the hierarchyis named@baseclass.

Close the viewer. Right-click EquipmentRequest again, and select Inheritance to open the Class Inheritance displayand see the inheritance relationships among all the classes in your application.

Close the Class Inheritance display.

Continue to the next tutorial topic.

Part C: Review the rules generated by the ApplicationAcceleratorAlong with the application’s class structure and starter flows, the Application Accelerator creates RuleSets to holdthe rules your application requires. In the Application Explorer, use the + and – controls to navigate the tree display

Page 45: PRPC Build Your First Application

40

and review the rules, RuleSets, and RuleSet versions that the Application Accelerator created.

During the following tutorial steps, youmodify some of these generated rules and create others as you build out theapplication tomatch its requirements.

Continue to the next tutorial topic.

Part D: Use the standard heat map to review the numberand types of rules in the applicationA heat map provides another way of visualizing your application’s assets. Select > Application > Inventory >Heat Map to see the heat map.

(The arrangement of rectangles that you seemight not precisely match the following image. Narrowing the DesignerStudio window changes the display.)

Page 46: PRPC Build Your First Application

41

Note: If you did not complete Steps 1 and 2, and instead imported the zip file at the start of this tutorial step, thenumber of rules is different than the one shown in this image.

Click the label of any rectangle to see a list of its contents.

Heat maps color the rectangles according to a stated criterion to provide additional information. You can choose acriterion in the Shaded by drop-down list. The heat map typically shows, by color gradation, the number of recentlyupdated rules in each category rectangle.

Close the heat map (click in the Application-Inventory tab).

Continue to the next tutorial topic.

ReviewIn this step you reviewed your application's structure and underlying items, and optionally simplified the devel-opment process by turning off rule check-in/check-out behavior.

To readmore about the skills you used in this step, see:

l How class inheritance works [KB 25169] ( )

l Video overview of the Enterprise Application Accelerator ( )

Page 47: PRPC Build Your First Application

42

l Application category - Inventory page - Inventory Reports, 6Rs, and Heat Map gadgets [Developer Help] ( )

In the next step of the tutorial, you adjust the draft flow generated by the Application Accelerator.

Move to the next step in the tutorial.

Page 48: PRPC Build Your First Application

43

Step 4: Adjust the initial processTypically performed by In the previous

step, youPurpose of this stepTo... So that...

Business Analysts Specified appropriatesettings for thedefault RuleSets gen-erated in Step 2 andexplored the gen-erated applicationstructure.

Revise and extend theprocess in the defaultflow

The process begins to look more likethe business process desired by thestakeholders, and you can run it forthem to get their feedback

This step builds upon the base Start Equipment Request process that was generated in Step 2. You customizesome of the process defaults until it reaches a point where stakeholders can review it and provide useful feedbackon its development.

After the Application Accelerator generates the application structure, the business analyst can run the process (asdefined in the Discovery Map) immediately, and give stakeholders the opportunity to review the working process anduser interface, without waiting for all of the pieces to be developed. Early reviews let stakeholders verify that theprocess satisfies the project's business requirements. The stakeholders can validate that the application is devel-oping as they expect, and the developer can quickly incorporate stakeholder feedback.

As you saw in Step 3, generating the application using the Application Accelerator creates a base structure for theapplication. The goal is to extend this generated base to deliver an application that meets the project’s requirementsand objectives. One of the generated rules is a draft flow1. The Application Accelerator uses the process steps youcreated in the Discovery Map to create this rule. This tutorial step describes how to run the process, and then adjustthe draft flow to have the process alignmore with the Globex team's expectations.

Continue to the next topic to begin this step of the tutorial.

1A flow defines a business process or part of a business process. A flow governs how work objects are created,progress through the system, and become resolved. A flow consists of a network of shapes and connectors (lines),each with associated parameters and values.

Page 49: PRPC Build Your First Application

44

Part A: Run the processThe goal of running the process at this point in the project is to see what might need adjusting to better meet theexpectations of the subject matter experts and stakeholders.

1. In the Designer Studio, select the Run ( ) menu from the toolbar, and select Run Process.

The words you entered in the Application Accelerator for the process --Start Equipment Request -- appearas the first part of the label of themenu choice.

2. Select themenu choice that begins with the words Start Equipment Request to run the initial process thatwas generated by the Application Accelerator.

As you progress through the process, temporary messages ("nn system alerts") might appear. Thesemes-sages support performance tuning and you can ignore them.

The system presents the user interface screens that are in the base structure created by the ApplicationAccelerator. A new tab is opened in the Designer Studio for the new work item. Click Create in the firstscreen and Submit in the subsequent screens to advance through the process. You do not have to enter anyvalues in the fields.

Page 50: PRPC Build Your First Application

45

3. As you progress from one screen to another by clicking Submit, observe the following items:

l The screens generated by default follow the steps you set in the Discovery Map, and use the namesyou entered on the shapes. By running the process at this point, you can quickly see whether the

Page 51: PRPC Build Your First Application

46

process follows the steps provided by the Globex subject matter experts.

l Text in some of the screens indicates that certain items do not exist (such as "Flow Action does notyet exist."). The steps in the next tutorial topic address these items.

l The final screen of the process shows a confirmationmessage: "Thank you for your input". Notice thatthe work item's status is set toNew. Because this is the primary path of the process and the workitem is not being sent to another process, you want the work item's status set toResolved at thispoint. That is, you would like the work item's status in the header to reflect that all of the required ele-ments of the work are complete ("resolved"). You would also like the work item's status to changefrom New toPending-Approval as it moves to theApprove process step.

4. Close the tab for the work item by clicking the icon in the tab.

Continue to the next tutorial topic.

Page 52: PRPC Build Your First Application

47

Part B: Edit the flowThe following steps describe editing the generated flow so that the items noted in the previous topic are addressed.

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

2. Click the Flow Editor1 icon ( ) to open the flow in the flow editor. The flow editor uses Microsoft Visio.Youmight be prompted to enablemacros in Visio. If so, select to enablemacros.

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

Page 53: PRPC Build Your First Application

48

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

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

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

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

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

4. Click to save the flow with the flow diagram. After the system completes saving the flow, a warning ( )shapemight appear in the diagram. This imagemarks where a shape's required values or underlying rules areincomplete. When a flow is saved, the system validates whether rules exist for each shape in the flow. Ignoreany ( ) warnings that appear at this point, because themissing rules are created in the following steps ofthis topic.

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

a. Select the connector that runs between theSelectHardware shape and theSelectSoftware shape.The Connector Properties panel displays in the upper left corner.

Page 54: PRPC Build Your First Application

49

b. In the Connector Properties panel, enter SelectHardware in the Flow Action field. Do not usespaces in this field, because this value is the flow action rule name, which does not allow spaces.

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

o Applies To is GLBX-FW-OnboardingFW-Work-EquipmentRequest

o Action Name is SelectHardware

o RuleSet is OnboardingFW

o Version is 01-01-01

Page 55: PRPC Build Your First Application

50

o Template is blank (the default)

d. Click Create to create the flow action rule.

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

f. In the Connector Properties panel in the flow editor, do not change any other values in the other fieldsin the panel. Click Apply in the Connector Properties panel. (Ignore the warning next to the Flow

Action field. This warning clears the next time you click to save the rule and the system validatesreferences to the new SelectHardware flow action rule.)

g. Repeat steps 5.a through 5.f for the connector that runs between theSelectSoftware shape and theApprove shape. Enter SelectSoftware in the Flow Action field, and confirm the following values inthe New Rule dialog for the flow action:

o Applies To is GLBX-FW-OnboardingFW-Work-EquipmentRequest

o Action Name is SelectSoftware

o RuleSet is OnboardingFW

o Version is 01-01-01

o Template is blank (the default)

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

h. Select the connector that runs between theApprove shape and theUpdateStatus shape. In the

Page 56: PRPC Build Your First Application

51

Connector Properties panel, use the SmartPrompt in the Flow Action field to see the list of availableflow action rules. The first choices displayed by the SmartPrompt are the two flow actions justcreated, SelectHardware and SelectSoftware. Double-click the More in the SmartPrompt list to seethe list of standard flow action rules. Double-click Approve to select it for the Flow Action field.

i. Click Apply.

6. When the process first creates the work item, the work item's status is set to New. Adjust the flow to set thestatus of the work item to Open as it enters the first assignment (Select Hardware) and to Pending-Approvalas it enters the Approve step.

a. Select theSelect Hardware assignment shape.

b. In the Assignment Properties panel, use the SmartPrompt in the StatusWork field to select the stand-ard Open status value. (Youmight have to expand the Assignment Properties panel to see the fieldlabels and locate the StatusWork field). Click Apply.

c. Select theApprove assignment shape.

Page 57: PRPC Build Your First Application

52

d. In the Assignment Properties panel, use the SmartPrompt in the StatusWork field to select the stand-ard Pending-Approval status value. (Youmight have to expand the Assignment Properties panel tosee the field labels and locate the StatusWork field). Click Apply.

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

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

b. In the Utility Properties panel, in the StatusWork field, use the SmartPrompt to list the availablechoices. Double-click Resolved-Completed in the list.

c. In the Utility Properties panel, in the Name field, update the value to Update Status -

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

d. Click Apply.

Page 58: PRPC Build Your First Application

53

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

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

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

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

c. Select theUpdateStatus utility shape and drag it until it is to the right of theUpdateStatus -Resolved-Completed shape. (The system automatically redraws the connectors. You adjust these inthe next step.)

Page 59: PRPC Build Your First Application

54

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

e. With that connector selected, in the Connector Properties panel, in the Flow Action field, use theSmartPrompt to select the standard Reject flow action rule. Click Apply.

Page 60: PRPC Build Your First Application

55

f. Select theUpdateStatus shape. In the Utility Properties panel, in the StatusWork field, use the Smart-Prompt to select the standard Resolved-Rejected status. In the Name field, update the value toUpdate Status - Resolved-Rejected. Click Apply.

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

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

The flow should look like the following image.

Page 61: PRPC Build Your First Application

56

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

11. Select the connector labeledApprove, 100%. In the Connector Properties panel, in the Likelihood field, enter70. Click Apply.

Page 62: PRPC Build Your First Application

57

12. Select the connector labeledReject, 100%. In the Connector Properties panel, in the Likelihood field, enter30. Click Apply.

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

The flow should look like the following image.

13. Click to exit the flow editor.

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

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

Continue to the next tutorial topic.

Page 63: PRPC Build Your First Application

58

Part C: Review the updated processThe following steps describe how to run the process to see how it has changed with the updates made in Step 4.B.

1. Run the updated process using the Run ( ) menu from theQuick Launch toolbar as you did earlier (clickingCreate and Submit to continue to each process step), and notice the differences.

l The user interface no longer displays text saying that something does not exist

l At the point where the process reaches theReview shape, theStatus in the work item heading is setto Pending - Approval

l The user interface at this point now displays the section heading as Approve this selection OR

l The alternate Reject step is provided as a choice in an action drop-down list

l A Note field is displayed to enter a note

The system automatically provides that section heading and that note feature because you used the Smart-Prompt in the Flow Action field for that connector and selected the standard Approve flow action rule from theSmartPrompt list. Recall that the ER004_Add_Note requirement provided by the Globex subject matterexperts describes enabling the hiringmanager to add a note when approving the request. Notice that thestandard Approve rule meets that requirement.

2. When you click Submit and reach the final screen of the process, the work item status now displaysResolved - Completed. This is a result of specifying the status for theUpdate Status - Resolved-Com-pleted shape in the flow diagram.

Page 64: PRPC Build Your First Application

59

3. When you reach the final screen of the process, close the process tab by clicking the in its tab.

4. Run the process again, this time selecting the Reject choice from the drop-down list in theApprove thisselection OR section.

The system automatically provides an entry field for the hiringmanager to enter a rejection note. In Step 4.B,the standard Reject flow action rule was specified for the Reject connector, and this standard rule providesthat user interface.

5. Click Submit. Notice that after selecting the Reject choice and completing the process, the work item statusnow displays Resolved-Rejected. This is a result of specifying the status for theUpdate Status -Resolved-Rejected shape in the flow diagram.

6. Close the process tab by clicking the in its tab.

Continue to the next tutorial topic.

Page 65: PRPC Build Your First Application

60

ReviewIn this step you adjusted the process generated by the Application Accelerator by:

n Incorporating the Reject step into the flow

n Naming the connector shapes (flow actions)

n Specifying the work item's status for the Update Status process steps

You also created the two flow action rules that will present the user interface at the Select Hardware and Select Soft-ware points in the process. You will associate the user interface with those flow actions in a subsequent step of thistutorial.

To readmore about the skills you used in this step, see

n Flows - Concepts and terms [Developer Help] ( )

n About Flow rules [Developer Help] ( )

n How to create and test a flow model [KB 25166] ( )

In the next tutorial step, you begin working on the datamodel for this application.

Move to the next step in the tutorial.

Page 66: PRPC Build Your First Application

61

Step 5: Create a data modelTypically performed by In the previous

step, youPurpose of this stepTo... So that...

Business Analysts and Sys-tem Architects

Revised andextended the defaultprocess

Extend the system-pro-vided datamodel withitems specific to the appli-cation being built

Later steps have the data propertiesneeded to display values in the userinterface and store values entered inthe work item

All Process Commander applications collect, process, and display data. The organization and structure of this datais called the data model. The Process Commander system provides a base datamodel for every application. Thisbase datamodel includes standard items such as the pyStatusWork property for the work item's status. Typ-ically, you extend the system-provided datamodel with items that are specific to the application being built.

Properties hold the data associated with a process and work item. They can appear in fields in the user interface orcan be hidden from view. Properties are used to store values, and the property rule can define the on-the-glass dis-play of those values (such as displaying a value as read only or as a drop-down list). For example, in the Onboardingapplication, the values entered into the user interface fields of First Name and Last Name are stored in propertiesassociated with those fields.

The following table lists the fields that are to appear in the StartEquipmentRequest flow’s user interface. In this tuto-rial step, you create the corresponding properties that are to display values in the user interface and to store valuesthat are entered into the work item.

Field Used Corresponding PropertyDepartment .Department

First Name .FirstName

Last Name .LastName

Manager .Manager

Department Budget .DepartmentBudget

Remaining Budget .RemainingBudget

Hardware Total .HardwareTotal

Page 67: PRPC Build Your First Application

62

Field Used Corresponding PropertySoftware Total .SoftwareTotal

Hardware Items .HardwareItems()

Software Items .SoftwareItems()

Continue to the next topic to begin this step of the tutorial.

Part A: Create a single value propertyCreate a single value property to hold the Department information.

1. In the Application Explorer, right-click the GLBX-FW-OnboardingFW-Work class. Select New > DataModel> Property from the context menu.

2. In the New Instance of a Rule dialog, enter Department for the Property Name. Confirm the Applies To,RuleSet,Version, and Type fields are set to GLBX-FW-OnboardingFW-Work, OnboardingFW, 01-01-01, and Text.

Page 68: PRPC Build Your First Application

63

3. Click Create . The Property form for this new property rule displays.

4. In the Property form, use the SmartPrompt in the Control field to select PromptSelect.

Page 69: PRPC Build Your First Application

64

5. In the Table Type field, select Local List. The Table Values list box displays.

6. In the Table Values list box, enter these values in the table:HRDocumentationEngineeringLegalFacilities

Select the first row (1) to enter the first value, then click to add rows and enter the remaining values.

Page 70: PRPC Build Your First Application

65

7. Confirm that the values for the remaining fields on the General tabmatch the following image.

Page 71: PRPC Build Your First Application

66

8. Click Save ( ) to save the Department property, then click the icon to close the rule form's tab.

Continue to the next tutorial topic.

Page 72: PRPC Build Your First Application

67

Part B: Create properties using the Property WizardUse the Property Wizard to create several properties at once.

1. In the Application Explorer, right-click GLBX-FW-OnboardingFW-Work and select Define Properties from thecontext menu. The Define Properties wizard opens.

2. Confirm that the RuleSet and RuleSet Version fields are set to OnboardingFW and 01-01-01. If they con-tain different values, specify the values as shown.

3. Create the following properties. The wizard will automatically generate property names from the contents ofthe Description fields, removing any spaces.

Page 73: PRPC Build Your First Application

68

Description Mode TypeFirst Name Single Value Text

Last Name Single Value Text

Manager Singe Value Text

Department Budget Single Value Decimal

Remaining Budget Single Value Decimal

Hardware Total Single Value Decimal

Software Total Single Value Decimal

4. Click Next>> to advance to the Define Display step. Specify the following settings:

Page 74: PRPC Build Your First Application

69

Name Display As DetailsFirst Name TextBox Default

Last Name TextBox Default

Manager TextBox Default

Department Budget TextBox CurrencyAmount

Remaining Budget TextBox CurrencyAmount

Hardware Total TextBox CurrencyAmount

Software Total TextBox CurrencyAmount

5. Click Finish. Use the Application Explorer to verify that the properties were created under the GLBX-FW-OnboardingFW-Work class.

Page 75: PRPC Build Your First Application

70

6. Click the icon to close the Define Properties wizard's tab.

Continue to the next tutorial topic.

Page 76: PRPC Build Your First Application

71

Part C: Create embedded propertiesNow you will create properties of modePage List. Individual properties that belong to a Page type of property (oneof mode Page, Page List1, or PageGroup) are called embedded properties. The Pagemode property is called anembedded page2.

Here, the embedded properties are created automatically when you associate the Pagemode property with a dataclass. The properties already defined in the class become the individual properties for that page.

1. In the Application Explorer, under GLBX-FW-OnboardingFW-Work, expand the DataModel category if it isnot already expanded. Right-click Property and select New from the context menu.

The New Rule dialog opens.

2. In the New Rule dialog, enter Hardware Items in the Property Name field.

1A Page List mode property is a data structure consisting of an ordered list of zero or more pages, each identified byan integer index (starting with 1). Page List is one of the elevenmodes a property rule may have. Pages must becreated with sequential subscripts: 1 before 2, 2 before 3 and so on.2An embedded page is a clipboard page that has the value of a property of mode Page. Any page on the clipboardthat is not a top-level page is an embedded page. Process Commander uses a recursive page structure. Pages con-tain properties that can have single or multiple pages as their values. For example, the Obj-Browsemethod createsan array of embedded pages (all of the same class) that contain its results.

Page 77: PRPC Build Your First Application

72

3. Confirm the Applies To, RuleSet,Version, and Type fields are set to GLBX-FW-OnboardingFW-Work,OnboardingFW, 01-01-01, and Text.

4. Click Create. The Property form for this new property rule displays.

5. In the Property Mode field, select Page List from the drop-down list.

6. In the Page Class field, type GLBX, and then use the SmartPrompt to see the classes beginning with GLBX-.Select the GLBX-Data-Hardware class. This associates this Page List with the data table that is based onclass GLBX-Data-Hardware and the values in that data table.

Page 78: PRPC Build Your First Application

73

7. Confirm that the General tabmatches the following image.

Page 79: PRPC Build Your First Application

74

8. Click the Advanced tab.

9. Check the Auto-populate Property checkbox. This enables the property values to be automatically populatedat run-time with the values from the associated data table.

10. Do not make changes to the other fields, and click Save ( ) to save the property.

11. Use the Application Explorer to verify the newly created HardwareItems property appears. Click the iconto close the rule form's tab.

Page 80: PRPC Build Your First Application

75

12. Repeat steps 1 to 11 above to create the SoftwareItems property.

Property Name Software Items

Property Mode Page List

Page Class GLBX-Data-Software

At this point, confirm that the HardwareItems and SoftwareItems properties are listed in the Application Explorer,and each has an embedded property named Price.

The two Price properties came from the zip file you imported before beginning this tutorial. You did not create them.The zip file provided the data classes specified for the HardwareItems and SoftwareItems properties, and the sys-tem automatically creates the Price property when you associate the embedded page with the data class.

Continue to the next tutorial topic.

Page 81: PRPC Build Your First Application

76

ReviewIn this step you created a datamodel for your application by:

n Creating a single-value property

n Creatingmultiple properties using the Property Wizard

n Creating embedded properties

To readmore about the skills you used in this step, see

n Introduction to Properties [KB 26322] ( )

n Property Mode definition [Developer Help] ( )

n Page definition [Developer Help] ( )

In this step, you created the process-specific properties that display and capture information for the equipmentrequest process. Now a user interface is needed to use that information. The user interface should be designed tomeet the stakeholders' use cases and requirements. In the next tutorial step, you develop an initial user interfacethat the business analyst can bring to the stakeholders to get their input.

Move to the next step in the tutorial.

Page 82: PRPC Build Your First Application

77

Step 6: Extend the default user interfaceTypically performed by In the previous

step, youPurpose of this stepTo... So that...

System Architects and Busi-ness Analysts

Extended the sys-tem-provided datamodel with items spe-cific to the appli-cation being built

Revise the default rulesand create new rules thatprovide the user interfacefor the work item

The work item begins to look morelike what is desired by the stake-holders, and you can run the processand display the work item for them toget their feedback

The project has a series of requirements for the application user interface. They include:

n The HR Staff Member has to be able to enter basic new-hire information, including first and last name, depart-ment, andmanager

n The HR Staff Member needs amethod to specify the hardware and software package for the new hire

n The HiringManager needs to be able to see what the budget limit is for equipping this position, and the cost ofthe selections made so far, so that the HiringManager knows whether to approve the work item

In addition, the user interface should comply with standard usability guidelines, including these:

n It should be clear at all times what the current operator can do

n The user interface should require aminimum of scrolling to see all elements of the current form

To learnmore about interface design, see Top Ten Usability Guardrails [KB 26006].

The application already includes some user interface resources, created in Step 2. These include:

Item Name

Page 83: PRPC Build Your First Application

78

Four harness rules Confirm

New

Perform

Review

Four section rules CoreSummary

Header

NewHeader

WorkObjectInfo

You can see these in the Application Explorer by expanding the User Interface category under GLBX-FW-Onboard-ingFW-Work, and expanding the Harness and Section categories.

Before beginning this tutorial, you imported a zip file of resources. This collection included the following items:

l Two activities: getHardware and getSoftware

l Two data tables and their associated classes: GLBX-Data-Hardware andGLBX-Data-Software

These items are provided because creating activities and data tables falls outside the scope of this tutorial. Thesedata tables provide values that are used in some of the user interface controls you create in this tutorial step.

In Step 4, you created two flow action rules, but did not associate them with user interface resources. Youmakethose associations in this step.

The datamodel, which you built in Step 5, provides all the properties you need for this step.

To promotemodularity and reuse, a best practice is to create sections to hold needed user interface elements, andthen combine those sections in ameaningful way within the harnesses associated with the various steps of the proc-ess. This tutorial step describes how to:

1. Update an existing section

2. Create new sections

Page 84: PRPC Build Your First Application

79

3. Add properties and controls to the sections

4. Add the sections to harnesses and flow actions

Continue to the next topic to begin this step of the tutorial.

Part A: Customize the CoreSummary sectionRecall from the introduction to the Globex business scenario, that the stakeholders want the fields for entering thenew employee details to appear on the starting screen when the HR Staff Member starts the process. In the appli-cation’s workflow, when a new work item is created, the system displays a form for the operator to enter information.The New harness rule provides the user interface for that form. The standard New harness rule that is generated bythe Application Accelerator contains a standard section namedCoreSummary. This section does not display prop-erties that satisfy the application's requirements:

To illustrate adapting existing user interface elements, the following steps describe how tomodify the standard Core-Summary section to serve the needs of this application:

1. In the Application Explorer, under GLBX-FW-OnboardingFW-Work, expand the User Interface category, andthen expand the Harness category.

2. Click New to open the New harness rule form.

3. Click to change to wireframemode. Wireframemodemakes it easy to identify the names of the included

Page 85: PRPC Build Your First Application

80

sections used in the harness.

4. Within the harness rule form, select the Section Include for GLBX-FW-OnboardingFW-Work.CoreSummaryto highlight it, and then click the open rule icon ( ) to open the section's rule form.

If a warning appears, click OK to dismiss it. This warning appears because you are opening the rule form foran included section. The warning is an alert that indicates the open New harness rule form will not reflect

Page 86: PRPC Build Your First Application

81

changes made to its included sections unless you click the refresh button to refresh the form. If you update asection (in its own tab in the Designer Studio) while the harness is open, and then return to the harness andsave it without first refreshing it to see the updated included section, the system re-saves the section as itexists in the harness, undoing the updates youmade in the section rule.

5. Close (do not save) the New harness rule form by clicking the icon in its tab.

6. In the CoreSummary rule form, click to change to wireframemode. Use the following steps to add aSmartLayout1 (Double) to the section, just below the existing layout:

a. Click the down arrow at the right end of the Layout control group.

b. Select the Layout choice, and holding down your mouse button, drag it into the section just below theexisting layout. When an orange line appears, release your mouse button. The Select Layout Type

1A SmartLayout is a grid (corresponding to an HTML <TABLE> element) of paired cells on a harness, section, orflow action form that has columns of uniform width, uniform styles, and uniform characteristics. Each pair of cellsholds one label and one property value or other form control. Using SmartLayouts rather than "freeform" table layoutsproduces attractive work object forms with less developer effort.

Page 87: PRPC Build Your First Application

82

window opens.

c. In the Select Layout Type window, confirm that the Template radio button is selected and its asso-ciated drop-down list is set to Double. Then click OK.

At this point, the section rule form should look like the following image.

Page 88: PRPC Build Your First Application

83

7. Select the original layout and delete it by clicking the Delete Row icon ( ). The remaining layout is the onethat you added (Smart Layout (Double) - 2).

8. Use the following steps to add labels and fields to this layout to display the new hire's first and last names,the hiringmanager's name, and provide a drop-down list for the user to select the new hire's department:

a. Apply the FirstName property to the first field by dragging it into the layout from the ApplicationExplorer:

i. In the Application Explorer, if not already expanded, expand the DataModel category, and thenthe Property category until you see the properties you created in Step 5.

ii. Locate the FirstName property in the Application Explorer, select the blue dot to the left of itsname and drag it into the first box in the first Field column (the second column in the layout).

iii. When you see the outline of the box turn to orange, release your mouse button. The First Nameproperty is added into the field and the property description appears as the associated label inthe Label column.

Page 89: PRPC Build Your First Application

84

iv. Click the Property Viewer icon ( ) to examine this property's options. The Cell Propertiespanel opens.

v. Make sure that Visible is set to Always and select the Required checkbox.

b. Repeat step 7.a for the LastName, Department, andManager properties. Drag each property to the

Page 90: PRPC Build Your First Application

85

appropriate layout cell according to the following image. The Cell Properties panel reflects the data forthe currently selected cell.

9. Click to save the updated CoreSummary section. Close the CoreSummary section rule form by clickingthe icon in its tab.

Continue to the next tutorial topic.

Part B: Create the sections for selecting hardware andsoftware itemsGlobex's requirements for the work item include having selection lists for the user to select the hardware and soft-ware items for the new hire. The following steps describe how to create section rules that provide the user interfacecontrols for these lists at runtime.

As you perform these steps, a warningmessagemight display stating "The Property Panel is Dirty. Do you want tosave the changes?". If that message appears, click OK . It indicates that a Cell Properties panel has unsavedchanges.

1. In Step 6.A, you expanded the User Interface category under the GLBX-FW-OnboardingFW-Work class inthe Application Explorer. Right-click on Section and select New from the context menu.

2. In the New Instance of a Rule dialog, enter SelectHardware for the Purpose field. Confirm the Applies To,RuleSet, and Version fields are set to GLBX-FW-OnboardingFW-Work, OnboardingFW, and 01-01-01,and the Template field is blank. Click Create.

3. Switch to wireframemode by clicking .

4. Add a Repeat Grid under the default layout by adding a layout as you did in Step 6.A, and in the Set LayoutType window, select the Repeating radio button and select Grid in the drop-downmenu. Then delete thedefault layout (Smart Layout (Double) -1).

Page 91: PRPC Build Your First Application

86

5. Open the properties panel for the Repeat Grid by selecting the Repeat Grid and clicking themagnifying glass

( ) .

6. In the Repeat Grid properties panel, make sure the Source is set to Property. In the List/Group field, use

Page 92: PRPC Build Your First Application

87

the SmartPrompt to select HardwareItems. Set the Edit Mode to Read/Write.

7. Complete headings for the first two columns of the repeat grid. Select the top cell of the first column. The prop-erties panel refreshes to reflect the currently selected cell's data. Type Hardware in the Value field. Selectthe top cell of the second column. Type Price in the Value field.

8. Add a DynamicSelect control to the cell below theHardware heading by clicking the down arrow at the rightend of the Advanced control group, selecting the DynamicSelect choice, and dragging it into the cell.

Page 93: PRPC Build Your First Application

88

9. Click next to the cell with the DynamicSelect to open its properties panel. In the Property field, use theSmartPrompt to display the list of choices. Double-click More to see the full list of available properties. Scrolldown until you locate the .pyLabel property, and double-click it to specify it for the Property field.

10. Use the following steps to specify themethod for the system to use at runtime to get the contents of theDynamicSelect list. In this tutorial, an activity is used to get the hardware items to populate this

Page 94: PRPC Build Your First Application

89

DynamicSelect. The activity was provided in the zip file you imported into the system before beginning thetutorial.

a. Click themagnifying glass ( ) beside the Control field to display the parameters form for the Dynam-icSelect control.

b. Specify the following parameters:

Parameter Setting

Method for Generating Dynamic Select Select the Activity radio button.

Activity Information:

Applies To Use the SmartPrompt to selectGLBX-Data-Hardware.

Activity Name After selecting the class for theApplies To field, use the Smart-Prompt to select getHardware.

Class of Returned Results Use the SmartPrompt to selectGLBX-Data-Hardware.

Common DynamicSelect Information:

Select ID Hardware

Default Caption Select Hardware...

Property for Option Display pyLabel

Property for Option Value pyLabel

Enable Caching Select this checkbox.

Page 95: PRPC Build Your First Application

90

c. Do not change any other fields in the window, and click OK to save your choices and close the param-eters window.

11. Use the following steps to specify the runtime (client-side) event that will trigger the change in the displayedvalues. Here, we want the price displayed in the Price column to refresh whenever the selected item in theHardware column changes. The event typically used to do this for selection lists is the "OnChange" event.

a. In the Cell Properties panel, in the Behavior field, click themagnifying glass ( ) to open the ClientEvent Editor. In the Event field, select On Change, and set the Action field to Refresh this

Page 96: PRPC Build Your First Application

91

Section.

b. Do not change any of the other fields and click Save to save your choices and close the Client EventEditor.

12. In the Cell Properties panel for the DynamicSelect control, make sure the Visible field is set to Always. Donot change the values for the other fields. The properties panel should look like the following image.

13. Use the following steps to specify that the Price property of the HardwareItems embedded property is dis-played in the Price column.

a. Select the cell under the Price column heading to display its cell data in the properties panel. In theProperty field, use the SmartPrompt to select the Price property. In the Control field, use the auto-complete to specify the CurrencyAmount control: type the first three characters (Cur), and the systemdisplays a list of suggestions. If the All Matches tab is not selected, select it to see all matchingresults. Double-click CurrencyAmount to select it.

Page 97: PRPC Build Your First Application

92

b. Make sure the Visible field is set to Always and the ReadOnly checkbox is selected. Do not changethe values in the remaining fields.

14. In the repeat grid, delete the two unused columns by clicking in a cell in the column and then clicking the

Delete Column icon ( ). The grid should have the two columns Hardware and Price, and a third column forthe delete icon ( ).

15. Click to save the SelectHardware section. Click the icon in its tab to close the rule form.

16. Following the procedure in steps 1 through 15 above, create another section called SelectSoftware. Whenyou add the repeat grid, where you previously specified hardware-related values, specify the following itemsrelated to the software choices:

l In the Repeat Grid properties panel, make sure the Source is set to Property. In the List/Group field,use the SmartPrompt to specify SoftwareItems. Set the Edit Mode to Read/Write.

l Specify Software as the heading for the first column.

l For the DynamicSelect parameters, specify the following parameters:

Parameter Setting

Method for Generating Dynamic Select Select the Activity radio button.

Activity Information:

Applies To Use the SmartPrompt to select

Page 98: PRPC Build Your First Application

93

Parameter Setting

GLBX-Data-Software.

Activity Name After selecting the class for theApplies To field, use the Smart-Prompt to select getSoftware.

Class of Returned Results Use the SmartPrompt to select:GLBX-Data-Software.

Common DynamicSelect Information:

Select ID Software

Default Caption Select Software...

Property for Option Display pyLabel

Property for Option Value pyLabel

Enable Caching Select this checkbox.

The parameters form for the software DynamicSelect should look like the following image.

Page 99: PRPC Build Your First Application

94

17. The section for selecting software items should look like the following image.

Page 100: PRPC Build Your First Application

95

18. Save ( ) the SelectSoftware section. Click the icon in its tab to close the rule form.

Continue to the next tutorial topic.

Part C: Create the Budgets SectionThe use case descriptions for this process call for displaying information about the department budget, the totals forcosts of the selected hardware and software items, and the remaining budget (department budget less the costs forthe selected items).

Use the following steps to create a Budgets section to display this information in the process's user interface.

1. Create a new section called Budgets (right-click GLBX-FW-OnboardingFW-Work and select New > UserInterface > Section). Save it to the OnboardingFW RuleSet.

2. Turn on wireframemode. Add a Layout (Single) under the default layout by dragging a layout and spec-ifying Single for the Template field. Delete the default Smart Layout (Double) - 1.

3. Populate the Smart Layout (Single) - 1 with the budget-related properties by dragging the propertiesfrom the Application Explorer into the Field column, as you did for the CoreSummary section. The resultshouldmatch the following image.

Page 101: PRPC Build Your First Application

96

4. For each control, in its properties panel (select the cell and click to open) confirm that the Visible field isset to Always and that the ReadOnly checkbox is selected. (If the ReadOnly checkbox is not selected,select it). Open the DepartmentBudget property from its properties panel using the edit icon ( ) and observethat its default control, CurrencyAmount, is set in the property’s General tab. This is true for all the currencyproperties in this application’s datamodel.

5. Save ( ) the section. Click the to close the rule form.

Continue to the next tutorial topic.

Part D: Create the ReviewSelections sectionThe use case descriptions from Globex's subject matter experts call for displaying the budget information and theselected hardware and software items when the hiringmanager is approving or rejecting the equipment request. Thehiringmanager would like to see the relationship between the selected items and the impact on the departmentbudget to help decide whether to approve the equipment request.

To display the required information in the process's user interface, use the following steps to create a Review-Selections section containing the Budget section and two sections (ReviewHardware and ReviewSoftware) that dis-play the hardware and software selections for the new hire.

1. Create a new section called ReviewSelections (right-click GLBX-FW-OnboardingFW-Work and select New> User Interface > Section). Add the Budgets section to it and delete any default layouts. To add the Budgetssection, turn on wireframemode, then select the blue dot next to the Budgets section in the Application

Explorer and drag it into the ReviewSelections section rule form. Click to save the ReviewSelectionssection rule.

2. Create a new section called ReviewHardware. Turn on wireframemode. Add a Repeat Grid to this sectionand remove any other layouts.

3. In the ReviewHardware section's Repeat Grid, specify Hardware andPrice as the headings for the first twocolumns, as you did when creating the SelectHardware section.

Page 102: PRPC Build Your First Application

97

4. Open the properties panel for the Repeat Grid. In the List/Group field, use the SmartPrompt to select Hard-wareItems. (Note: After using the SmartPrompt to select HardwareItems from the list, the List/Groupfield displays .HardwareItems, with a leading period (.) before the property name.) Set the Edit Mode fieldto Read Only. For reviewing, the hardware list should be read-only.

5. In the Repeat Grid, select the cell under theHardware heading. In the properties panel for this cell, use theSmartPrompt in the Property field to select pyLabel (the text .pyLabel should appear in the field). In theControl field, use the autocomplete to specify pxDisplayText. Set Visible to Always andmake sure theWrap Text checkbox is checked.

6. Select the cell under thePrice heading. The properties panel updates to display the cell's properties. Use theSmartPrompt to select Price for the Property field (the text .Price should appear in the field). Set the Con-trol to CurrencyAmount. In the Advanced tab of the properties panel, specify text-align:right for theInline Style field.

7. Remove unneeded columns from the repeat grid, including the columnwith the icon, and save theReviewHardware section. Click the in the rule form's tab to close the form.

8. Follow the same procedure to create, populate, and save a section called ReviewSoftware. Click the inthe rule form's tab to close the form.

9. Return to the ReviewSelections section rule form. Tomake the best use of the screen display area, and toreduce the amount the user will have to scroll to read all thematerial on the review page, the Review-Hardware and ReviewSoftware sections should appear side by side in the ReviewSelections section. In theReviewSelections section, below the Budgets section, add a Free Form layout with three columns and onerow.

Page 103: PRPC Build Your First Application

98

10. Drag the ReviewHardware section from the Application Explorer into the first cell of this layout. Drag theReviewSoftware section into the third cell. Adjust the widths of the cells to align the layout with the Budgetssection above it, as illustrated in the following image.

11. Save ( ) the ReviewSelections section. Click the to close its tab.

Continue to the next tutorial topic.

Part E: Add sections to harnesses and flow actionsNow that the sections with the needed fields and controls are available, use the following steps to add them to theharnesses and flow actions used by the process's user interface.

Page 104: PRPC Build Your First Application

99

1. In the Application Explorer, under EquipmentRequest, expand the User Interface category. Expand the FlowAction category to see the two flow actions you created in Step 4. Click the SelectHardware flow action toopen its rule form. Add the SelectHardware section to the flow action by dragging it from the Application

Explorer into the flow action rule form. Save ( ) the updated flow action rule.

2. Open the SelectSoftware flow action. Add the SelectSoftware section to it. Save ( ) the updated flowaction rule.

3. In the Application Explorer, under GLBX-FW-OnboardingFW-Work, expand the User Interface category, then

the Section category to see the section names. Click Header to open the Header section. Click to showthe wireframes.

4. Drag the ReviewSelections section into the Header section rule form, below the existing layouts.

Page 105: PRPC Build Your First Application

100

5. Save ( ) the Header section and click to close its tab.

6. Run ( ) the process. Create a work item, select hardware and software, and approve the selections. Whenthe process is completed, close its tab by clicking .

As you go through the process, notice that the budget and amount-remaining entries in the budget section donot change yet. You'll create the logic to manage this in a later step. Notice that the grids for the Hardwareand Software items do not show a selection drop-down in the work item until you add the first row by clicking

.

7. To ensure an initial row is created when the process begins, use the following steps to update the pyDefaultmodel to set the first item in the Repeat Grids in the HardwareItems and SoftwareItems sections to an emptyvalue. The pyDefault model rule was created by the Application Accelerator when it created the base appli-cation structure in Step 2. Models are used to set property values. This pyDefault model is used to set valuesfor the work item when the process starts.

Page 106: PRPC Build Your First Application

101

a. In the Application Explorer, underneath EquipmentRequest, expand the Technical category and thenexpand theModel category.

b. Click pyDefault to open its rule form. Notice that it already contains one row, to set the prefix for thework item.

c. Add two rows by clicking the add row icon. In the first new row, specify .Har-dwareItems(1).Price in the first field and "" (two double quotes) in the second field. In the nextrow, specify .SoftwareItems(1).Price in the first field and "" (two double quotes) in the sec-ond field.

d. Accept the default values for the remaining fields. Save ( ) the rule and close ( ) its tab.

8. Run the process again. This time, at the Select Hardware step, the grid displays an initial row upon reachingthe step.

9. Complete the process and then close ( ) its tab.

Page 107: PRPC Build Your First Application

102

Continue to the next tutorial topic.

ReviewIn this step, you built a user interface for the process by:

n Updating an existing section

n Creating new sections

n Adding sections to harnesses and flow actions, so that the fields and controls specified by Globex's subjectmatter experts display at the appropriate points in the application flow.

To readmore about the skills you used in this step, see

n About Section rules [Developer Help] ( )

n How to add aGrid layout to a section [KB 26089] ( )

n Harness, Section, and Flow Action forms - Adding a Dynamic Select control to a field [Developer Help] ( )

n How to configure cascading dynamic select controls [KB 25898] ( )

The application correctly creates a work item and you can add information to it. However, the displayed budget infor-mation does not yet change, andGlobex's subject matter experts have some thoughts about improving the appli-cation. In the next tutorial step, you receive their expanded requirements andmake refinements tomeet theirrequest.

Move to the next step in the tutorial.

Page 108: PRPC Build Your First Application

103

Step 7: Refine the process definitionTypically performed by In the previous step,

youPurpose of this stepTo... So that...

Business Analysts Revised the defaultrules and created newrules that provide theuser interface for thework item

Refine the process toincorporate additionalrequests from Globex'sstakeholders: to provideaction buttons for the hir-ingmanager's actionsand to add a path to returnthe work item to theSelect Hardware stepwhen the hiringmanagerrejects the request.

The additional stakeholder requirements aremet.

After reviewing the process at this point, the Globex stakeholders request some additional behavior:

l Use buttons instead of a drop-downmenu for the user interface at the Review step.

l When a hiringmanager rejects an equipment request, return the work item to the Select Hardware step in theprocess, so that the selections can be updated.

This tutorial step describes how to:

Page 109: PRPC Build Your First Application

104

l Change the harness used in the Review step to provide for action buttons.

l Edit the flow to update the process so that the work item returns to the Select Hardware step when the hiringmanager selects the Reject action.

Continue to the next topic to begin this step of the tutorial.

Part A: Modify the user interface for the Review stepGlobex's stakeholders prefer to give the hiringmanager action buttons to choose the Approve and Reject actions,instead of the drop-downmenu. The standard Perform_Buttons harness provides this user interface.

1. Open the StartEquipmentRequest flow in the flow editor (open the flow in the Designer Studio, then click).

2. Select theReview assignment shape.

3. In the Assignment Properties panel, in the HarnessPurpose field, use the SmartPrompt to specify Perform_Buttons (double-click More in the initial list to see the Perform_Buttons choice).

4. Click Apply to apply the change. Keep the flow rule form open for the next tutorial topic.

Continue to the next tutorial topic.

Part B: Edit the flow to refine the processUse the following steps to refine the process so that the work item returns to the Select Hardware step when the hir-ingmanager selects the Reject action.

1. Select the tail end of the connector that runs between theUpdate Status - Resolved-Rejected shape andthe FlowEnd ( ) shape, andmove it to the connection point on the right side of the Update Status -Resolved-Rejected shape.

Page 110: PRPC Build Your First Application

105

2. Select the head end (arrow head) andmove it to the right hand connection point on the top of the Select-Hardware assignment shape. The flow should look like the following image.

3. Click to save the updated flow. Click to exit the flow editor. Click to close the tab.

4. Run ( ) the process:

a. Select hardware and software items.

b. Notice when the process reaches the Review step, the user interface displays buttons for the Approve

Page 111: PRPC Build Your First Application

106

and Reject actions.

c. Click Reject. Enter a rejection note and click Submit. Notice that the work item header displays Openfor the Status, and that the work item is in an assignment step (the link at the bottom of the form thatsays "StartEquipmentRequest - Assigned To:").

d. Click the link at the bottom of the form. The user interface for the SelectHardware flow action dis-plays, because the updated process moves the work item to this step when the hiringmanager takesthe reject action.

e. Update the hardware and software selections, clicking Submit to proceed through the process. On theReview step, click Approve this selection. Update the note to indicate the equipment request isacceptable, and click Submit.

5. Click to close the tab.

ReviewIn this step you refined the process by:

Page 112: PRPC Build Your First Application

107

l Changing the Review assignment to use the Perform_ Buttons harness.

l Updating the flow tomove the work item to the Select Hardware step when themanager rejects an equip-ment request.

To readmore about the skills you used in this step, see

n Flow form - Editing Utility shape properties [Developer Help] ( )

n Flow form - Editing in Visio - Connectors and flow actions [Developer Help] ( )

n Introduction to process definition and flow rules - Utility and Connector sections [KB 25463] ( )

In the next tutorial step, you will complete the remaining updates to the user interface and prepare it for the stake-holders' review.

Move to the next step in the tutorial.

Page 113: PRPC Build Your First Application

108

Step 8: Create a finished user interfaceTypically performed by In the previous

step, youPurpose of this stepTo... So that...

System Architects Refined the processto add a path forwhen themanagerrejects the work item

Refine the user interfaceso that the work itemreflects what the stake-holders request

The work item displays the infor-mation as described in the use casesand requirements

After reviewing the addition of the alternative reject path, management has requested the following changes to theheader portion of the work item form so that it matches what is described in the use cases and requirements:

l Remove the default Subject, Duplicate ID, Aging Since, and Urgency Adjustment fields.

l Add a label that reflects the name of the framework (Globex Onboarding).

l Add the following information: first and last names of the employee, department, andmanager's name.

l Add a text area control for the rejection note from the hiringmanager, to be displayed when themanagerrejects a request and the work item returns to the Select Hardware step. Themanager uses this note toinform the HR staff member why the request was rejected and what changes tomake.

Continue to the next topic to begin this step of the tutorial.

Part A: Customize the Header sectionThe Perform and Perform_Buttons harnesses both use the Header section to display information at the top of thework item. Recall that the Header section was initially generated by the Application Accelerator. As a result, the sec-tion includes some defaults that the stakeholders do not need. In addition, the stakeholders would like to see infor-mation such as the name of the new hire, the department, and themanager's name in the work item header as itgoes through the process.

The Header section rule defines what is displayed in the work item's header. Use the following steps to remove thedefault information and add the information required by Globex's stakeholders.

1. In the Application Explorer, under GLBX-FW-OnboardingFW-Work, expand the User Interface category, then

the Section category to see the section names. Click Header to open the Header section. Click to show

Page 114: PRPC Build Your First Application

109

the wireframes.

2. The Header section generated by the Application Accelerator includes two layouts by default. Select each lay-

out in turn, and click the Delete Row button ( ).

3. Add a layout (select Template Double) above the included ReviewSelections section.

4. Select the upper-left cell in the new layout. Type Globex Onboarding and click to open the Cell Prop-erties panel. Select the Advanced tab.

5. Next to the Inline Style field, click to open the Style Editor.

6. In the Style Editor dialog, select the following values from the drop-downmenus: font family - Arial,

font size - 16, and font weight - bold. Do not change the values of the other fields.

Page 115: PRPC Build Your First Application

110

7. Click Save in the Style Editor. Close the Cell Properties panel.

8. With the cell containing Globex Onboarding selected, click theMerge Right ( ) icon, so that the textspans the Label and Field columns.

9. In the Application Explorer, expand the DataModel category and the Property category until you see the prop-erties created in Step 5.

10. In turn, add the FirstName, LastName, Department, andManager properties to the layout by selecting theblue dot next to a property and dragging it into a cell in one of the Field columns. Add each property until thelayout matches the following image.

Page 116: PRPC Build Your First Application

111

11. In the first Field column (the second column), select the cell to the right of the First Name label and click

to open the Cell Properties panel.

12. Rather than using text input fields, use pxDisplayText controls to display the work item information. ThepxDisplayText control displays property values in a read-only field, making it a good UI component for infor-mational headers.In the Control field, use the autocomplete to specify pxDisplayText. Repeat this step foreach of the other three cells containing property values.

13. Click to save the updated Header section.

Continue to the next tutorial topic.

Part B: Add manager's note to the Header sectionThe following steps describe how to add the heading text and the control to display the hiringmanager's note in thework item's header. In the next tutorial step, you add logic to determine if the control can accept text input based onwhere in the process the work item is currently located.

Page 117: PRPC Build Your First Application

112

1. In the Header section, add a new layout between the top layout and the included ReviewSelections section.Select Single for the Template field.

2. In the upper-left cell of the new layout, type Manager notes. Use the Style Editor to give the text a boldweight.

3. Select the cell below Manager notes. In the Layout toolbar, click theMerge Right icon ( ).

4. Drag a Text Area control into themerged cell.

Page 118: PRPC Build Your First Application

113

5. Using the Cell Properties ( ) for the Text Area control, in the Property field, specify .pyNote.

6. Save ( ) the Header section. Leave the tab open, as it is used in the next tutorial step.

7. Optional: Run the process to see the changes made in this tutorial step reflected in the work item's header.

Continue to the next tutorial topic.

ReviewIn this step you enhanced the user interface by customizing the Header section, which is used at the top of the workform. You also added a text area for amanager's note, which is further enhanced in the next step.

To readmore about the skills you used in this step, see

n How to create attractive flow actions using SmartLayouts [KB 25623] ( )

In the next tutorial step, you enhance the behavior of themanager's note and the budget and hardware and softwareselection information, to conditionally display them in the work item.

Move to the next step in the tutorial.

Page 119: PRPC Build Your First Application

114

Step 9: Create decision rulesTypically performed by In the previous

step, youPurpose of this stepTo... So that...

Business Analysts Refined the userinterface so that thework item reflectsthe stakeholdersrequest

Create decision rules toconditionally display partsof the user interfacebased on where the workitem is in the process

The application and the work item'sstate can automatically respond tochanging conditions

Decision rules automate business decisions, so that the application knows what to do, or display, under certain con-ditions. In the application you are building, there are three areas where decision rules help you create an informativeand useful experience for the user:

l Deciding what amount to display as the onboarding budget for the current new hire.

l Displaying the cost of hardware and software selected, and how much is left in the onboarding budget.

l Displaying the ‘Manager’s note’ label and text area in the work object header only when there actually is amanager’s note to display.

Other typical uses of decision rules, which this application does not need, include:

l Routing the work object to amanager for approval under certain conditions

l Automatically approving, or rejecting, a work object when it meets certain calculated conditions.

Decision rules canmake use of the dependency network, an internal data structure that supports “forward chaining”,or automatic recalculation of certain property values based on changes to other property values. When propertyvalues change, the system automatically consults the dependency network to see whether the change affects othervalues.

The dependency network operates invisibly and automatically. This canmake it more difficult to test and debug for-ward-chaining relationships.

Continue to the next topic to begin this step of the tutorial.

Page 120: PRPC Build Your First Application

115

Part A: Create when condition rules to control sectionsThe stakeholders want the header ‘Manager notes’ to appear only when amanager has actually entered a note. Theyalso want the budget information and the lists of selections to appear only at the Review step of the process.

To govern these conditions, use when condition rules. A when condition rule evaluates a Boolean logical statementinvolving properties, and returns 'true' or 'false'. In this tutorial step, you create a when condition rule so that when itreports 'true', the associated user interface item displays.

For the case of themanager note, you create a when condition rule that reports 'true' when the property pyNote is notempty. For the case of the budget and selection information, you create a when condition rule that reports 'true' whenthe work object status is Pending-Approval. (Recall that in Step 4.B, you set the StatusWork field to Pending-Approval on the Review assignment shape.)

1. In the Header section rule form, turn on wireframemode. Select the layout holding theManager notes textarea (the Smart Layout (Single) -2). Click to display the properties panel for the layout.

2. In the properties panel, in the VisibleWhen field, type NoteExists.

3. Click the edit icon ( ) to the right of the field to create a new when condition rule with the nameNoteExists.

4. Do not change the defaults in the New Instance of a Rule form, and click Create. The rule form opens.

Page 121: PRPC Build Your First Application

116

5. Click the Advanced tab of the rule form. Set conditions so that the when condition rule will return “true” whenboth of these conditions aremet:

l .pyNote is not a blank text item (“”)

l .pyNote is not a null value

Specify the values so that the Advanced tab of the rule form matches the following image. Note that you haveto incorporate all of the conditions in the Logic field in the Logic of Table Elements section.

6. Save ( ) the when condition rule and return to the Header section rule form.

7. In the Header section rule, select the Section Include for the ReviewSelections section. The properties panelrefreshes to display the Section Include properties. In the VisibleWhen field, type PendingApproval andclick the edit icon ( ) to the right of that field to create a new when condition rule with the name Pend-ingApproval.

8. In the New Instance of a Rule form, do not change the defaults. Click Create. The rule form opens.

9. On the Conditions tab of the rule form, click the blue "second value" text. The display changes to entry fields

Page 122: PRPC Build Your First Application

117

with SmartPrompts.

10. Click the icon and select the work object's status is [given value] from the list.

11. Select Pending-Approval from the drop-down list.

12. Save ( ) the when condition rule, and click to close its tab.

13. In the Header section rule form, click to save, and click to close its tab.

Now when you run the process, the budget information and selected hardware and software lists only appear at theReview step. In addition, the ‘Manager notes’ label text area will only appear in the header when amanager has actu-ally added a note (typically to provide a reason for rejecting the equipment plan and sending the equipment requestback for revision).

Continue to the next tutorial topic.

Page 123: PRPC Build Your First Application

118

Part B: Create rules to calculate budget amounts andtotalsGlobex's stakeholders want the work item to display the amount of money available to equip the new hire with hard-ware and software at the Review step, so that themanager can easily see his or her budget and the impact of theselections on the budget. Each department has its ownmaximum amount, so the displayed value depends on thedepartment in which the new hire will work. The stakeholders also want the work item to show the cost of hardwareand software that is selected for the new employee, and how much is left in the budget.

1. Use the following steps to create a decision table rule that specifies the budget figures for each department:

a. In the Application Explorer, right-click GLBX-FW-OnboardingFW-Work, and select New > Decision >Decision Table from the context menu.

b. In the New Instance of a Rule form, enter DepartmentBudget for the Purpose field. Confirm thatthe Applies To field is set to GLBX-FW-OnboardingFW-Work, the RuleSet is set to Onboard-ingFW and the Version is 01-01-01. Click Create.

c. Click the top cell of theConditions column. The Decision Table Property Chooser opens. In this win-dow:

i. Use the SmartPrompt to select Department for the Property field.

ii. Confirm that the Label field is set to Department.

iii. Leave the Use Range checkbox unchecked.

Page 124: PRPC Build Your First Application

119

iv. Confirm that the UseOperator field is set to =.

v. Click Save.

d. Specify the following values in the decision table, adding ‘else if’ rows ( ) for the second throughfifth departments. Click in one of the cells in theDepartment column and use the SmartPrompt toselect a value.

Department ReturnHR 3000Documentation 3500Engineering 5000Legal 4000Facilities 1500

e. Because the user selects a choice using a drop-downmenu during the process, it is highly unlikelythat the table would have to evaluate any other department name. However, to secure against theunexpected, enter a zero (0) in theReturn column of the otherwise row. The decision table should

Page 125: PRPC Build Your First Application

120

look like this:

f. Save ( ) the decision table, and click to close its tab.

2. Use the following steps to create a Declare Expression rule that automatically computes the budget for thedepartment selected using this decision table:

a. In the Application Explorer, under GLBX-FW-OnboardingFW-Work, expand the DataModel category,and then expand the Property category. Right-click on theDepartmentBudget property and selectDefine Expression from the context menu.

b. In the New Instance of a Rule form, confirm that the Applies To field is GLBX-FW-OnboardingFW-Work, the Target Property is .DepartmentBudget, the Page Context is empty, the RuleSet isOnboardingFW, and the Version is 01-01-01. Click Create.

c. On the Expressions tab click 'Value of' in the line beginning Set .DepartmentBudget=. A drop-downmenu appears. Select Result of Decision Table.

Page 126: PRPC Build Your First Application

121

d. A field with a SmartPrompt appears to the right of the drop-downmenu. Use the SmartPrompt toselect DepartmentBudget.

e. Save ( ) the rule, and click to close its tab.

3. Repeat step 2 to create three additional Declare Expression rules for properties HardwareTotal, Soft-wareTotal, and RemainingBudget. Use the following specifications:

l For the HardwareTotal property, specify the expression as Set .HardwareTotal = Sum of .Har-

dwareItems().Price. Click the Change Tracking tab, and set the Calculate Value field to When-ever Used to ensure that the target property value (HardwareTotal) matches the computed value atevery point in the process where the property is used. Do not change any of the other fields. Click

to save the rule, and click to close its tab.

When you save the rule, a warning appears stating "For best performance, avoid theWhenever Usedoption for change tracking." This warning alerts you to the fact that theWhenever Used choice can becostly in terms of performance. By setting theWhenever Used option, each time the system reads thetarget property, the system evaluates this Declare Expression rule. If the property is used inmanylocations in the application, the system recomputes this expressionmultiple times, which can affectsystem performance. The warningmessage is an alert that youmight want to reconsider that choice.Because this is a small application and these properties are only accessed at the Review step of theprocess, the level of recomputation is minimal and this alert can be ignored.

l For the SoftwareTotal property, specify the expression as Set .SoftwareTotal = Sum of .Sof-

twareItems().Price. Click the Change Tracking tab, and set the Calculate Value field to When-

ever Used. Do not change any of the other fields. Click to save the rule (ignore theperformance warning for the reasons described for the HardwareTotal property), and click to closeits tab.

Page 127: PRPC Build Your First Application

122

l For the RemainingBudget property, specify the expression as Set .RemainingBudget = Value of

.DepartmentBudget - (.HardwareTotal + .SoftwareTotal). Click the Change Trackingtab, and set the Calculate Value field to Whenever Used. Do not change any of the other fields.

Click to save the rule (ignore the performance warning for the reasons described for the Hard-wareTotal property), and click to close its tab.

4. Run the process. When you get to the Review step, the work item should display:

l A budget figure appropriate for the selected department. (These figures are the ones specified in theDepartmentBudget decision table.)

l Totals for the selected hardware and software.

l The amount of the department budget remaining, less the totals for the selected hardware and soft-ware. (Note that you canmake selections that exceed the budget. The application displays the budgetfigures, but is not enforcing them.)

The following image shows the work item when Legal is chosen for the Department, and the hardware and soft-ware are selected as shown. In the decision table, the budget for the Legal department is 4000, and the work itemform displays $4000.

Page 128: PRPC Build Your First Application

123

Continue to the next tutorial topic.

ReviewIn this step you enhanced the display of the work object by:

l Using when condition rules to govern the display of the budget and selected items information and the “Man-ager notes” area.

l Providing a decision table and Declare Expression rules to display the correct budget and total amounts.

To readmore about the skills you used in this step, see:

Page 130: PRPC Build Your First Application

125

Step 10: Document the applicationTypically performed by In the previous

step, youPurpose of this stepTo... So that...

Business Analysts Created decisionrules to conditionallydisplay parts of theuser interface tomeet the stake-holders' final require-ments and completedevelopment of thisapplication

Document the currentstate of the application

You can communicate details aboutthe application to others.

With the application functioning and satisfying its requirements, it is time to document what you built.

In this step you prepare and export a detailed application documentation package.

The output document is for the guidance of colleagues whomay need to extend, connect to, or support the appli-cation you have built. It is aMicrosoft Word document that lists all of the use cases, work types, and rules asso-ciated with your application in sufficient detail so that other people in the organization can quickly understand howthe application works. Creating such a document might also be a requirement of the company’s internal policies, reg-ulatory bodies, or investors.

Continue to the next topic to begin this step of the tutorial.

Part A: Document the applicationProcess Commander provides an automated tool to create documentation quickly. You can thenmodify the result-ing document by adding images, additional content, or other essential information, before saving a final copy.

Page 131: PRPC Build Your First Application

126

1. Click > Application > Tools > Document. The Application Documentation wizard appears:

2. Confirm that your application appears in the Application field. Select ApplicationDocument in the Tem-plate field, and click Next >>.

3. In theSelect RuleSets step, confirm that all RuleSets related to your application are selected.

Page 132: PRPC Build Your First Application

127

4. Click Next >> tomove to theSelect Work Types step. Confirm that all work types and supporting use casecategories are selected.

5. Click Next >> tomove to theSelect Criteria step. Select Full Application Documentation in theDetail Level drop-downmenu. The system refreshes the display. Review the items on the Application CriteriaandWork Type Criteria tabs to see what items are selected by default. You can select other unselecteditems if you wish, but do not clear any checkboxes that are selected after specifying the Full Appli-

cation Documentation choice. 

Page 133: PRPC Build Your First Application

128

6. Click Next to advance through theOrder Flows, Define Diagrams, andDefine Screenshot Data stepswithout modifying any values.

7. On theCapture Screens step, select a style from the Preview Style field and click Start Captures to collectscreen captures of the significant steps in your application’s process. A progress bar shows the wizard’s prog-ress.

8. When the capture is complete, the wizardmoves automatically to theCreate Document step. Click CreateDocument. The wizard launches Microsoft Word and assembles the document. When the document isready, a confirmationmessage is displayed. You can then review the document.

The resulting document provides a great deal of information about your application, inserting flow diagrams, screenshots, and informative tables at relevant points.

Notice that several sections have almost no information at all. Small applications, like the one you built in this tuto-rial, often do not exercise all dimensions of Process Commander. The light documentation in sections such as DataManagement reflects the amount of attention applied to that area during this tutorial.

If you decide to add text, further graphics, or other material to the document, remember to save a copy to preventoverwriting the next time you run the documentation wizard.

When you are finished reviewing the document, closeMicrosoft Word and then click Cancel to end the ApplicationDocumentation wizard. Click to close the wizard's tab.

This step completes the tutorial. You can log out of the Process Commander system if you want.

Page 134: PRPC Build Your First Application

129

Continue to the next tutorial topic.

ReviewThis is the end of the tutorial. You have followed a hands-on process, from directly capturing the application's objec-tives and requirements in the system to documenting the complete, working application you have built. Creating thismodest application has given you a chance to experiencemany of the features and challenges common to all Proc-ess Commander development projects.

In a typical business environment, future directions for this application would typically include such items as:

l Routing the work item to amanager for approval

l Routing the work item to a financial analyst when the cost of the selected items exceeds the departmentbudget

l Automatically approving, or rejecting, a work item if it meets certain calculated conditions

In following the steps of the tutorial, youmight have had questions about what you were doing or why you had to doit. If that is the case, take advantage of the links to further resources provided at the end of each step. Thoseresources will help you address your Process Commander questions.

Don't end your journey here! Thematerial on the Pega Development Network provides instructions and examplescoveringmany complex development tasks. Themembers of the forum community have a great deal of experiencewith Process Commander that they are eager to share. Process Commander is designed to help youmeet big devel-opment challenges, and themore you work with it, themore its strengths will become clear to you.


Recommended