Back Forward Developer portal — Nine ways to find rules

 zzz Show all 

Your success at finding and using or tailoring existing rules can speed your development efforts. Use the tactics described here to find existing rules quickly.

NoteThese searches apply only to rules, not to data objects, work objects or assignments. Some search the entire PegaRULES database; others search only a single RuleSet, or all the RuleSets in your application, or only a single rule type.

zzz Look for an existing rule before creating a new rule.

TipMaximizing reuse of existing rules and minimizing the size of custom RuleSets is an important development goal. Process Commander includes thousands of tested standard rules that can speed development of your application.
Sharing and reuse is a major benefit of object-oriented design.

For the custom rules in your application as well, reuse and sharing are important. The results are:

Even if your research discovers only a "near-miss" rule — not one that perfectly meets your needs — the near-miss rule can be a valuable starting point. Copy it (with Save AsSave As) to create the rule you need.

zzz Keep your RuleSet list in mind while searching.

Some searches are restricted to the rules that you can access and execute, determined by your RuleSet list. Other searches — noted below — are system-wide, covering rules in all the RuleSets and all the versions that exist on your Process Commander system. The latter type of searches may report rules that you cannot use directly, though you can in many cases to copy them (using Save As) and use the copy.

To review your RuleSet list, click your click your name in the navigation panel to access your profile. Locate the RuleSets list on the resulting display.

zzz 1. To find a rule currently checked out by you
or that you updated recently
.

To list every rule checked out by you, click the check icon Checked out in the Find facility. No parameters are needed.

To see rules that you saved recently, choose the My most recent rules My most recent rules icon from the Find facility. To restrict the search to those containing a specific key part or partial key part, enter text before pressing the Enter key or the Go icon Go .

zzz 2. To find a rule that another developer updated recently.

Select View > Rules > Summary of Recently Updated to see rules updated today, summarized by RuleSet Version. Drill down to a Version, RuleSet, and rule.

Select View > Rules > List of Recently Updated to list rules sorted by most recent save date and time.

zzz 3. If you know part of the rule name.

You can search the entire Process Commander system for rules that contain certain text anywhere in the internal key.

  1. Select Edit > Advanced Search to open the Advanced Search tool.
  2. In the left panel, locate the Search for box. Enter letters that form a partial key.
  3. Click  Go  .

For example, if you enter "FORT" the search finds many rules (properties, constraints, Binary file rules, activities, and so on) relating to "effort" and a Rule-Message instance named "InvalidClassForTopLevel."

This search is not case-sensitive. The results may include rules belonging to RuleSets or versions that are not on your RuleSet list, including private RuleSets. You cannot open or execute these rules.

zzz 4. When the rule belongs to your top RuleSet ...

As you develop an application, the application RuleSet version often appears at the top of your RuleSet list. When you know the rule type (such as Rule-Obj-Property) of the rule you seek, use the Rule Reports area:

  1. Return to the Home page. Click the Monitor Activity button (Monitor Activity) to enter the Monitor Activity slice.
  2. Locate the Rule Reports section of the slice.
  3. Click the Rules per Rule Type, RuleSet, Version link. The initial display includes only rules in the top RuleSet.
  4. Click a plus sign for the class corresponding to the rule type (for example, Rule-Obj-Property).
  5. Review the resulting display to locate the desired rule.

When the RuleSet is known, but is not your top RuleSet:

  1. Follow steps 1 to 3 above. The display includes only rules in the top RuleSet.
  2. Then, click the Customize Criteria link.
  3. Type the name of the RuleSet that contains the desired rule.
  4. Click  Submit  .
  5. Click a plus sign for the class corresponding to the rule type (for example, Rule-Obj-Property)
  6. Review the resulting display to locate the desired rule.

zzz 5. When you know the rule type and Applies To key part.

Many rule types have a class name as the Applies To key part. For example, the key to a flow rule (Rule-Obj-Flow rule type) consists of an Applies To class name and a Flow Type name.

Use the Application Explorer when you know the Applies To key part of a rule is one of the work types in your application. Use the Class Explorer when the Applies To key part is derived from the Data- base class, Embed- base class, or another base class other than Work-.

  1. Click theC tab to present the Class Explorer tree in the navigation panel.
  2. Select the Applies To class if that class appears, or select a base class that is an ancestor of the Applies To class name. For example, if the Applies To class name is Work-Cover-ACME-Mortgage-Application, select Work-. (The ancestor class may be defined by pattern inheritance or directed inheritance, depending on your Explorer preference settings.)
  3. Expand the Class Explorer class tree as necessary by clicking the plus signs until the Applies To class is visible. (The label and the structure depend on your Class Explorer settings.)
  4. Click the Applies To class text on the tree display.
  5. Click the Type Picker in the upper left of the toolbar to select a category (such as Process) then select a common name of the rule type, such as Property, Flow, or Model.
  6. Review the resulting display to locate the desired rule.

See Using the Class Explorer.

zzz 6. If the property, harness, or section rule appears on a work object form.

Use the Rules Inspector to locate a rule that defines part of a work object form.

  1. Select File > Open > Work Pool > name to select the work pool that contains the work object form as your current application name.
  2. Select all four Run > Rules Inspector > option items to enable all Rules Inspector options.
  3. Click the Refresh toolbar button (Refresh) to refresh the work object form. The letter P marks properties. An H icon appears above portions of the form presented by harness, section, and flow action rules. A small H identifies the visible presentation of an HTML rule.

  4. Place and hold the mouse pointer over an H, H, or P link to see the rule name. Click the link to open the corresponding rule. Form elements marked with H and H may be deeply nested; it may take a few tries to locate the one of interest.
  5. When done, access the Rules Inspector menu items again and clear the settings.

zzz 7. For a property that appears on a rule or data form.

You can review the XML representation of a rule or data object to discover the properties in the rule.

  1. Use the Class Explorer or other means to open the rule or data form.
  2. Note the value of the property of interest.
  3. Click the RuleData button (zzz) on the toolbar to display the XML representation of this form in a new Internet Explorer window.
  4. Locate the property value by reading through the XML display, or press the CTRL+F keys and type a portion of the value to search the XML display. Click the  Find Next  button.
  5. zzzThe XML element surrounding the value is the property name. In the example at the right, the property with value NewWork is pyFlowType.

zzz 8. To find rules containing a word in the Short Description, Description, or other properties

You can search through all the rules in any RuleSet on your RuleSet list to find those that contain a word as the value of any property, including properties not visible on the rule form.

zzz This text search can be lengthy and may place substantial demand on the server and database. Use this string-search capability in conjunction with other criteria that can narrow the search.

  1. Select Edit > Advanced Search to start the Advanced Search tool.
  2. Complete the Find Content panel at the right. Select Rules as the Find value. Select the rule type from the link.
  3. Enter the text to match in the Search For field.
  4. Select a single RuleSet from the drop-down list in the Scope field.
  5. Click  Search .

zzz 9. To find a property name when you can access an object

If you seek a property name and know the class or object that contains the property:

  1. Use the Class Explorer to list instances — not properties — of the class.
  2. Select any instance and open it. When no form is defined, the workspace contains the XML form of the object.

  3. You can read through the XML presentation to look for the property, but the XML presentation may be lengthy. Press the CTRL + F keys to start a text search in Internet Explorer.
  4. Type a portion of the property name or value to search. Click the Find Next  button.
Definitions RuleSet list
Related topics Choosing rule and data instance names
Choosing good Short Descriptions 
Using the Application Explorer

Using the Class Explorer
Using the Advanced Search tool
Using the Rules Inspector

zzz Developer portal basics