◷ Reading Time: 8 minutes
What is a Fact Concept?
Fact concept is an abstract model that defines the fundamentals of knowledge in a specific context. Facts describe what business people know about their business. A Fact has certain characteristics: structure, relationships, and constraints. The Fact Concept visually describes these characteristics. When Fact Concept is modeled, it defines:
- The context of a business domain
- Bases of the business glossary (terms) and associated expressions
- Constraints about Facts, structurally and semantically
- Relationships of the Facts within a business context
There are three major elements in a Fact.
A fact is a logical grouping of data and/or information that represents a concept. In this example, Person is the fact which has three members FirstName, LastName, and Occupation.
A list of valid pre-defined values for a member of a Fact. In this example, it’s the occupation that has a list of options.
A relationship defines the whole-part relationship between Facts and Options. It can define one-to-one, one-to-many and many-to-one relationships.
To add a new Fact Concept document,
Document Types --> Business Concept --> Fact Concept
Once you add facts and options, this will be the window.
Fact Concept Properties
- Namespace: Namespace is a name that defines the definition. For example, when there are multiple Fact models with the same name, they can co-exist in different Namespaces.
- Node Type: Type of the document which is ‘Concept’
- Glossaries: If there are any Business Glossaries or Business Formulas, link them here
- Attribute Type: Type of attributes that can be assigned to this particular item
- Description: Any description related to this Fact Concept file
You can click/ drag and drop items from the toolbox to the canvas.
- Selection: Select a node
- Note: Create notes
- Straight: Straight connection line
- Bezier: Curved connection line
- Right Angle: Right-angled connection line
- Fact: Fact node
- Option: Option node
At the top menu, you can see the following items.
- Import: Import from a CSV , PMML, JSON data, JSON Schema, Database Tables or Database Views
- Delete item: Delete a selected item
- Properties: Properties of the page or a node
- Variable Parameters: Define/ update/ delete a variable
- Edit members: Edit members of a selected node
- Overview of entire model: See the entire model
- Zooming: Zoom in or zoom out
- Export to image: Export the document to an image
- Alignments: Align nodes
- Resize: Resize selected nodes to a single size
- Layout arrangements: Automatically arrange and layout the nodes
- Change connections: Change connection styles to straight/ Bezier or Right Angle
Node/ Connection Properties
If you click on a node/ connection, its property window will appear.
- Members: Collection of members of the node
- Name: Name of the node
- Node Type: Whether the node is a Fact or Option
Create a Fact Concept
Drap and drop a Fact
Double-click on the name to change the Fact name (This is the type of the variable)
Add properties to the object
If you want to add options, drag and drop an Option.
Write-click and add options.
Connect the options and the property, you want to add the option by dragging a line from the property to options.
Then the property and the options will be connected.
Change the option name to match with the property.
Finally, the options are added.
Referencing a Fact Concept
A Fact Concept is added to a logic document as a variable with a custom type. See this link to learn how to define it.
Validation and Enforcement
To enforce the constraints, you need to use a step called Validator as part of a flow similar to the below image (project attached below):
The Validator step (Green nodes in the above flow):
- will enforce data against one or more facts
- collects the notification automatically (different types, e.g., Error, Warning, etc.)
- set a decision value to decide what should be next based on a conditional transition.
You can see different notifications in different scenarios in the below image.
- if you do not validate and enforce the input against a fact concept, AND
- if your decision model requires a specific field in execution AND
- your input does not provide it
service/engine will throw an exception.
Sample Fact Concept
Download the sample Fact Concept file (Student Validation.zip) using the attachment at the end of the page.