How are an ontology and a business rule connected?
Ontologies and Business Rules are different things, but they are connected. So much connected that Business Rules can’t even exist without an Ontology! In this blog, we will show how they are connected following a simple example.
Before we start
If you do not yet know what an Ontology and/or Business Rule is, please read our blog: Ontology versus Business Rule
Ready? Here we go
We will use our example from our quick-start tutorial: Tutorial: Hello world!
The figure below graphically represents the ontology (on the left) and the business rule (on the right) from this tutorial. Let’s walk through it step-by-step.
Trigger
In Hapsah the Knowledge Graph holds data about instances conform the definitions and structure as described in the Ontology. When data about instances (e.g. Entities and Attributes) is inserted or changed in the Knowledge Graph, this can trigger the Condition(s) of Business Rule(s). In our case when a new Person is entered into the Knowledge Graph with a First Name.
Rule flow
When the Knowledge Graph has triggered the condition(s) of a Business Rule, the Rule flow determines which Actions and Operations are executed.
Manipulations
Most Actions execute manipulations onto the Knowledge Graph (except for Find Actions, which are not used in this example). In this example a new Greeting is created, a “Hello <First name>” Message is constructed and assigned to the Greeting, and the Greeting is associated with the Person that was just added to the Knowledge Graph.
Conclusion
As you can see, since Business Rules are triggered by and consists of manipulations of the elements of an Ontology, they cannot exist without an Ontology.
If you are interested in more detailed explanations, we have tutorials for each of the steps mentioned above: https://www.hapsah.org/tutorials/
You can also try out the Hello world example live with: Write app or Run app