Understanding the Knowledge Set Builder

The Knowledge Set Builder is a web based module through which you join multiple search queries to create a flat subset of the knowledge in the Model Builder. In essence, Knowledge Sets provide a powerful way to separate business logic from the interaction with end users and external applications. They encapsulate the complexity of the knowledge blocks (or the business model) and return a simplified representation of it, much like a flat table.   Conceptual introduction-video to Knowledge Sets   How to build a Knowledge Set  

Create a Base Query

Knowledge Sets are built by joining multiple Queries together.

Video tutorial on the query function


The Query function lets you formulate a search query by writing criteria connected through the logical operators AND and OR. This way of writing Queries is easy to overview and to edit since the entire query is visible and editable on one page.


To specify a query, first select the initial data type that you are looking for and then fill out a criterion. The AND operator is chosen per default.

Say that I want my query to find all Associations that are a kind of Business Improvement Initiative. When I set the data type to Association a criterion with the definition is a kind of is automatically added, since an association always require a definition. If you know that your definition doesn’t have any sub classes it’s more efficient to change the criterion to equals – that way inorigo will not search through the whole classification structure.

Running this query now returns all business improvement initiatives, that is – associations defined as business improvement initiatives.


If an initial base query starts with Definition is a kind of  X the query is named Table #1

If the initial base query however starts with a definition = X, the query is named automatically named X.


Click an operator lets you add attributes, references or relations as criteria to the query.

You may choose to include disabled attributes (1) and abstract attributes (attributes that are prohibited to instantiate) (2), and to reload the units (3). Use the search field to quickly find your units and either select it and press OK, or double click to add the Attribute, reference or relation.


Unavailable connections are automatically disabled, see Definition in the image above.


What Attributes, Relations and References that are available is decided in the following way

Attributes Simple Search Query

All attributes (regardless of existing actual instances of the definition) that are defined on given definition(s) and super classes in the search query. Only the class attributes is displayed if no definition or is a kind of is given. Example: Definition = A, Definition = A AND Definition = B (etc), Is a kind of = A, Is a kind of = A AND Is a kind of = B (etc), Definition = A AND Is a kind of = B (etc)

Complex Search Query

Only attributes that are defined on given definition(s) and super classes in the search query that actually have instances. Only the class attributes is displayed if no definition or is a kind of is given.

Example: Definition = A OR Definition = B (etc), Definition = A OR Is a kind of = B (etc)

References The result of the search query is matched with all available references. if there are instances with given definitions, and, the attributes that are pointing to a unit and displays any unit in in the query.
Relations Simple Search Query

All relations (regardless of existing instances to the relation) that are defined on given definition(s) and super classes in the search query.

Complex Search Query

Only relations that are defined on given definition(s) and super classes in the search query that actually have instances. Only the class attributes is displayed if no definition or is a kind of is given.



Once a query has been created it appears in the knowledge set builder as displayed in the image below. Press the rightmost edit button to make changes to the query, and press Attributes to select what attributes that are to be included in the knowledge set.

The attribute ID is per default enabled. This attribute refers to the units unique ID that will enable inorigo to recognize the unit in the database. Thus, the ID needs to be included if a Knowledge Set containing inorigo units is to be used in an application.

If no attributes are included, the knowledge set will be empty.

Joining Queries

Joining a new query to an existing one is done by simply pressing join under the query you intend to join with.

The available Attributes, References and Relations to join with are automatically loaded and unavailable options are automatically disabled. In this case instances are disabled since Business Improvement Initiatives in the base query are Associations.

When a new query is added it is automatically selected. When joining to another query than the latest one added, you need to click inside the box of the query to reveal its respective join function as the image below displays.

Joining a query through the join in the left image results in a join with the initial base query Business Improvement Initiative. Joining through the join on the right results in a join with the sub-query Initiative Person Resource.



Video tutorial on parameters in queries


To add a parameter to a criterion, press the parameter button next to the combo box.

This reveals the parameter window.

Name the parameter, select a data type and write an expression. Then press add Parameter to save it to the list.

Select the parameter from the list before closing the window to add it to your criterion. A parameter can be used multiple times in the same query.

More information about available parameters and expressions can be found in the documentation on Expressions.


Sorting a Knowledge Set

Define the columns displayed in the Knowledge Set by selecting the attributes as displayed in the image above. Notice that this list does not display disabled attributes. All attributes that are selected will be added under the Queries column, in this scenario, under Business Improvement initiatives, in the rightmost column in the image below.

Notice that definitionID needs to be included for the actual units to be loaded from a knowledge set. If only Names for example are included and a knowledge set is opened in the Application Builder, the names will appear as strings, rather than inorigo units.


It’s possible to sort a Knowledge Set via the result grid on any of the columns by clicking anywhere inside the header. If the Knowledge Set is saved after sorting, the sorting will be persisted and also apply to API calls where no specific sorting is specified. More information is available on the documentation on API – Swagger UI.


The order of the columns in a knowledge set may also be customized by dragging and dropping the column header. Top headers can be reordered freely, and sub-headers can be reordered underneath the top header as the images displays.

It’s possible to copy cell values from the result matrix in Knowledge Sets and Queries by right-clicking and choosing Copy Cell Value


Gaining access to the Knowledge Set Builder

Since the Knowledge Set Builder allows user to search and display information from the entire database, an AuAuthRecord has been set to deny all users its access rights by default. This restriction is a precautionary measure to ensure that no sensitive data can be accessed by unauthorized users.

To access the Knowledge Set Builder for the first time in an instance, grant your account the necessary access rights by adding an AuAuthRecord for it.

Searching for AuAuthRecords, you will find a record for the Knowledge Set Builder in the generic context with all rights are revoked. Changes made to this record affects all users within the instance, so its recommended to add an additional AuAuthRecord with a higher sequence number than 0 for each account that requires access.

Follow these steps to create an AuAuthRecord for an account to gain access to The Knowledge Set Builder

  • Create a new AuAuthRecord
  • Set Sequence a number > 0
  • Type the following in the expression field


  • Replace [USER ID] with the ID for the user account – available under the change log tab.
  • Set the wanted permission rights and save the AuAuthRecord.
 Undefined (lower sequence AuAuthrecords will be applied)



Suggest Edit