Working with Rules
Rules perform checks on your data and will tell you if something is true (valid) or false (not valid). Once written, a Rule is easy to trace, as it is always represented by a precise logical condition.
Note: We've put together a handy "Rules Explainer" guide that may be useful. Here you'll find sample Rules with detailed descriptions of how they work and why you might use them.
When writing any Rules in 1Integrate, it is best to approach them with a specific question in mind:
"What does the Rule need to check about an object from a class to identify whether it conforms to the standards being worked to?"

By identifying the questions that need to be asked about an object and/or its attributes you will have an easier time creating Rules. For example, you may need to check: "is an object's attribute of the type I am expecting"?
Example: Writing Rules "Positively"
You may notice how we always build Rules in a "positive" way - defining how the data should behave in a perfect world.
If we instead built Rules in a "negative" way - defining exactly how our data shouldn't behave, we would be at risk of missing failures we aren't expecting.
For example, if we only said Fire Stations objects shouldn't be within Schools, we wouldn't identify any Fire Stations objects within Hospitals as they are technically correct.
However, when we say Fire Stations should be in Fire Stations, we will identify Fire Stations in Schools, Hospitals, Residential buildings or anything else that isn't a Fire Station!
Note: While Rules can be built without worrying about the ordering too much, the efficiency can be increased by making sure to Order Predicates Efficiently.
Types of Rule
There are two main types of Rule:
For more information, see the Rule Types page where we break down the each of the types in more detail.