Building a Decision service

Build a Decision service when you want a decision or condition in a business rule to determine which process implementation is invoked. For example, when a certain condition evaluates to true, Process Designer implements the associated activity or action.

IBM® Process Designer supports business rule authoring tasks as performed by business analysts and business users who are rule designers rather than programmers. Business rule designers can express business logic using rule syntax that resembles natural human language. This rule syntax is called Business Action Language (BAL), which is a declarative language that relates business concepts to business data and actions.

Business rules are an expression of business policy in a form that is understandable to business users and that can be run by a rule engine. Business rules formalize a business policy into a series of "if-then" statements. In Process Designer, business rules are included in a business process definition (BPD) by adding a Decision service to the process. Add a Decision service to a Process Application when the actions that should take place in your process depend upon one or more conditions. For example, if an employee holds the position of Director and submits a meal expense for more than $250, then you can create a rule and set a variable in the rule, such as approvalRequired, to route the process sequence flow into a specific approval activity.

A Decision service contains one or more components. There are three types of components:
BAL Rule
You can use the rule editor in this component to author business rules using Business Action Language (BAL), a natural language technology.
JRules Decision Service
IBM Business Process Manager integrates with IBM WebSphere ILOG JRules using the JRules Decision Service component. You can use this rule component to connect to and implement rule applications that are available on a JRules Rule Execution Server.
Decision Table
The Decision Table component contains a rule table. Each row in the rule table represents a Boolean condition that evaluates to true or false at run time. When a rule evaluates to true, the JavaScript expression that you provide as the rule action is started.
When building a Decision service, follow these guidelines:
  • Build your rule hierarchy so that rule conditions are ordered from most complex to least complex.
  • Create a final condition that is a catch-all rule. This rule is necessary if you cannot guarantee that the variable that you want to modify in the rule will be set before running the process that triggers the Decision service.
  • Consider encapsulating your rules in a single-function Decision service, which allows the service to be available to any other part of the process application that needs the same rule logic.

The following topics describe how to author, implement and manage business rules in Process Designer.