Creating a rule
Use the Create form to define one or more parts that together determine a unique record key. This form also defines the context in which a record is added to your application; the position in the ruleset stack and how it can be reused or accessed in the class hierarchy.
- In any Explorer menu, in the header, select +Create > record category > record type .
- In the record configuration area of the
Create
form, provide a name for your record and define its key parts.
Complete the following steps.
- In the Label field, enter a short description in the form of a sentence (with spaces) that describes the purpose of the record. As a best practice, specify no more than 30 characters, because the Pega Platform appends rule information to the rule name you entered to create the fully-qualified name.
-
In the
Identifier
field, click
Edit
to manually set the Identifier(the field that represents the name key part of your record) to a value different from.
By default, this field is set to To be determined. It then is automatically populated by a read-only value based on the sentence entered in the Identifier field; spaces and special characters are removed.
After you have explicitly set the Identifier in this manner it will no longer auto populate if a new Identifier is provided.
- In the remaining fields, specify additional key parts for your record. The number of key parts, types, and restrictions vary by record type. Generally, start each key part with a letter and use only letters, numbers, and hyphens.
- Click View additional configuration options to include all other configuration options supported by this record type on the form. These options vary by record type and appear for only records that support Quick Create options.
-
In the
Context
area, specify where the record will reside in your application ruleset stack and how it may be reused in the class hierarchy.
Complete the following steps.
-
If the
Development branch
list appears, which is displayed when there are branches defined in the current application or one of the built-on application layers, do one of the following.
- Select a branch name to create the record in a branched of version of the ruleset. The branched ruleset is automatically created and added to your development when you submit the Create form if it does not yet exit.
- Select [No branch] to create the record in an unlocked ruleset version.
-
Select the appropriate radio button to choose your application layer, which defines how your record will be reused. You can select only application layers with access to the selected development branch. To select an application layer that is disabled, first set the development branch to [No branch].
Note: The Production Rulesets option appears as the first option in the stack if your current access group has production rulesets defined. Choosing this option restricts the Add to ruleset field only.
-
From the
Apply to
field, select a class to which this record applies. By default, this list is populated by the cases and data types accessible by your chosen application layer. To select a class name that is not a case or data type, click the
View all
link.
Generally, choose an Apply to class that is the most specific — that is, the lowest in the class hierarchy — that serves the needs of your application. For example, choose MyCo-LoanDiv-MortgageApplication rather than MyCo-LoanDiv- as the Apply to class for a new flow or property, unless you are certain that the record is applicable to all the objects in every class derived from MyCo-LoanDiv-.
- From the Add to ruleset field, select the name of a ruleset to contain the record. If the development branch is set to [No Branch] or there are no available branches to choose from, you must also specify a version for the specified ruleset name.
-
If the
Development branch
list appears, which is displayed when there are branches defined in the current application or one of the built-on application layers, do one of the following.
-
To override the default work item that your application associates with this development change, press the Down Arrow key in the Work item to associate field, and then select a work item.
For more information about your default work item, see Setting your current work item.
-
Do one of the following.
- Click Create and open to reserve the record key you have entered and view the record form. This is an intermediate step; it does not save a complete, valid record until you click Save on the record form.
- Click Create and close to create the record, close the Create form and focus the work area on the most recently opened item. This button is only available when additional configuration options were provided for the record.