Concepts

An introduction to the WEM Modeler Ontology and use of Concepts.

Ontology

Let's start with the question: what is Ontology. According to Wikipedia: "In computer science and information science, an ontology is a formal naming and definition of the types, properties, and interrelationships of the entities that really or fundamentally exist for a particular domain of discourse. It is thus a practical application of philosophical ontology, with a taxonomy". Sounds complex? Well, it can be. Ontology within WEM is one of the most powerful, but also complex concepts. In this article we will cover the basics, and we'll discuss the more complex aspects of the WEM Ontology in another article.

The Basics

Many people use the Ontology to define and maintain picklists that are static. Some examples:

  • A list of all US states;

  • A list of the situations you have to use in your application;

  • A list of every possible status of a ticket in a helpdesk system;

  • Etc.

If you need a field in your WEM list from which you need to select pre-defined options (a single select or multi-select data field), you need to point that field to a list of values that is stored in the Ontology. And this is the most basic use of the Ontology. It is also the way most modelers use the Ontology.

You can also have a hierarchy within a picklist. You could e.g. have a list of "Car brands" (BMW, Ford, Infinity, Nissan, Volkswagen, etc.), and for each car brand the car models (children of the parent Concept "Car brands"). You now have a simple hierarchy of car brands and car models.

Items in the Ontology are called Concepts. So in the Ontology you find relations between Concepts.

Concept

Every item in the Ontology is a Concept. So when you want to maintain car brands, "Ford" would be a Concept. If there is a hierarchy, "Ford"."Mustang" is also a Concept. Note: "Mustang" is called a child of "Ford". But it is still a Concept.

A Concept has information associated with it:

  • Local name: This is the name of the name of the Concept;

  • Display Names: If you have a multi-lingual application, you can specify what the Concept name is in the various languages you want to support;

  • Concept type: Specify a new Concept type or select one from a list of existing Concept types. See below for an explanation of Concept types;

  • Description: You can briefly describe a Concept;

  • Synonyms: you can add one or more synonyms for a car. You can use this e.g. if you want to user to be able to search for a Concept, but you want "Volkswagen" and "VW" to point to the same Concept. You would add the Synonym "VW" to the "Volkswagen" Concept.

Concept Type

A Concept Type is used to distinguish between Concepts. This is not limited to children of a single Concept. You could look at a Concept Type as being a label. Example: Let's say you want to be able to find all car models dat are SUVs. You could easily realize this by adding the Concept Type "SUV" to the car models that are SUVs. You now have created new relationship between the various Concepts, based on the Concept Type "SUV". In a list you could create a single-select field that would only show the car models of concept type "SUV".

The Concept Type is a very powerful way of adding an extra layer of relationships between Concepts.

Adding a Concept

To add a new Concept, first, go to the Ontology section of your Project. Here you get an overview of all Concepts created in this project. To add a new Concept, simply select New child concept from the context-menu:

Since you start at 'the top' of the Ontology hierarchy you start with creating a new child. Give this Concept a name (e.g. "Cars") and fill in the Concept details on the right hand side of the screen:

Properties

Besides the basic information that is associated with a Concept (see above), it is also possible to add one or more properties to a Concept. You can use these properties for whatever you want. E.g. maybe you want to add a car brand logo image to a Concept: just add a property of the type file to the Concept. You can also use concept properties in expressions in labels or template properties this allows you to show a logo depending on sign in for example you can find a guide here.

To add a property to a Concept, select the Concept and click on the Properties button in the menu-bar. You now get a list of all defined properties (this list is empty for a new Concept, of course), and you can New, Edit or Delete a property. Click on add. You now get the properties form for the new property:

Item

Options

Name

The name you want to give this property.

Value type

- Text - Numeric - Boolean - File - Rich text - Date - Duration

The value type you want this property to have

Applies on

- Direct children - All descendants

Specify if this property is available to only the direct children of a Concept, or to all children of all children.

Only concepts with type

If a property should only be available to concepts of a specific Concept type, you can specify that Concept type here.

Once a property has been defined, you can change the details or value of that property through the detailed information of the descendant Concept Properties in the context menu. Now you can also assign a value to the added property by editing or adding a descendants (child) of the original concept by double clicking the concept or select edit from its context menu.

Concept properties and the value a concept property holds can be used in expressions throughout your application. You can use this by adding a colon (:) and the name of the property in single quotes, here is an example of a concept with a property called 'Image' and holds a file with a image belonging to the march property: 'Month'.'March':'Image'

Towards the end of this article, you can find simple steps on how to display a custom logo based on the signed-in user.

Adding a child

To add a children to a Concept, simply select New child. A new child is now created as part of a Concept. All properties of the parent Concept are available, and the information details you needed to enter for the parent must/can also be specified for the child.

Import

If you want to create a picklist that is rather long (e.g. all the Countries in the world, or all the US states), you may want to impor4t that data to create a list. To use the Import function you first select the Concept where you want to add all the children. Let's say you have a Concept called "Cars" and want to add a list of all car brands. Select "Cars" and click on the Import button. You get the import screen:

Here you copy the list of car brands in the main container (see example above). This container has a dropdown list where you specify how you want to use this list. nN our example we select Local name because we want all the children to use the name of the car brand as the local name. Other import options are:

  • Content type

  • Description

  • Synonym

  • Display name - you can select multiple display name if your application support multiple languages

  • Any property you may have defined for the Concept "Car"

You can also specify whether the copied list has a header or not. Is a separator used and if so: which one? What is the qualifier you want to use.

Now simply click on ok, and the list is imported and your Concept "Cars" now has a complete list of child Concepts that each represent a car brand.

Concept properties can also be used in your template settings, in this example we will use the "Menu logo" setting to show a logo fitting the account.

  1. Upload the different Logo image files to the file folder in the modeler.

  2. Create a concept folder called Companies for example and add a property called 'Logo file'

  3. Add the different Companies as concepts and add the logo files in their Logo File property.

  4. Add a concept data field to select and hold the information for which Company a user works for in this case we can call it 'Company'. (You also need a field that holds the current user information)

  5. There are 2 ways to execute the last part:

    1. Create a calculated field that calculates the current logo and uses the calculated field in the template settings directly.

    2. Add the expression directly to the template expressions.

// Expression possible example

choose 
when [LogIn.Form.CurrentUser] -> [LogIn.Accounts.Company] ='Companies'.'Company 1'
	then FileUrl('Companies'.'Company 1':'Logo File')
when [LogIn.Form.CurrentUser] ->[LogIn.Accounts.Company] ='Companies'.'Company 2'
	then FileUrl('Companies'.'Company 2':'Logo File')
when [LogIn.Form.CurrentUser] ->[LogIn.Accounts.Company] ='Companies'.'Company 3'
	then FileUrl('Companies'.'Company 3':'Logo File')
when [LogIn.Form.CurrentUser] ->[LogIn.Accounts.Company] ='Companies'.'Company WEM'
	then FileUrl('Companies'.'Company WEM':'Logo File')
default FileUrl('Companies'.'Company WEM':'Logo File')
end

All template settings are text fields this means you need to use the FileUrl() expression to convert the return type from a file to the direct Url from the file. This is not needed when you use property files in template interactions for example.

Advanced Ontology topics

There are two areas that are for advanced use: Ontology Queries and Ontology Relations. These topics will be discussed in the next pages and makes concepts more powerful.

Last updated