Designer 10.5 | webMethods BPM Task Development Help | Configuring Tasks | Working with Task Assignments | Configuring Assignees for a Task Assignment | Example Task Assignment with a Business Rule Set
 
Example Task Assignment with a Business Rule Set
You can configure a task assignment to be set with a business rule set defined with the webMethods Rules Development feature. These rule sets typically contain two or more rule metaphors, such as decision tables and event rules. When you invoke the business rule set with the proper data, the decision tables, event rules, and other rule metaphors contained in the business rule set will return assignment results; you can also configure the business rule set to provide other actions as well.
The following scenario describes an example of configuring a task to obtain its assignment value from a webMethods Rules Development business rule set that also calculates a discount percentage and sends a notification message.
*For more information about how decision tables work, see Example Task Assignment with a Decision Table
*For implementation information, see Configuring a Task Assignment with a Business Rule Set.
*For more information about working with rule projects, see the webMethods BPM Rules Development Help.
Suppose you have a task that processes incoming support requests. You want use a business rule set to return a support role assignment value (Expert, Senior, or Junior) based on:
*The number of purchases the customer has made.
*The price of the items purchased by the customer.
*The customer’s enrollment status (Gold, Silver, or Regular)
In this case, the task business data contains these fields:
*prevPurchases— identifies the number of previous customer purchases.
*itemPrice— identifies the dollar amount of the item purchased.
*custStatus—identifies the customer’s enrollment status.
This business data is passed to the business rule set, which consists of two decision tables and an event rule (in this example, the business data fields are mapped to rule fields of the same name):
Decision Table 1
The first decision table from the rule set
Decision Table 2
The second decision table from the rule set
Event Rule
The event rule from the rule set
Decision Table 1 uses the prevPurchases and itemPrice business data fields to determine the discountTier value (this is the output of Decision Table 1).
Decision Table 2 uses the custStatus business data field plus the discountTier output from Decision Table one to determine two results: a discount percentage (discPerCent) and a support role name (Expert, Senior, or Junior). The business rule set returns the support result value to the task to set the task assignment. The discPerCent field is also available for use in additional task transactions, as needed.
As time passes, the customer may make additional purchases. This increases the value of prevPurchases, which may result in a change in support level for the customer. The event rule in the business rule set is configured so that any time the support value changes, a notification is sent to the customer, stating that the customer’s support level has been upgraded to the next level.
Related Topics