<<Back
·
Declarative = Automatic
·
Declarative
rules can be created under decision category.
·
These
are created and applied on properties.
·
Where
ever we use the properties (which involves in the declarative rule) throughout
our application, declarative rules will be automatically called and executed.
·
There
are different types of declarative rules available.
1) Declare Expression
2) Declare Constraint
3) Declare On change
4) Declare Trigger
5) Declare Index
·
Declare Expression: - Declare Expression rule is used to perform automatic calculations.
·
Whenever
input properties are changing the target property value gets automatically
updated. This is called “Forward Chaining”.
·
@DateTime.addToDate(.TransactionDetails.TransactionEffData,364,0,0,0)
·
Example:
Product Unit Price Quantity Price
Pro1 5 5 25
Declare Constraint
·
A
constraint validates one property value against another property
·
Every
time we use the property, it automatically calls the constraint and validates.
This happens throughout the application
Declare On Change
·
Declare
on change rule gets automatically executed whenever there is a change in the
property value
·
It
looks for the property changes, which we have used in the on change rule
·
When
this rule gets executed, it executes an activity based on the condition
satisfied
·
The
activity which we are going to call from Declare on change rule must be of type
‘On Change’
Declare Trigger
·
A
declare trigger rule is an instance of class Rule-Declare-Trigger
·
A
trigger rule gets fired when an instance of trigger class is saved, updated,
deleted
·
Trigger
rule will be associated with
o
A
when condition
o
An
activity
·
Whenever
an instance is saved, updated or deleted, declare trigger gets fired
automatically and which executes the associated activity based on the condition
satisfied.
·
The
activity should be of type ‘Trigger’
·
Declare
trigger should be created under table class which we want to monitor for its
changes.
No comments:
Post a Comment