Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1 of 29
Contents
Declarative Rules
Forward Chaining
Backward Chaining
Declarative Rules Type
Validation
Rules Inspector
3 of 29
Declarative Rules
Allow for dynamic processing of property values
Do not need to be explicitly called
Are not run in a sequential fashion
System manages re-evaluation when it detects change
4 of 29
Forward Chaining
Forward Chaining
Forward chaining is an internal mechanism that provides the automatic
propagation of changes in one property value to changes in other
property values or to indexes.
For E.g.:
When an activity step changes the value or a property that is defined in
Backward Chaining
Backward Chaining
Process Commander allows a computation to advance even when the
For E.g.:
A load calculation requires the current prime rate to complete the
calculation. If the value is not available on the clipboard, the system
looks for the value using a web service connector. If that fails the
system is directed to an external database where the rate can be
retrieved. If that fails, the user is prompted to enter the current
value.
6 of 29
7 of 29
Rule Type
Constraints
Rule-Declare-Constraints
Declarative Expressions
Rule-Declare-Expressions
Rule-Declare-Index
Rule-Declare-OnChange
Declare Triggers
Rule-Declare-Trigger
8 of 29
validation
validation
Constraints
Constraints
Use the forward chaining. For example we can create a constraint for
9 of 29
10 of 29
11 of 29
12 of 29
13 of 29
14 of 29
Declarative Rules.
Target property and Page Context
A target property is the address of a property name-value pair on
the clipboard, in the context of a change to the value.
If the name-value pair does not already exist at that address, the
system creates it, using the name of the property (part of the
address) and the class of the page to locate the Rule-Obj-Property
rule defining the property.
Page Context :
The default page context for declarative rule is the current work
object page(pyWorkpage)
To access a property in an embedd page (Page list) you must
change the page context of the declarative rule.
15 of 29
Declarative Rules.
Pages and classes tab of declarative expressions
Used to list the pages referenced in the expression tab
Is populated automatically when creating a declare expression based
Top Page is used to reference the top page within a set of embedd
pages
16 of 29
Declarative Rules.
Dynamic Calculation
Allows automatic re-computation and redisplay of all declare
expressions target properties appearing on the form. This is done
using AJAX Technology.
It need to enabled on Harness by checking the Enable Expression
Calculation checkbox.
17 of 29
Rules Inspector
18 of 29
Rules Inspector
Rules Inspector
Is a tool that provides an easy way to locate rules present in User
Interface.
Can be used to display the Harness being used, section being used,
19 of 29
Validation
20 of 29
Validation
Ensures that data inserted into the application satisfies
predetermined formats and other defined input criteria
Client-Side Validation
The format of many user inputs on a flow action form or work
object form can be tested on the user's workstation, before the
form is submitted to the application server that hosts Process
Commander. This feature is known as client-side format
validation
Server-Side Validation
Processing takes place on the server.
User enters data into a field
User makes a request to move to next step
Request is sent to server
Data is then validated on the server, if valid data then user
proceeds to next step else user is not allowed to proceed.
21 of 29
Validation.
Standard Validate Rules
Two standard validation rules called by default
OnAdd
Is called when a new work object is created
Validate
Is called whenever there is a transition from one step to
22 of 29
Validation.
Server-Side Validation: Constraints Rule
Allows a comparative relationship to be defined between property
marked as invalid
Multiple Constraints:
Each row defines a separate constraint
Order is not significant as each constraint processed independently
Use expressions in the When and Require that conditions to perform
23 of 29
Validation.
Server-Side Validation : Edit Validate Rules
Use the Edit Validate form to define a Java routine that tests the
Typically, the input value arrives from a user who completes an HTML
rejected and a red X mark appears next to the input field in error.
Messages may convey more about the error and the suggested
remedy. The user can change the input and resubmit the form.
24 of 29
Validation.
Immediate Validation Processing
Allows server side validation rules to be processed without
refreshing the screen
Uses AJAX
25 of 29
Added Information
For more information you can refer the below links.
Declarative processing
http://pdn.pega.com/DevNet/eLearning/DE1/50226.asp
Declarative Expression Example
http://pdn.pega.com/DevNet/eLearning/DE1/50227.asp
Declarative Expressions and Forward Chaining (01:30)
http://pdn.pega.com/DevNet/eLearning/DE1/50228.asp
Declarative Expressions and Backward Chaining (01:55)
http://pdn.pega.com/DevNet/eLearning/DE1/50229.asp
26 of 29
Added Information
27 of 29
Summary
This topic familiarized us with :
What are Declarative Rules.
Forward Chaining and Backward Chaining.
Different types of declarative rules.
Rules Inspector.
Types of Validation.
28 of 29
Thank You
29 of 29