In this walkthrough, we’ll show you how to implement rules that provide salespeople with specific content depending on the context of the application they’re working in, permissions for their role and sales process workflow rules.
There are three categories of rules:
Category 1: File type rules
1. Only files with type .ppt or .pptx should be visible within the Presentations app
2. Only files tagged with “Product1” appear in the Teams app
3. Only files modified within the last week appear in recently accessed items
Category 2: Role permissions rules
1. Director level employees with role of analyst has permission to use the ad hoc reporting tool
2. Within Tenant A, users in Group B can only download assets on mobile devices
3. Within Tenant B, users in Group C can only see opportunities in the West District in the CRM
Category 3: Workflow rules
1. Every week, push reports A and B to all manager level roles in Tenant D except for those in the West Region
2. If an opportunity’s data quality index (dqi) drops below 20%, email Sales VPs a warning
3. If a question that appears in multiple RFPs is updated, retroactively update all prior RFPs the question appears in
1. Only files with type .ppt or .pptx should be visible within the Presentations app
2. Only files tagged with “Product1” appear in the Teams app
3. Only files modified within the last week appear in recently accessed items
Optimizing Rulesheet Logic: Ambiguity (Conflicts) Checker
The conflict checker shows that as currently modeled, the rule action only allows us to choose ONE application to grant access to. At this point we need to revisit the rules and ask, “What is the actual intent of these rules?”
Does rule 1 mean:
Depending on how we want the rule to behave we may need to change the rulesheet. Let’s assume the intent of the rules is to permit access to all Applications for which the file meets the specified rules. This means we cannot have a single attribute for the result because a subsequent rule will override a prior rule’s result.
To correctly model this we need to introduce a new business object (the Application
) and set up a relationship between the files and the applications that are allowed to access them. This will be a many-to-many relationship:
The rule sheet then needs to be changed as shown below. Within the scope section, we’ll define an alias, “app”.
When the conditions are met, a new instance of Application
(given the alias within this rulesheet, "app") will be created as a child entity of File
.
Now, we can test specific scenarios against the rules to validate the behavior:
1. Director level employees with role of analyst has permission to use the ad hoc reporting tool
2. Within Tenant A, users in Group B can only download assets on mobile devices
3. Within Tenant B, users in Group C can only see opportunities in the West District in the CRM
Group 2 is a little more complex since we need to model the relationships between a user and:
a. The Groups
in which they belong
b. The Roles’
respective permissions
c. The Tenants
to which they’re assigned
In this model we assume that a user may have many roles,
tenants
and groups
:
Their permission levels are now defined in a new rulesheet:
1. Every week, push reports A and B to all manager level roles in Tenant D except for those in the West Region
2. If an opportunity’s data quality index (dqi) drops below 20%, email Sales VPs a warning
3. If a question that appears in multiple RFPs is updated, retroactively update all prior RFPs the question appears in
Group 3 could be split into three non-overlapping parts, but for now we’ll keep them together in this vocabulary:
Since these three rules are unrelated to each other (except that they have something to do with Workflow), it makes the most sense to model them in separate rulesheets. In fact, if we put them all on a single sheet you can see how they are independent since none of the rules share any of the attributes:
Let’s instead split them into three sheets with their own respective test cases.
1. Every week push reports A and B to all manager level role people in Tenant D except for the West Region.
2. If an opportunity’s data quality index (dqi) drops below 20%, email Sales VPs a warning.
3. If a question that appears in multiple RFPs is updated, retroactively update all prior RFPs the question appears in.
This is just a taste of the complexity of rules that can be codelessly authored and operationalized in Corticon. To learn more or try a free evaluation, visit progress.com/corticon.
Seth Meldon is a Pre-Sales Engineer with a primary product focus area of Progress Corticon Business Rules Engine. His work is focused on educating and demoing Corticon’s expansive functionalities, use cases, and architectural strategies to internal and external audiences. You can follow Seth on LinkedIn.
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.
Learn MoreSubscribe to get all the news, info and tutorials you need to build better business apps and sites