Declarative Expression rules - Example
This presentation is part of the Declarative Expressions Self-Study Course.
Transcript
Let’s say a company regularly creates invoices, which consist of one or more orders each with one or more items. For each invoice, the company may wish to display totals for the number of items included and the total price of the items on the invoice.
The company wants these totals to be calculated automatically in case of change, without having to run specific “Total Items" and "Total Price" activities. Likewise, if the invoice is changed (items added or removed), these totals should be calculated automatically.
Declarative rules allow this automatic processing to occur as and when required.
The first step in implementing declarative processing involves the company deciding what business statements it would like to automate as declarative rules. Once defined, they are entered into PRPC as expression rules.
Developers can see and test these rules as a dependency network that describes the relationships between the properties. As this application is used, PRPC notes when the properties are changed and based on the dependency network, automatically performs the appropriate computations that the expressions dictate.