Harness, Section, and Flow Action
forms
|
A cell on the layout can contain a button with a text label. On the Harness rule form, buttons can also be placed at the bottom and appear at the bottom of the resulting work object form. When clicked, a button executes an activity.
Follow these instructions to add a button to a harness, section, or flow action rule.
Click the down arrow () in the Basic control group () and select the Button control (). Drag the Button control to the cell that is
to contain it. When developing a harness rule, you can also drag the
Button control to the bottom area marked <drag buttons
here>
.
When the pointer changes shape to indicate that a single cell is selected, release the mouse button to drop the control.
If the cell is not empty, the dropped button replaces the current contents of the cell.
2. Complete the Cell Properties panel — Top fields
Click the magnifying glass () icon to display the Cell Properties panel.
Your updates to this panel can update the rule form immediately or upon clicking Apply, depending on the Property Panel settings in your Edit preferences. See Setting preferences. If the panel is pinned(), the wireframe on the rule form changes immediately to reflect your inputs. If the panel is not pinned(), click Apply to apply your inputs.
Complete the top fields of the Cell Properties panel.
Field |
Description |
Type |
Select a function for this button, from the predefined values on this list. Select |
Caption |
Enter brief text that is to appear on the button. As a best practice, start the text with a verb. Consider the collection of buttons that appear at runtime collectively; provide button each with a clear and distinctive label. For example, Cancel order. To allow users to execute the button activity using an Internet Explorer shortcut key combination, include an ampersand character (&) immediately before a letter in the caption text. At runtime, users can press the
If you use shortcut keys in your application, be careful to choose distinct letters for each button; you can't have (If this text is to be localized, click the pencil icon () to review or create the field value rule supporting localization.) Optionally, if this button is within a cell of a section that includes parameter declarations on the Parameters tab, you can enter the notation param.NAME here, to use a parameter value for the button caption, where NAME identifies a string parameter. Make sure that the NAME parameter is declared on the Parameters tab, and that your application provides a non-blank value for the parameter value in all possible situations where the section appears. See Section rules — Completing the Parameter tab. When you plan to localize the application that includes this rule, so the application can support users in various languages or locales, choose the text carefully and limit text length to 64 characters. A field value rule with pyButtonLabel as the second key part and this text as the final key part is needed for each locale. You can define a shortcut key in each language by including an ampersand character before a letter in the Localized Label field. When practical, choose a caption already included in a language pack, to simplify later localization. See About the Localization wizard. |
Tooltip |
Optional. Enter a sentence or phrase identifying to users the purpose and function of the button. As a best practice, start the ToolTip text for an input field with a verb; for example, Cancel the order. If this text is to be localized. enter no more than 64 characters. Click the pencil icon to review or create the field value rule supporting localization. |
Local Actions |
This field appears only when the Type is |
Load in Modal Window |
This field appears only when the Type is Select this when the local action accepts one or more input fields. |
3. Complete the Cell Properties panel — General tab
Complete the General tab.
Field |
Description |
Width |
As a best practice, use Smart Layouts to achieve uniform width of cells throughout your application's forms. You can set the width of Smart Layout templates using the Application Skin wizard. Optional. Enter a positive number for the width in pixels of the cell containing this button. (At runtime, normal browser processing for rendering tables determines the actual displayed width.) This field appears only when the Width field in the Layout panel or
Repeat panel (for the layout containing this cell) is
set to
|
Height |
As a best practice, use Smart Layouts to achieve uniform height of cells throughout your application's forms. You can set the height of Smart Layout templates using the Application Skin wizard. Optional. Enter a positive number for the height in pixels of this cell. (At runtime, normal browser processing for rendering tables determines the actual displayed height.) This field appears only when all columns in the Layout are not controlled by Smart Layout column restrictions (that is, all columns have the
|
Do Action |
These fields appear only when the type is See Complete additional information for custom buttons below. |
Visible |
Select to determine when the button appears.
Other Condition , complete the Visible When field. |
Visible When |
Optional. Enter an expression involving another property, or identify the When Name key part of a when condition rule. Specify one of four outcomes, where true or blank means the button is disabled.
This field appears only when you select |
Run on Client? |
This check box appears only if the Visible field contains a simple Java expression that can be evaluated by JavaScript code.
|
Disable |
Select to cause the button to be disabled or enabled based on a test, even when the form is in read-write mode. Complete the next field to modify the effect of this check box. |
Disabled Condition |
If you selected the Disable check box, identify here a when condition rule (evaluated once) that determines whether the button is enabled. |
3. Complete the Cell Properties panel — Advanced tab
Complete the Advanced tab.
Field |
Description |
Privilege |
Optional. Select the Privilege Name key part of a privilege rule that controls the availability of this button at runtime. During rule resolution at runtime, the system uses the Applies To key part of the current rule as the first key part. At runtime, the button disabled for users who do not hold this privilege. Click the pencil icon () to review (or create) the privilege rule. |
ReadWriteStyle |
Optional. By
default, when the work object form or flow action form appears in read-write mode, the CSS style named Click the pencil icon () to review the text file rule that defines the style sheet. |
ReadOnlyStyle |
Optional. By
default, when the work object form or flow action form appears in read-only mode, the CSS style named Click the pencil icon () to review the text file rule that defines the style sheet. |
Inline Style |
To apply inline styling to this cell only, type a CSS style definition in this field, or click the magnifying glass to access a Style Editor window. Styles you enter in this field supplement and override style elements defined in style sheets, according to normal CSS rules. Inline styles are recorded in the generated HTML for the form; they do not alter the CSS definitions. Using the Style EditorYou can select the font, color, font size, borders, margins, and other attributes of this cell using selection lists. The Style Editor maintains a preview of the resulting presentation. If you alter the style definition directly, click Apply to update the preview. Click OK to record the style defined with the Style Editor in the panel. |
Use Heading Styles |
Select to change the cell HTML element from <TD> to <TH>, with a resulting style change. (This is not typically useful for buttons.) |
If you choose a built-in Type value, the system provides default values for the ToolTip text.
Enter a caption; by convention, the Caption text is often the same text as the Type. Choose ToolTip and Caption text that conveys the outcome of the button press in language familiar to application users.
Standard field value rules named @baseclass.pyButtonLabel.Name determine the label text of these button types, such as "Submit". Your application can override these standard field value rules.
Type |
Description |
Local Action
|
For harness rules only. Allows the user to complete a local action by clicking the button that presents a pop-up form.
When the user submits the pop-up form, the activity in the After this Action area (on the Action tab) runs. For an example, see Pega Developer Network article PRKB-25290 How to configure a local action in a button. This technique may not work with all local actions; some are implemented in a way that depends on characteristics of the Action section. |
Get Next Work
|
Cancels any unsubmitted changes and finds the most important assignment to work on next. |
Finish Assignment
|
Submits changes and marks this assignment as complete. |
Expand/Collapse
|
Redraws the form with all areas fully expanded or collapsed. |
Contents
|
For a cover work object, changes the form to allow users to view and navigate among the member work objects. You can override a standard list view rule to control details of this display. See Understanding covers. |
Explore
|
For a folder work object, changes the form to allow users to view and navigate among the associated work objects. |
History
|
Displays the work object history, for users who hold the Work-.AccessAuditTrail privilege. |
Attachments
|
Presents a list of work object attachments, so users can view or add attachments. The button is visible only for users who hold the Work-.AccessAuditTrail privilege. |
Cancel
|
Closes the current form without applying any changes. |
Save
|
Saves the work object with Submit. |
Update
|
Redraws the form in update mode, for users who hold the Work-.Update privilege. This allows changes to previously input values that appear in sections other than the TAKE ACTION section presented by the flow action rule. This capability is not desirable in all applications, as it allows users to overwrite values entered previously, perhaps by other users. The Apply button on the update form sends changed user inputs to the server, but does not commit these changes. Users must select and complete a flow action to cause these changes to save. See Understanding transactions in flow executions. |
Review
|
Presents the work object form or flow action form in review-only mode; no updates are allowed. |
Show Reopen Screen
|
Shows the form in review mode but allows users to reopen a resolved work object, if they hold the Work-.Reopen privilege. Runs the standard activity Work-.Reopen or an activity of that name in your application. |
Reopen Work Item
|
Reopens a resolved work object, for users who hold the Work-.Reopen privilege. Runs the standard activity Work-.Reopen or an activity of that name in your application. |
Show Flow Location
|
Known as the Where-Am-I? icon, presents the current flow rule as Visio diagram, and marks the location of the current assignment with an arrow. Requires the Work-.Perform privilege. |
Enable Action Section
|
Presents the work object form in review-only mode; inputs area allowed in the action section only. |
5. Complete additional information for custom buttons
The General tab changes when you choose CUSTOM
as the Type value. Access and complete additional fields.
When clicked, the custom button executes an activity, using parameter values determined in this panel or parameter values determined by a user input at runtime.
Field |
Description |
Do Action |
Select an activity to execute when users click the button. To find the activity at runtime, the system uses the Applies To key part of this rule as the initial Applies To key part of the activity. |
Parameters |
If the activity selected accepts input parameters, sources of parameter values can be set up on this form or entered by a user at runtime. To define parameter values on this form, enter a constant value or property reference for each parameter. |
Pass Current Parameters |
Select if the parameter page of a calling activity is to be shared with this activity. |
params |
If the activity accepts input parameters, enter constant values for each required parameter. |
Target |
Select one:
|
No Data Submission |
If you select |
Target Name |
If you selected |
Window Width |
If you selected |
Window Height |
If you selected |