- Index

< Previous |  | Next >

# Using Decision Tables

Decision tables provide a way to express a complex set of business rules as a table of conditions that apply to incoming tuple fields, with one or more specified actions for each row of conditions. By default, all rows of the table are evaluated against each incoming tuple, with an option to stop evaluation at the first matching row.

In StreamBase, decision tables are managed by the Decision Table operator, which is selectable from the EventFlow Editor Palette view like any operator. This operator requires a decision table file that expresses the business rule conditions and actions for its expected input stream. StreamBase provides three ways to create and edit your decision table files:

- Using the Decision Table Editor in StreamBase Studio, which creates and edits decision table files in the `.sbdt` file format.

- Using Microsoft Excel 2007 or later in which you have installed the TIBCO StreamBase Add-in for Microsoft Excel, release 2.5.1 or later. This allows you to create and edit decision table files in standard Excel `.xlsx` file format.

- Using a TIBCO StreamBase Artifact Management Server, which creates and edits decision table files in the `.sbdt` file format.

StreamBase’s Decision Table feature is based on the Decision Table feature of TIBCO BusinessEvents®. The StreamBase operator can import and use decision table files authored in and saved from BusinessEvents in both its native `.rulefunctionimpl` file format and as Excel files authored with the BusinessEvents Excel Add-in.

### Note

By default, the Excel Add-in, when invoked from the Decision Table Properties view, opens an instance of Excel embedded in a Studio view. This can produce a cramped view of the Excel file being edited, especially on small screens.

To prevent Excel from opening as a Studio view, instead opening as an external application, make the following Studio settings:

- From Studio's top-level menus, invoke Window → Preferences.

- In the Preferences dialog, open General → Editors → File Associations.

- Click the top Add button to add a new file type.

- Type `.xlsx` in the next dialog.

- Select the newly added `.xlsx` entry in the File Types list.

- Click the bottom Add button.

- In the Editor Selection dialog, select the External Programs radio button.

- Scroll through the list of programs to locate and select: Microsoft Excel Worksheet.

- If the `.xlsx` file type has other associated programs, select the newly added program name shown above and click the Default button.

- Click the OK button to close and exit the dialog.

Now when you open an Excel file from within Studio, it opens Excel as an external application.

See the following pages for further details about Decision Table support in StreamBase.