Configuring a Task Assignment with a Business Rule Set
When you determine a task’s assignments with a webMethods Rules Development business rule set, you place the logic for determining the assignment outside of the task and the Task Engine. Any changes to the rule logic in the business rule set will automatically be propagated to all of the tasks that use the business rule set; otherwise, if you implement assignments within the task, you must update each task assignment individually.
A business rule set typically contains two or more decision tables or other rule metaphors; the presence of multiple rule metaphors expands the potential use of the business rule set. For example, this is useful in cases where you want two or more decision tables to interact with each other, with the results from one decision table used as input for another decision table (both within the same business rule set). Or, in a case where you want to create logically-related decision tables that apply only to order processing, you can create an order processing business rule set and use it as a container for all decision tables that apply to order processing.
The selection of input parameters and results parameters is similar to the method used for a single decision table (see
Example Task Assignment with a Decision
Table). However, with a business rule set, the parameters contained in all decision tables are available for selection. For more information about business rule sets, decision tables, and their operation, see the
webMethods BPM Rules Development Help.
Note:
The Rules Explorer displays the rule projects and business rule sets you have defined in your local Designer workspace. If you have no rule projects or rule sets defined, the lists will be empty.
To work with business rule sets, you must have workspace indexing enabled (Window > Preferences > Software AG > Workspace Index). You must re-start Designer to apply a change to this setting.
To configure a task assignment with a business rule set
1. From the Solutions view, open the task with which you want to work.
2. Click the Assignments tab.
3. Next to the list of assignments, click Add to add a new assignment and then select the new assignment.
4. In the Assignee area, next to the Assignee List, click Add and select Business Rule.
5. In the Business Rule field, click the browse button . 6. In the Project field, select the rules project with which you want to work.
7. Select Use Rule Set and select a rule set in the drop-down list.
8. Click Next. Designer populates the list of action input parameters with the data models of all rule metaphors in the rule set.
9. Specify values for the data model input parameters with which you want to work. When these data model elements are matched, the rules will execute. Select an input field and do one of the following:
Type a value to assign to a data model element.
Click the browse button
to open the Expression Binding dialog box and select a value from the task business data or task info to assign to a data model element.
Note:
Not all fields in the task business data and task info represent conditions and results in the rules. You must be familiar with the conditions and results requirements of the business rule set to select the correct fields. For an example, see
Example Task Assignment with a Decision
Table.
10. Click Next. Designer populates the list of rule output fields with the data models of all rule metaphors.
11. Specify the rule output fields that you want to use as the rule results.
a. In the Selection column, click in the table cell for the element with which you want to work.
b. Click Yes in the drop-down list to specify that the data model element will contribute to the rule results.
When the rule executes, the selected elements provide the assignment value back to the task.
12. Click Finish.
Note:
Before you can run the task in your run-time environment, you must export the rule project that contains the selected business rule set to the target run-time environment to ensure that the task assignment operates as expected. For more information about exporting rule projects, see the webMethods BPM Rules Development Help.
Related Topics