Adding a BAL Rule component to a service (deprecated)

Draft comment:
This topic only applies to BAW, and is located in the BAW repository. Last updated on 2025-03-13 12:15
The Business Action Language (BAL) Rule component provides a rule editor that allows rule designers to author business rules using natural language technology. Using natural language, instead of JavaScript, to author rules means that no programming expertise is required to create business rules, and the rules are easier for people to read and understand.

About this task

The following steps describe how to add a BAL Rule component to a sample Decision service. The purpose of the sample service is to determine whether approval is required for certain employee expenses. The sample service is a single-function Rule that can be called from any other service.

Restriction: The following variable types cannot be used with BAL rules in Decision services:
  • ConditionalActivity
  • IndexedMap
  • Map
  • NameValuePair
  • Record
  • SLAViolationRecord
  • SQLDatabaseType
  • SQLParameter
  • SQLResult
  • SQLResultSetColumn
  • SQLResultSetRow
  • SQLStatement
  • TWHolidaySchedule
  • TWTimePeriod
  • TWTimeSchedule
  • TWWorkSchedule
  • TaskListData
  • TaskListItem
  • TaskListProperties
  • TaskListFilterProperties
  • TaskListSortBySelectionType
  • XMLDocument
  • XMLElement
  • XMLNodeList

Procedure

  1. Open the process application in the Designer view.
  2. Create a Decision service.
  3. In the diagram of the new Decision service, click BAL Rule in the component palette and drag the BAL Rule component icon from the palette to the service diagram.
  4. In the Properties tab, enter a name for the new BAL Rule component, such as ExpenseApproval.
  5. Click the Variables tab.
  6. Click Add Private to add a private variable to the Decision service.
    For this sample Decision service, add the private variable, request.
    1. Replace Untitled1 in the Name field with request .
    2. Click Select next to Variable Type and select the type from the list.
  7. If you use the Activity Wizard to create a Decision service, you can choose existing variables to add as input and output. You should use the Activity Wizard when you start with an existing activity and want to quickly create a service to implement the activity. To access the wizard, right-click an activity icon in a process diagram and select Activity Wizard from the list of options.
  8. Click Add Private.
  9. Replace Untitled1 in the Name field with approvalRequired .
  10. Click Select next to Variable Type and select the Boolean type from the list.
    The Boolean variable type is included in the Business Automation Workflow System Data toolkit. The System Data toolkit is included in each process application by default.
  11. Click the Decisions tab to open the rules editor.

What to do next

Create a rule that is implemented for this Decision service. Refer to the related topic "Authoring rules using the BAL rule editor."