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.
These 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.
Look for
an existing rule before creating a new rule.
Maximizing
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:
- Fewer rules to test
- Fewer rules to document
- Fewer rules to export to other systems
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 As) to create the rule you
need.
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.
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 in the
Find facility. No parameters are needed.
To see rules that you saved recently, choose the 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 .
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.
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.
- Select Edit > Advanced Search to open the
Advanced Search tool.
- In the left panel, locate the Search
for box. Enter letters that form a partial
key.
- 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.
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:
- Return to the Home page. Click the Monitor Activity
button () to enter the Monitor Activity slice.
- Locate the Rule Reports section of the
slice.
- Click the Rules per Rule Type, RuleSet,
Version link. The initial display includes only
rules in the top RuleSet.
- Click a plus sign for the class corresponding to the
rule type (for example, Rule-Obj-Property).
- Review the resulting display to locate the desired
rule.
When the RuleSet is known, but is not your top
RuleSet:
- Follow steps 1 to 3 above. The display includes only
rules in the top RuleSet.
- Then, click the Customize Criteria
link.
- Type the name of the RuleSet that contains the desired
rule.
- Click Submit .
- Click a plus sign for the class corresponding to the
rule type (for example, Rule-Obj-Property)
- Review the resulting display to locate the desired
rule.
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-.
- Click theC tab to present
the Class Explorer tree in the navigation panel.
- 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.)
- 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.)
- Click the Applies To class text on the
tree display.
- 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.
- Review the resulting display to locate the desired
rule.
See Using
the Class Explorer.
6. If
the property, harness, or section rule appears on a work object
form.
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.
- Use the Class Explorer or other means to open the rule
or data form.
- Note the value of the property of interest.
- Click the RuleData button () on the
toolbar to display the XML representation of this form in a
new Internet Explorer window.
- 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.
-
The XML element surrounding the value is the
property name. In the example at the right, the property
with value NewWork is pyFlowType.
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.
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.
- Select Edit > Advanced Search to start
the Advanced Search tool.
- Complete the Find Content panel at the
right. Select
Rules
as the Find value. Select
the rule type from the link.
- Enter the text to match in the Search
For field.
- Select a single RuleSet from the drop-down list in the
Scope field.
- Click Search .
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:
- Use the Class Explorer to list instances — not
properties — of the class.
-
Select any instance and open it. When no form is
defined, the workspace contains the XML form of the
object.
- 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.
- Type a portion of the property name or value to search.
Click the Find Next button.
Developer portal basics