◷ Reading Time: 3 minutes
A contact in an address book contains name (first and last), address (address line, postcode, state) and address type. There are mandatory fields that should be validated. This example will show error messages accordingly.
We have used Natural Language to write the rules and these are easy to read and understand.
Open sample project
The project can be found on the FlexRule Welcome screen once you open FlexRule Designer. If not, all the sample projects can be found at the default sample project location:
C:\Users\<user name>\Documents\Pliant Framework\FlexRule Designer\<designer version>\Samples\Writing-Business-Rules
1. Define variables: AddressBook.xml
Create a Fact Concept to define the variables such as name and address, and link them according to their connections.
2. Write the address book specific rules: StateRules.xml
- Create a Natural Language to write the address book specific rules.
- Include CoreLibrary.xml to connect the CoreLibrary file and use the functions there.
3. Write core library rules that can be reused: CoreLibrary.xml
Create a Natural Language to write the rules that can be reused (use as a library).
Run the project
Data Composer is used to running the project and the samples are given in the project folder.
C:\Users\<user name>\Documents\Pliant Framework\FlexRule Designer\<designer version>\Samples\Writing-Business-Rules\Data