Professional Documents
Culture Documents
Based on HTML and XML standards, Process Commander can support a wide range of user interaction facilities and
approaches. Your application's user interface can take into account the environment, the domain knowledge of your users,
their skills, locale, and language.
The appearance, branding, and interaction dynamics of your user interface can match the context and language that is
natural to your application's users.
Evolving an application's user interface is best done by designers and developers who have both application domain
knowledge and usability skills.
Section rules define the contents, appearance, and behavior of portions of harness forms.
Control rules determine the appearance of a single property on an HTML input form or display.
Text File rules, which can define static aspects of your user interface such as Cascading Style Sheets or
JavaScripts.
Binary File rules, which identify images such as JPG or GIF files.
The HTML text you enter into HTML rules is known as source HTML. It contains ordinary HTML code plus JSP
tags or directives server-side instructions that Process Commander evaluates at runtime to compose the final HTML it
sends to the HTTP server (and ultimately to a user's browser session). Known as stream processing, this evaluation
accesses the clipboard for text values to insert into the output HTML, incorporate the text of other HTML rules, provide
conditional if-then-else testing, and looping through arrays.
Harness forms use the pega:include JSP tag to incorporate multiple sections, which in turn use standard styles and
fragments to present properties, labels, and images. For your application, you can copy and tailor parts of these forms as
necessary, while inheriting the standard parts.
Tools
These tools support your evolution of the user interface of your applications:
Harness rules preview and the Application Explorer Allow you to interactively revise the content and the layout
of a user form or flow action form
Branding wizard Defines and maintains a family of styles for the User portal, user forms, and reports
Rules Inspector tool Identifies the harness, section, HTML rules and properties that together make up a form
Image Library gadget Helps you find and identify the name of images that are available as binary file references
Style Discovery tool and Style Viewer Allow you to learn about and experiment with styles
Use the controls at the top of this tab and drag and drop operations to review or update this harness rule and associated
section rules.
Basics
The tab presents a real-time preview of the user form, allowing you to adjust the contents, position, style, and other aspects
of the elements in the form quickly.
Areas of the layout that correspond to section rules (or other elements) that you cannot update appear with a gray
background. This may mean that the rule needs to be checked out by you, or belongs to a locked RuleSet version, or
belongs to a RuleSet version that you are not allowed to update.
You cannot use this tab to modify section rules (referenced in the harness rule) with the Auto-generated
HTML? checkbox cleared (on the HTML tab). These are marked Manual
this tab to modify section rules are in the legacy format. These are marked
When you save this rule form, Process Commander also saves any other section rules you have open that this rule
references, and validates the rules as they are saved.
At runtime, the initial state of each collapsible element on a user form collapsed (
) or expanded (
) is
determined by the state on the Harness form when you save the form.
As a best practice, build your application skin (using the Branding wizard) before you develop harness rules, especially if
you are using SmartLayouts (with spacing determined by the skin styles.) The system renders the Layout tab using the
styles of the skin rule identified in the Skins field of theRun Process In group of your General preferences. If the Skins field
is blank, these displays use the styles marked Work on the Styles tab of the skin identified in your current portal rule.
See Designer Studio Setting your preferences.
Using the Harness form to review or update a harness rule creates a clipboard page and initializes properties. This may
in turn cause declarative processing to execute. Use caution before implementing any OnChange declarative processing
that produces database updates.
Click the
button to present the SmartFrames wireframe preview. Blue wireframe rectangles help you
understand the structure of the section, names of rules referenced in this rule, and the size and other relationships of
elements in the section.
Click the
button to hide wireframes, providing a less busy and more faithful preview.
Control
Description
Delete the contents of a single cell (not a row or column).
Insert a new row before (above) the selected row.
Insert a new row after (below) the selected row.
Delete the selected row.
Insert a new column before (to the left of) the selected column.
Insert a new column after (to the right of) the selected column.
Delete the selected column.
Merge right Combine the selected cell and the cell to the right.
Merge down Combine the selected cell and the cell below it.
Unmerge Undo the previous merge.
You can also alter the table structure with Windows pointer operations. Select a row, cell, or column and right-click to access
a context menu. Select menu operations Cut, Copy, Paste, Insert Row,Delete Row, or Delete Column.
) or as clickable tabs (
the Layout tab; click a tab to bring it to the front, or click a plus sign to expand a section.
When you save a Harness rule form, the state of these controls is saved as well, and determines the initial presentation of
the form. To achieve the desired results, before you save the Harness rule form:
Click one tab to make it front-most when the user form initially appears at runtime, or
Click the
or
Structurally, every harness consists of one or more containers. (The container structure is not required for those harness
rules that are defined through handcrafted HTML code.) A container can provide a visual grouping of multiple sections.
Headers belong to containers. A container may have a horizontal header, a set of tabs identifying the (top-level) sections it
contains, or no header.
Each container can contain one or more sections, which in turn can contain layouts, repeating layouts, and other sections.
Sections contain cells, arranged in rows and columns.
You can rapidly mock up the layout, labels, and controls on this tab before all properties it ultimately will reference are
defined. The development effort you make in designing layout is not wasted, as the resulting Harness rule is a valid starting
point for further evolution after the property rules are created.
When you first drop a control dragged from the Basic Group, the control initially references a standard placeholder property,
for example @baseclass.pyTemplateInputBox. You can save and preview the Harness form (although these properties are
not part of your application's work items).
To produce a harness rule with the appropriate layout, drag and drop the controls, adjust the labels, but do not complete the
Cell Properties panel. Reopen the Harness form and update each Cell Properties panel later, when the real properties are
defined.
Each control is defined by your inputs in floating panel, which you can pin for faster input. To open the panel, select the
control (after dropping it) and click the magnifying glass (
panel:
Pin the panel to a location. The OK button disappears, and each input you enter is immediately applied to
the open rule form.
Release the pin. The OK button appears. Your inputs do not affect the open form until you click OK .
Close the panel. If you have entered changes that are not yet applied, a warning dialog may appear,
depending on the Warn on modified checkbox in the SmartFrames Edit area of the Editpreferences group.
See Designer Studio Setting your preferences.
Layout Group:
Contr
ol
Description
Add a panel set to this harness, to support a composite portal. See Adding a panel
set.
Add a container to the harness form. Every harness must contain at least one
container. The sections within a container may be presented vertically or with tabs.
See Adding a container.
Add a layout to the harness a <TABLE> element containing one or more rows
and one or more columns. You can then change the number and size of rows and
columns, and set up the contents of each cell (a <TD> HTML element). See:
Adding a layout
Basic Group:
A cell can hold a label or property value or a form field that accepts a user-entered property value. The property value uses a
control rule to present the value in read-only or read-write mode.
Contr
ol
Description
Place a button into a cell at the bottom of the form. When clicked at
runtime, the button starts an action. Corresponds to a .pxButton control
rule. Adding a button.
Add a checkbox representing a TrueFalse value. Corresponds to
a.pxCheckbox control rule. Adding a Checkbox.
Add a radio button group representing a property value. Adding a radio
button group.
Place a text link in a cell. When clicked at runtime, the link starts an
action. Corresponds to a .pxLink control rule. Adding a Link control.
Add a Select control that presents a fixed list of values. Adding a Select control.
Advanced Group
Contr
ol
Description
N/A
You can complete two cells of a layout in one step if the left cell is to contain a text label and the right cell is to contain a field
corresponding to a property on the Application Explorer.
1.
Locate and expand the work type that contains the property on the Application Explorer.
2.
3.
4.
The system places the Short Description text of the property as a label in the left cell. It places the property as a
(read-write) field in the right cell. You can adjust the settings for these cells.
) for the Single Value property to be placed in the field. Drag and drop the dot into the
6.
Several standard rules are available for your use in the @baseclass, Work- class, or othr classes. Other standard
harness rules not listed are used in the Application Accelerator and other wizards. Your custom harness rules
typically override these by using the same Purpose key part.
7. A to G
Harness
Description
More
@baseclass.
ActivityStatusSucces
s
How to
customize the
activity success
and exception
windows
@baseclass.
ActivityStatus
ExceptionHandler
How to
customize the
activity success
and exception
windows
AutoClose
Confirm
Maximizing
User
Productivity
with
GetNextWork
DisplayInput
business rules
engine
DisplayOutput
business rules
engine
8. H to P
Purpose
Description
More
LockInfo
Understanding
object locking
Work-.New
NewCovered
cover
NewSample
About the
Application
Accelerator
Work-.Perform
perform
Working with
user forms
(V5.X)
Working with
user forms
(V6.2)
Perform_Buttons
Used primarily
in V5
applications.
Perform_Step
Used primarily
in V5
applications.
PerformExternal
directed Web
access
PerformSample
About the
Application
Accelerator
PerformScreenFlo
w
screen flow
PortletHarness
portlet
portlet-compliant HTML.
PrintOptions
PrintView
pyCMConfirm
pyCMPerform
pyCMReview
9. R to Z
Purpose
Description
More
Reopen
reopen
Review
Presents the work item and assignment in readonly mode, not allowing data entry.
ReviewSample
Presents the work item and assignment in readonly mode, not allowing data entry. Copied into
applications created by the basic Application
Accelerator, with the name Review.
RuleForm
SimpleConfirm
About the
Application
Accelerator
portlet
portlet
TabbedScreenFlo
w
screen flow
TreeNavigation
screen flow
Section rules
Purpose
Use section rules in conjunction with harness rules to define the appearance of user forms, rule forms, or composite portals.
A section rule defines the appearance and contents of one horizontal portion of a form. Harness rules define complete forms
that support all user interactions that create, update, and resolve work items.
Process Commander contains dozens of standard harness and section rules. You can copy and tailor these standard forms
to meet your application needs.
Controls
Layout
Column
Repeat
Tabbed
Repeat
Basic
Row
Repeat
Tree
Tree Grid
Grid
Advance
d
Where referenced
Rules of the following types can reference a section rule:
Harness rules
List view and summary view rules, as the contents of a pop-up SmartInfo window.
Access
Use Application Explorer to access section rules that apply to the work types in your application. Use the Rules by Type
Explorer to list all the section rules available to you.
Development
For section rules that use the SmartFrames format, you can maintain the section rule directly from the Harness rule form (as
well as from the Section rule form).
Category
Section rules are instances of the Rule-HTML-Section class. They are part of the User Interface category.
Your system contains hundreds of standard section rules. Most useful in your application are those that apply to
the Work- or Work-Cover- class. Others typically that apply to @baseclass support a composite portals. (Additional
standard sections support developer-oriented flow processing, such as that provided by the Application Accelerator and
Connector wizard.)
To understand the structure of a harness-based form, use the Rules Inspector tool to identify the underlying harness,
section, and property rules.
To see a complete list of the standard and custom section rules available to you (based on your RuleSets and security), use
the Rules by Type Explorer.
Name
Purpose
Work-.Action
Work-.Action_Step
Work-.AllMessages
Work-.AutoClose
Work-.BodySample
Work-.CoreParty
Work-.CoreSummary
Work-.Details
Work-.Flows
Work-.HeaderSample
Name
Purpose
Work-.NewHeaderSample
Work-.Ownership
Work-.PartySimple
Work-.PortletSection
Work-.ProcessSteps
Work-.ProcessStepsVertic
al
Work-.ProcessSteps
_ScreenFlow
Name
Purpose
Work-.Responsiveness
Work-.Resolution
@baseclass.SmartInfoClickabl
e
Work-.WordInclude
Work-.WorkItemSmartInfo
Name
Purpose
@baseclass.Dashboard
@baseclass.FindWork
@baseclass.LogOff
@baseclass.NewWork
@baseclass.Profile
@baseclass.pxCalendar
@baseclass.RecentWor
k
@baseclass.RecentWor
k
Displays a worklist.
Other sections
Name
Purpose
@baseclass.pyGridModalTemplat
e
@baseclass.pyModalTemplate
Suggested Approach
Follow these steps to add a SmartLabel control to a harness, section, or flow action form.
1. Identify or create the section rule. In most cases, set the Applies To key part of the section rule to match the Applies To
key part of the rule that is to contain the SmartLabel.
2. Open the harness, section, or flow action rule. Select SmartLabel from the
Advanced group of controls.
3. Drag the control from the menu and drop the control in a cell. Click the magnifying
glass icon to the right of the cell to open the Cell Properties panel.
4. Complete the Cell Properties panels. On the Field tab, accept the default placeholder property.pyTemplateSmartLabel.
On the Presentation tab, click the magnifying glass icon at the right of the Format field.
5. Complete the pop-up Params window to supply three parameters for the SmartLabel: the text of the label, the second key
part of the section, and header text for the pop-up window.
9. Save the rule form. Test with the Preview toolbar button, the Run toolbar button, or in context of the application.
Because regular expressions can describe a wide variety of text patterns, this approach can provide improved data
validation without requiring your development team to write and test long Java routines.
Suggested Approach
An edit validate rule (Rule-Edit-Validate rule type) checks the format of a text value, such as a value typed into a form by an
application user. The result outcome is either true the value does meet the criteria defined in the rule, or false the input
value is rejected with a message.
In general, Process Commander developers need Java skills to create new edit validate rules. However, Java includes the
well-known pattern matching facility known as regular expressions. This facility, like the UNIX grep command, tests an
input string against a pattern, finding the first match (if any), or all matches. Using a short Java snippet, an edit validate rule
can test an input string against a regular expression.
Many books, Web sites, and software products explain regular expressions, which are not explained here. (For the
complete, official specification see
example below illustrates a Canadian postal code check, but other more complex regular expressions can be tested with
similar code.
Open the built-in regular expression tester activity Code-Pega-Parse.RegExpTester. This supports the same Sun
Microsystems implementation that the edit validate rule executes.
2.
3.
Click
4.
Complete the Regular Expression field. Enter a test string in the Source field.
5.
).
Run Rule and then click Execute. (Leave the parameters blank)
This test case confirms that the source "M5R 2E8" matches the regular expression pattern.
A second test case confirms that D5R 2E8 does not match. D is not one of the allowed first letters.
Note that the tester may find a match as a substring of a longer string:
theValue:
Paste the pattern you tested into the compile( ) method. In this example, the entire Java Source field contains only a few
lines of code:
Enter "Canadian Postal Code" in the Validate field and an error message (or Rule-Message key) in theError Message field.
(For testing purposes, delete the row for the pyStateCode property.)
4. Test
To exercise the validation rule and edit validation rule:
1.
Select the File > Open > Work Pool > Sample Work menu item to access the PegaSample sample application.
2.
Select the Run > Process > General Task menu item to enter a General Task
3.
In the Parties section of the New form, select Add Party... Customer.
4.
Set the Contact Preferences to Work Address. Enter customer details, including an invalid or valid Canadian Postal
Code in the ZIP field.
5.
Click Create.
Edit validate rules provide only format checking. Many values that have the correct format (and so are accepted as
input) do not correspond to real Canadian Postal Codes. However, format checking can detect many input errors, and is
always better than accepting input without any checking.
The Submit operation for HTML forms strips off leading and trailing spaces. There is no need to test for them or to
match them.
Your Rule-Edit-Validate Java code should not accept a substring as a valid match.
WWW and other public sources provide regular expressions for book identifiers (ISBN numbers), telephone
numbers, email addresses, IP addresses, and many other patterns. Of course, you should test any expression you plan to
adopt to confirm that it matches your application requirements.
Consult the Help System topic "About the Regular Expression tool" for more information on the built in testing tool.
Like Java, the JavaScript language also supports regular expressions, so after you have implemented and tested
an edit validate rule, you optionally can extend validation to the workstation using the client-side format validation feature
and the standard ClientValidation HTML Property rule.
Additional controls (unless disabled when the rule is configured) allow the user to sort either list, to remove previous
selections, to copy all or remove all selections. The user can make further changes until the user submits the flow action
form.
The List to List control is supported by two Page
List properties, one providing the list of source values and one
providing the list of destination values. As a result, the output of a List to List operation is not an array of text values (such as
can be stored in a Value
List property), but an array of embedded pages, identified by one visible text property such
as a name.
This article presents a step-by-step procedure for adding a List to List control to a harness, section, or flow action form. For
full details on all options, consult the Help system topic.
Suggested Approach
Preparations
Identify or create these parts of the List-to-List control:
A Single Value property within each embedded page that identifies the page, for display
The target property, also a Page List property, typically part of the work object. (The embedded pages of the
target property are often of the same class as the embedded pages of the source property, but this is not a requirement.)
Properties that are needed in the target embedded pages.
The source property structure matches those produced by the Obj-Browse, Obj-List-View, and RDB-List methods, but your
application can create the source property by any means.
Unlike the Dynamic Select control and AutoComplete control, the List to List control requires the source property to be
populated before the user sees the form containing the control.
1. Open the rule form. Select List to List from the Advanced control group.
2. Drag the List to List icon to a cell on the form, and drop it. The cell may change size
to accommodate the large control; you can adjust the size later.
3. Click the magnifying glass icon at the upper right of the cell to open the Cell Properties panel.
4. No changes are needed on the Field tab of the Cell Properties panel. On the Presentation tab, confirm that
the Format isListToList.
5. Click the magnifying glass to the right of the Format field to open the
Params pop-up window.
6. Complete the Params window. Identify the source property, the target
property, and the text property to appear in the source lists. Include doublequotes around property references if they contain a period character.
Select Copy all properties if, when a user selects an item, the system is to
copy all properties on the embedded source page, creating a page with identical properties on a new embedded page with
the target property. Alternatively, you can define a from-to mapping and control which properties are copied.
By default, the left list displays at most 200 values, even if the source property contains more than 200 embedded pages. By
default, there is no limit on the number of pages that a user can add to the target property. You can change either limit
through parameter settings.
7. Click Save to close the Params window.
8. Optionally, complete other values on the Presentation tab and Conditions tab of the Cell Properties
panel.
9. Click Apply to apply the changes you made to the Cell Properties panel and Parameters window. Click OK to close the
Cell Properties panel.
11. Test. Ensure that your application populates the source property before the work object form (or flow action form)
appears.
A sample activity
This one-step activity creates a page SafetyEquipment of class Code-Pega-List. (Identify this page on the Pages
&
Whe
n executed, the clipboard contains a page for each piece of safety equipment.
Afte
r a user submits the flow action form, Process Commander copies pages from the source property to the target page. Six
selections appear as embedded pages to property pyWorkPage.Entrants.