Build the Vocabulary
- Last Updated: March 24, 2022
- 4 minute read
- Corticon
- Version 6.3
- Tutorials
Now, let’s implement the Vocabulary in Corticon Studio. To begin, launch Corticon Studio and create a Rule Project:
- On the Start menu, select Progress > Corticon Studio. In the Workspace Launcher dialog box that opens, retain the default workspace and click OK. Corticon Studio opens.
- Select File > New > Rule Project.
- In the New Corticon Project window, enter MyAdvancedTutorial as the
project name and click Finish.

Create the Vocabulary
Next, create a Vocabulary file:
- Right-click MyAdvancedTutorial and select New > Rule
Vocabulary.

- In the Create a New Vocabulary window, enter groceryStore as the
Vocabulary file name and click Finish.

The Vocabulary opens under the rule project MyAdvancedTutorial as shown:
Add Entities
Now, let’s add the entities (Customer, PreferredAccount, Item, ShoppingCart, Coupon):
- In the Vocabulary editor on the right, right-click groceryStore and
select Add Entity.

- An entity with the default name Entity_1 is created. Type over this
and enter Customer.

- Repeat these steps to add the remaining entities. The result will
look like this:

Add Attributes
Next, let’s add the attributes. Start by adding attributes for the Customer entity based on this table:
- Right-click Customer and select Add Attribute, and then choose
String.

- An attribute named attribute_1 is created under Customer. Type over
this and enter name.

- Right-click Customer, select Add Attribute, and then choose Boolean

- Type over the default attribute name and enter
isPreferredMember.

- Click the Mode drop-down and select Transient.

Now, add attributes for the rest of the entities based on this table:
After adding all the attributes, the Vocabulary looks like this:
Add Associations
Next, let’s create associations between the entities. Let’s start with the association between Customer and PreferredAccount. This is a many-to-one association.
- Right-click Customer and select Add Association.

- In the Association dialog box:
- Select Many in the Source section
- Select PreferredAccount as the Target Entity Name
- Select One in the Target section
- Click OK
The association appears as shown here.
Similarly add associations between Customer and ShoppingCart (one-to-many) and between Item and ShoppingCart (many-to-one). The final output will look like this.
Each association has an association role name. For example, the association between Customer and PreferredAccount is given the name preferredAccount. Note that the opposite association between PreferredAccount and Customer is given the role name customer. A role name helps describe or clarify the relationship of an entity with another entity.
You can change the role name for an association to make it more meaningful. In our example, let’s change the role name for the association between Customer and PreferredAccount to preferredCard. To do this, double-click the association under Customer, type over the default value, and enter preferredCard.
![]()