◷ Reading Time: 4 minutes
Contacts in an address book contain the 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.
How to Run the Project
Data Composer is used to run the project and the samples are given in the data folder of the project.
Open the file StateRule.xml.

Click on Start Debugging.

Select Data Composer.

Under Data, select the given sample JSON file.
<Project folder>\Writing-Business-Rules\Data

Enter Name as Person
and click OK.

Select Object by Data Composer
from the Input drop-down and click OK.

Click the next step to go step-by-step.

You will see the notifications once the execution is completed successfully.

Video Description
Project Steps
1. Define the concept and 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).

Download the project
Use the attachment at the end of the page to download the sample project.
