Discover the business rules
- Last Updated: September 9, 2024
- 4 minute read
- Corticon
- Version 7.2
- Version 7.1
- Version 6.3
- Corticon.js
- Version 2.3
- Tutorials
- Identifying the terms to be included in the Vocabulary
- Identifying the business rules
Identify Vocabulary terms and associations
To get started, you review the business problem and start compiling terms that need to be included in the Vocabulary. You can then identify the key entities and the assumptions about each entity:
- Customer:
- A Customer has a Name.
- A Customer uses a Shopping Cart to carry Items.
- A Customer may be a Preferred Shopper and have a Preferred Shopper account that is identified by swiping their Preferred Card at checkout.
- A Preferred Shopper account has a Card Number.
- A Preferred Shopper account holds a Cash-Back Balance.
- One Preferred Shopper account may be used by anyone in a family.
- Item:
- Each Item has a Name.
- An Item has a Price.
- An Item has a Bar-coded label.
- An Item has a Department embedded in the Bar-coded label.
- Shopping Cart:
- Shopping Carts contain the Items that a Customer purchases during each visit.
- Each Shopping Cart has a Total Amount.
- If the Customer has a Preferred Shopper account, a Cash-Back Bonus is calculated using the Shopping Cart’s total amount and is deducted from the total amount upon customer request.
- Coupon:
- Coupons are issued to shoppers based on promotions.
- A Coupon has a Description.
- A Coupon has an Issue Date.
- A Coupon has an Expiration Date.
Based on these assumptions, you can derive the attributes for each entity in the Vocabulary. Attributes are properties or characteristics that distinguish one instance of an entity from another. For example, each item has attributes like name, price, and bar code. Such attribute values make each item unique.
This table lists the attributes for each entity along with their data type and attribute mode:
The mode of an attribute can be Base or Transient. Base attribute values are either sent to the rule model from a client application, returned to a client application from the rule model, or both. Transient attributes are only used within the rule model, and their values are assigned or derived by rules, but not sent to a client application. For example, the cashBackEarned attribute is a Transient attribute that is used to update the value of the cumulativeCashBack attribute, which is a Base attribute.
Next, let’s identify the associations for the Vocabulary. An association defines the relationship between two entities. It can be one-to-one, one-to-many, many-to-one, or many-to-many. In this grocery store business problem, you have the following associations:
- Many Customers (members of a family) can be associated with one PreferredAccount (many-to-one).
- One Customer can be associated with many ShoppingCarts over multiple visits (one-to-many).
- One ShoppingCart can be associated with many Items (one-to-many).
To make these relationships clear, you create a diagram of the associations. Creating a diagram is especially useful when you have a large or complex Vocabulary with many associations. Here is the diagram of entities and associations for this business problem:
In this diagram, the connectors between entities show the kind of relationship. For example, Customer has a one-to-many association with ShoppingCart.
Notice that a coupon is not associated with a customer. It might be a physical coupon that could be redeemed by whoever becomes the holder.
Identify the business rules
Next, let’s identify specific business rules. At a high level, this is the basic process followed by every customer making purchases at a store:
Though this process may involve several steps, you as rule modelers should be most concerned with those steps where decisions are made. In this case, the Checkout step contains the rule-based decisions that are built into the store’s cash registers.
- Organize the substeps using separate Rulesheets.
- Combine the Rulesheets into a Ruleflow
Next, let’s look at the business rules that you need to model for each substep: