Skip to main content
LinkedIn
Copied!

Table of Contents

Harness form - Completing the Scripts and Styles tab

Version:

Only available versions of this content are shown in the dropdown

Complete these two optional arrays to supplement or override the standard client JavaScript scripts that support the harness form, and to supplement or override the standard Cascading Style Sheet style definitions that support the harness form.

As a best practice, apply styles through a harnesses instead. Using a Skin rule ensures that the styles apply uniformly to all work item harnesses throughout your application. You can add styles to the Skin rule, which auto-generates the CSS, and makes it easier to maintain and upgrade.

If you choose to apply styles on this tab, rather than in the skin, reference the second and third key parts of a text file rule in each array. Order is significant; the scripts and styles in files you reference on this tab have precedence over those inserted automatically.

When you save the harness form, Pega Platform generates HTML that contains <pega:include > JSP tags, to cause stream processing to reference the text file rules. In the sections referenced by this harness, you can create HTML text that references the custom styles or scripts.

For harnesses, unlike sections or flow actions, HTML code is always automatically generated; you cannot edit it.

> Scripts

Field Description
Type Optional. Select one of the following to indicate the type of script reference you want to use:
  • js — text file rule for JavaScript references
  • bundle — static content bundle rule references
Name If you selected a js script type:

Press the down arrow to select a text file rule that contains source text for JavaScript scripts referenced in the HTML of this harness. The system assumes webwb is the first key part. A script file can use any scripting language supported by the users browser, such as VBScript (for Internet Explorer) or JavaScript.

You can select more than one script file reference. Order is significant.

To reorder the rows of this array, hold the mouse pointer over a number. Click and drag to another row. To duplicate or move a row, hold the mouse pointer over a number. Or, right-click to access a context menu with Cut, Copy, and Insert options.

If you selected a script bundle:

Press the down arrow to select bundle name of a static content bundle rule. See Keystores

You can enter more than one static content bundle reference. Order is significant. Reorder the rows in this array using the mouse pointer or right-click menu.

Click the Add a row icon to add additional scripts.

> Style Sheets

File Name Press the down arrow to select a text file rule that contains source text for cascading style sheets (CSS) referenced in the HTML code of this harness. Order is significant; the bottom style sheet is applied last.
As a best practice, leave this blank and apply styles through a Skin rules. Using a Skin rule ensures that the styles apply uniformly to all work item harnesses throughout your application. You can add styles to the Skin rule, which auto-generates the CSS, and makes it easier to maintain and upgrade.

By default, many styles referenced in harness forms are defined in a standard text file rule named webwb.workform.css. An empty style sheet (containing many style definitions as comments) is named webwb.user_work_form.css. You can override the webwb.user_work_form.css text file rule with another containing style definitions of your own design, being careful to retain the same style names as the standard. Values you enter in this field affect the appearance of only this harness.

To apply a set of custom styles to all harnesses associated with an application, use a skin rule, associated with an application and portal. See Skin rules and Keystores.

> Applying PRPC Version 6.2 styles to screen flow harnesses

The PRPC Version 6.2 case manager and case worker portals ( pyCaseManager and pyCaseWorker ), and standard user form harnesses use the EndUser62 skin and styles. However, the standard Version 6.2 screen flow harnesses, including Work-.PerformScreenFlow, Work-.TabbedScreenFlow, and Work-.TreeNavigation do not use these styles by default.

To keep the user interface styles consistent, copy the screen flow harnesses to your application ruleset and select the standard CSS text file pyScreenFlow_EndUser62 in this Style field. In the Start shape properties panel for each screen flow used by your process, specify your harness in the Harness field.

If you modify the EndUser62 Skin rule, you can reflect those changes in your screen flows by copying the CSS file pyScreenFlow_EndUser62 to your application ruleset and manually modifying the file's contents. If you change the application skin from EndUser62, remove pyScreenFlow_EndUser62 from this field.

Generate harness specific CSS Displays when a style sheet is selected in the Style Sheets File Name field. This option is intended to enhance performance when using custom styles. When selected, the system generates the style sheet based on the CSS selectors used by this harness; all the unused selectors are filtered out to reduce the file size. The generated CSS is not shared with other harnesses.
Verify the results, as some styles may have been removed unintentionally. Also, if you intend to enable this harness throughout the application, note that the system produces, for every harness, a unique style sheet that is generated and downloaded individually. In this case, it is preferable to download all of the styles once, even if they are not all used.

Click the Add a row icon to add additional style sheets.

> Defaults

If you leave the Scripts and Style Sheets area blank, the resulting HTML code references the JavaScript functions and CSS styles produced by the standard HTML Fragment named WorkFormStandard, which includes other HTML Fragments that include standard text file rules:

  • DesktopWrapperInclude — scripts controlling interaction of user forms in the Case Manager portal
  • SmartPrompt — scripts supporting SmartPrompt selection of values
  • DynamicSelect_Script — scripts supporting dynamic lists of selection text values not supported by SmartPrompt
  • DesktopStyles — portal styles
  • WorkFormStyles — user form styles

harnesses

Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us