Complete the New rule dialog to define the key parts of a new
rule.C-244
Show
all
Overview
As you complete the New form, you provide one or more parts that
together determine the external form of a unique rule key. (In some
other object-oriented environments, this is called object
creation, instantiation, or the New() function.)
Use these steps to complete the process:
- Click the New toolbar button () or right-click a class name or category name in the Application Explorer.
- Choose a category, one of the fourteen or more broad
groupings of rule and data classes. C-2442
- Choose a Type — a rule type or data
class common name — within that category.
- Selecting an Applies To class filter.
GRP-441
- Enter one to three parts that together name the new rule. The
key parts together must form a unique visible key (within the
selected RuleSet).
- Complete the RuleSet and
Version resolution fields if they appear.
- Complete the Availability field.
- If the application uses the optional project management
interface, complete the Project field.
5.4
- Click Create.
Step 1: Open the
New dialog
Use any of these methods to access the New dialog
- Enter the
keyboard shortcut
CTRL
+N.
- When the Application Explorer is visible, select a class name, right-click, and select New.
- When the Application Explorer is visible, select a category (within a class), right-click, and select New.
- When the toolbar is visible, click the New toolbar button
()
Chose a category, then a type. The Type determines which rule type or data class
is created. Accept the default type shown as the
Type, or click that type to pick a category and then
a type.
The form changes to identify fields appropriate to that type.
You can't select a data class that does
not belong to a category. For such cases, review help topics for each
data class for instructions.
Step 2: Select
a class filter
Select a filter to restrict the SmartPrompt list of Applies
To classes to a smaller, more relevant subset of classes.
This avoids searching long lists of classes that are not part of your
implementation or framework and eliminates validation errors caused by
creating instances in the wrong RuleSets. GRP-441
The filter appears only when you create a
rule that requires an Applies To class as part of its
key structure, such as a property or activity rule.
- Click the Filter By link to display a pop-up
window and select a filtering option.
Implementation
— Displays classes that belong
to the Application RuleSets list in your Operator
profile
Framework
— Displays classes that belong to
any RuleSet version in the RuleSet list in your
Operator profile and not included in the Application RuleSet list
(omitting the Pega- classes)
All
— Displays classes that belong to both
the Application RuleSet and RuleSets lists in your Operator profile
and Pega- classes
- Select the Include Index/History classes check
box to include internal Index- and
History- classes in the SmartPrompt list.
The distinction between
implementation
classes and
framework classes
becomes more meaningful when your applications are built and extended
using the
Application
Accelerator. For implementation classes, the second segment of the
class name is a division name, for example
MyCo-
Treasury-Payables. For framework classes, the second
segment is the placeholder FW, indicating a framework; for example
MyCo-FW-Payables.
Step 3: Enter or
select each name fields (key parts)
Complete the key fields (often labeled Name). Use
SmartPrompt if it is available. Generally, start each key part with a
letter and use only letters, digits, and the dash character. (Certain
rule types have additional restrictions on names.)
Click the help icon () to learn more
about the key parts for the type.
Many rule types require a class as a key part, often with the label
Applies To. Generally, choose the most specific class
— that is, lowest in the class hierarchy — that
serves the needs of your application. For example, choose
MyCo-LoanDiv-MortgageApplication rather than MyCo-LoanDiv- as the
Applies To class for a new flow or property rule,
unless you are certain that the rule is applicable to all the objects
in every class derived from MyCo-LoanDiv-.
Some classes may not be appropriate as the Applies
To key part, or may not be appropriate for your RuleSet. For
example, you cannot save a rule with Data-North as the Applies
To class into the South RuleSet if the class Data-North class
is restricted to (say) the North RuleSet.
See Choosing good
rule and data instance names for more about names.
Step 4: Select a
template
Optional. When creating a flow rule, harness rule, section rule, or
flow action rule, you can copy a template.
A few standard flow rules, harness rules, flow actions, and section
rules are known as templates. These rules have special
characteristics and settings.
If the Template field appears on the New dialog,
you can select one to use as a base (similar to copying) for this
rule. This can save time and typing.
Step 5: Complete
RuleSet and version fields
Identify the RuleSet and version for the new rule. Process
Commander supplies default values for these if the access group
referenced in your Operator ID data instance contains default values.
The RuleSet Name list and version list include only those that appear
on your RuleSet list and that are not locked. R-10780
You can select any RuleSet and version values from the list, if
your choice meets the prerequisites RuleSets and version requirements
in the RuleSet Version.
Rule resolution applies to all but a few rule types. See rule resolution for a
definition and a list of the exceptions.
Step 6: Set the
rule availability
Choose an initial availability value for the new rule. You can
change this value anytime later using the Availability button
().
Choose Yes
, No/Draft Mode
,
Blocked
, Final
, or
Withdrawn
:
Yes
to make this version of this rule available to
rule resolution and skimming.
No/Draft Mode
to make this version of this rule
unavailable and never found during rule resolution or skimming by
any user regardless of other rule settings, and to allow to rule to
be saved with invalid fields.
Blocked
to make this version and all lower
versions of this rule unavailable to rule resolution or
skimming.
Final
to make this rule available to rule
resolution and skimming, but also to prevent this version of the
rule from being saved in another RuleSet with the same key. You can
save it, however, as a higher version in the same RuleSet.
Withdrawn
to make this rule and other rules that
have in common the visible key, RuleSet, major version, and
circumstance qualifications from being selected by rule resolution.
For details and benefits of this Availability value, see withdrawn rule.
C-2555
Exceptions: The Available field is not present on
a few rule forms. For example, Rule-Obj-Class instances
are always available.
After you save this rule instance, you can change the availability
value during the Availability () or Save As () operations.
Step 7:
Complete the Status field
Leave the Status field blank
except in special situations. Select:
API
— To associate this rule with one of
Process Commander's interfaces. Select an interface.
(Traditionally, this designation indicates an intention to not change
the functionality of the rule in future releases.)
Template
— To mark this rule as a template,
to appear in the Template field. Useful for
harness and flow rules. (See step 4 above)
Extension
— To mark this rule as an extension point of
a framework, to be overridden in each implementation of the
framework. Extensions are specified by framework developers for
rules that are intended to be overwritten or copied down to the
implementation class. (If the current application was
developed using the Enterprise Application Accelerator, select
> Applications > Tools > List Extensions to list rules with this status.)
The value you select for this property
(Rule-.pyMethodStatus) does not affect validation,
execution, rule resolution, or migration of the rule. The value does
not appear on the rule form and cannot be changed later.
Step 8: Complete
the Project Management fieldslaplm update 6.1.2
If the Project Management interface is enabled for this
application, a dialog box displays. For the project ID that defaults in the display:
- Select the Task Group (Scrum story) and the Task (Task or Bug ID) that you want to link to this
rule.
- In the Additional Hours Worked field, record the time you planned to work on this rule.
- Use the Hours Remaining field to adjust the amount of time remaining to complete the entire task or bug fix.
- Add a development note.
When saved, the Project Explorer displays a link to this rule under the Task Group referenced by the task or bug item you select making it easy to find rules worked on as a part of the
task or bug fix. Updates and effort hours are recorded in the corresponding task or bug in the Project Management Framework.
See About the
Project Explorer and the project management interface and the Pega Developer Network article Tracking development activity in a project.
Step 9: Click
Create
Click Create to reserve
the rule key you have entered and to view the rule form. This is an
intermediate step; it does not save a complete, valid rule.
For simple field value
rules, when condition rules and Single Value
property
rules, you can complete the rule creation and bypass the rule form if
you choose the Quick Create button rather
than the Create button. Review the relevant
help topics for details.
Troubleshooting
Several restrictions may prevent the New or Save As operation from
completing. This list explains common situations:
- Applies To class — When creating a rule
that references a class as a first key part, restrictions of that
class may apply. These are recorded on the Restrictions tab of the Class form. For example, if
class Alpha-One- belongs to RuleSet ALPHA, a restriction may
prevent you from creating subclasses of Alpha-One- in RuleSet BETA,
or from creating rules in RuleSet BETA with Alpha-One- as the
Applies To key part.
- Duplicate name — You cannot create a rule instance that
has the same name and the same RuleSet, version, circumstance, and
so on as an existing rule.
- Reserved names — You cannot create properties with a
property name that starts with pz. You cannot create properties
with a property name that starts with px or py, unless overriding a
standard property.
- Final rule or internal rule — You cannot create a rule
that overrides a final rule, including an internal rule (not
visible).
- This toolbar is restricted to users who hold the privilege
@baseclass.ToolbarFull or
@baseclass.ToolbarNew. C-2346
Designer Studio basics