Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Copying a rule or data instance

Updated on November 18, 2021

Save time and speed up the development process of your application by promoting reuse of resources. Instead of creating a new record that might be similar to a rule that already exists, copy an existing rule and then make the necessary changes.

Consider a scenario in which you copy a service-level agreement rule that defines goals and deadlines for customer service representatives (CSRs) to follow when CSRs review loan requests, and then change some elements of the rule to adjust it to reviewing mortgage requests. For example, you can make the goal longer.
Before you begin: You must have the @baseclass.ToolbarFull or @baseclass.ToolbarSaveAs privilege to copy rules.
The result of copying an existing rule is a new record with key parts that the system prepopulates with the values of the original rule. To save the new record, you need to change at least one key part. The key parts are an identifier, a branch that stores the record, a class that applies to the record, a ruleset, and a ruleset version.
Note: Because the Save As form displays a subset of the fields and functionality that are specific to each data instance, some fields might vary between different rule types.
  1. In the navigation pane of Dev Studio, navigate to the record that you want to copy.
    For example: To copy a service-level agreement rule, click RecordsProcessService Level Agreement, as in the following example:
    Navigating to a record
    Navigation to a service-level agreement record in Dev Studio.
  2. In the list of instances, open the instance that you want to copy.
  3. In the rule form header, select an action to copy the rule:
    • If the record is in a locked ruleset, click Save as, as in the following example:
      Copying a rule in a locked ruleset
      A rule form header of a rule from a locked ruleset.
    • If the record is in an unlocked ruleset, click SaveSave as, as in the following example:
      Copying a rule in an unlocked ruleset
      A rule form header of a rule from an unlocked ruleset.
  4. Review the record label and identifier to determine which key parts you can change.
    Consider the following factors:
    • If you plan to leave the context for this record unchanged, change the identifier.
    • If the record type that you want to copy has name restrictions, the Identifier field appears as not editable.
  5. In the Context section, review the record context to determine what information about the storage of the record in your application you can change.
    Consider the following factors:
    • If you plan to leave the label and identifier unchanged, change at least one element of the context of the record. You can change a branch that stores the record, a class that applies to the record, a ruleset, and a ruleset version.
    • If you copy a rule with Final availability and leave the key parts unchanged, select the same ruleset name and a higher version number. By default, you cannot override a Final rule with another rule in a different ruleset.
    • When you copy a rule, you cannot define the rule availability. The system clears the rule availability when the record identifier is unchanged, and the rule meets any of following conditions:
      • the ruleset is unchanged
      • the class that applies to the record is unchanged
      • the original record is specialized by circumstance
      For more information about rule availability, see Setting rule status and availability.
  6. Optional: 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.
  7. Click Create and open.
    Result: The rule form opens.
What to do next: Make the necessary changes and then save the rule form.

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us