You can create a custom rule type (a class derived from the Rule- base class) and cause Process Commander to execute a custom activity that implements instances of the rule. Custom rule types are helpful when you use Process Commander to build a software product for redistribution, rather than an application used only in one organization.
For details of this procedure, consult the Technical Resources publication. This topic outlines the steps of the process.
Determine and document the capabilities of the new rule. Identify the fields to appear on the form, and the algorithms and logic that implements the new rule as it runs.
Determine where to place the new Class object within the Rule- class hierarchy, to maximize reuse of existing standard properties, activities and so on. Create the class and any needed custom properties.
Using the Save As function, copy an existing Form File rule of a similar Rule- class to create a starting form. Use the Form Builder to modify the form to reference the correct class and properties, with labels and layout that matches your design.
Create an activity of type Validate
to validate
values for the rule.
Create activities to open, save, and validate a rule instance, and to implement the rule.
Use the Rule instruction (or equivalently the PublicAPI Java method doActivity()) to execute the implementation activity.
tools.doActivity(StringMap
ruleKeys,
ClipboardPage newParameterPage,
ClipboardPage newPrimaryPage )
As a best practice, store all instances of a custom rule type in a dedicated table in the PegaRULES database. This allows control over exposed columns without affecting exposed columns in standard tables.
pr_rule
table.pr_rule
, to support rule resolution.
See Pega Developer Network article PRKB-17585 Save custom rule types in a dedicated table in the PegaRULES database. For general information on standard tables for rules, see Working with the PegaRULES database — Tables for rules.
Rule- base class | |
End-Validate
method
Form Builder basics Start-Validate method Using the Rule instruction to implement a custom rule type |