Using the Desktop BLE User Interface

This chapter describes how to configure and use the Business Logic Engine (BLE) to evaluate client expressions in worksheets.

This chapter covers the following topics:

Overview of the Business Logic Engine

Purpose of the Business Logic Engine

Typically many of your series use client expressions. When users run a worksheet, the client expressions are evaluated. The worksheet re-evaluates the client expressions whenever the user changes data in the worksheet. If the worksheet is at an aggregated level, Demantra Spectrum then splits the values to the lowest level (for example, SKU-store), and writes them to the database.

However, when you change data in the database (for example, by importing new data), the client expressions are not automatically re-evaluated. This can be an issue if you need to use the resulting data without first opening a worksheet. For example, suppose you want to import data and then export other data calculated from the imported data. In such a case, you need to force Demantra Spectrum to evaluate the relevant client expressions. To do so, you use the Business Logic Engine, which evaluates the client expressions in a given worksheet.

In general, you can run the Business Logic Engine in two different ways:

Types of BLE Requests

There are three general types of requests:

Logging onto the Desktop BLE User Interface

Before starting the desktop BLE user interface, make sure that the database is running.

To open the desktop BLE user interface

  1. Do one of the following:

    • Within Collaborator Workbench, click Tools and Applications > Business Logic Engine

    • The MANUALS_POPULATE_INS procedure should be running, in order to maintain the database whenever the Business Logic Engine evaluates data at an aggregated level. This procedure uses the values calculated by the Business Logic Engine, splits them to the lowest level, and writes them to the database. See “Introduction to Database Procedures and the Scheduler

    • If you are using the branch_data_items table, the DYNAMIC_SYNC procedure should be running

    • The Business Logic Engine currently ignores all non-numeric series. No error occurs

    • On the desktop Start menu, click Programs. Then click Demantra > Demantra Spectrum release > Business Logic Engine. A login window appears.

  2. Enter your user name and password

  3. Click Login. The Business Logic Engine window appears.

Viewing Requests

The Business Logic Engine window displays the status of manual and automatic requests (it does not display requests submitted from within a workflow).

To view requests

  1. Start the desktop BLE user interface, as described in “Logging onto the Desktop BLE User Interface”

  2. Click one of the following radio buttons, depending on the category of request you want to view:

Note: This menu option may or may not be available, depending on how Collaborator Workbench is configured.

Use one of the following user names:

In either case, your changes in Business Logic Engine are visible to all components.

Automatic Requests

Displays automatic requests. See “Types of BLE Requests”. The rest of the window displays information about that category of requests. If a task has not yet completed or if it failed during one of the stages, it is highlighted in red. Its message box lists the reason for its failure.

To refresh the Batch Monitor display

To specify the refresh delay

  1. Modify the value in the Refresh Delay box by clicking one of the arrows to its right. This box displays the refresh delay in seconds.

  2. Click Monitor > Set Refresh Delay. Or click the Set Refresh Delay button.

Starting the Business Logic Engine

If you are submitting requests within the desktop BLE user interface, you must first start the Business Logic Engine. (If you submit requests from a workflow, Demantra Spectrum automatically starts the Business Logic Engine as needed.)

To start the Business Logic Engine

  1. Start the desktop BLE user interface, as described in “Logging onto the Desktop BLE User Interface".

  2. Click Monitor > Start Engine. Or click the Start Engine button.

New Requests Displays manual requests that the Business Logic Engine has not yet processed.

Completed Requests Displays requests that the Business Logic Engine has processed.

Request Date The date and time when the request was submitted.

Run Date The required execution date and time of the request.

End Date Date and time when the request was completed, if applicable

Query Name The selected worksheet.

Status Numeric code for the current status of the request, as described below.

Messages Explanatory message for the status.

User Name The user who submitted the request.

Comments Any comments that were entered as part of the request.

Note: The bce_log_parm parameter controls how long the completed requests are saved.

An animated button appears at the upper right corner of the Batch Monitor dialog box to indicate that the Business Logic Engine is running.

Stopping the Business Logic Engine

To stop the Business Logic Engine

The animated button disappears from the upper right corner of the Batch Monitor dialog box.

Creating and Running a Manual Request

To create or modify a manual request

  1. Start the desktop BLE user interface, as described in “Logging onto the Desktop BLE User Interface”

  2. Make sure the New Requests radio button is selected.

  3. Do one of the following

    • For a new request, click Monitor > Add Request. Or click the Add Request button.

    • To edit an existing request, click the row corresponding to the request. A dialog box appears.

  4. In the Run Date box, enter the required execution date and time of the request. The default is the current system date/time. You can modify each part of the default date and time (day, month, hour, and so on) by placing the cursor in it and clicking the arrow buttons to the right of the box until the required value is displayed.

  5. . In the Query Name box, select a worksheet from the list of available worksheets.

  6. (Optional) In the Comments box, type a comment

  7. Click OK

To run a manual request

Creating and Running an Automatic Request

To create or modify an automatic request

  1. Start the desktop BLE user interface, as described in “Logging onto the Desktop BLE User Interface”

  2. Make sure the Automatic Requests radio button is selected.

  3. Do one of the following:

    • For a new request, click Monitor > Add Request. Or click the Add Request button

    • To edit an existing request, click the row corresponding to the request. A dialog box appears

  4. In the Run Date box, enter the required execution date and time of the request. The default is the current system date/time. You can modify each part of the default date and time (day, month, hour, and so on) by placing the cursor in it and clicking the arrow buttons to the right of the box until the required value is displayed.

  5. In the Query Name box, select a worksheet from the list of available worksheets.

  6. . (Optional) In the Comments box, type a comment

  7. Click OK.

To run an automatic request

  1. In the desktop BLE user interface, make a note of the numeric ID of the automatic request you want to run.

  2. In a shell, enter the following command:

    rulescalc.exe username?password?request_ID Here username and password are the username and password you use to log onto the desktop BLE user interface, and request_ID is the numeric ID of the automatic request.

    Note: This field is not editable for an automatic request. A date is shown, but this date is not used.

Deleting a Request

To delete a request

  1. Start the desktop BLE user interface, as described in “Logging onto the Desktop BLE User Interface”

  2. In the Batch Monitor window, select the request that you want to delete

  3. Click Monitor > Delete Request. Or click the Delete Request button

Reloading the Configuration

When you make changes that affect a worksheet (either Business Modeler or in the worksheet designer), you must reload those changes before using the Business Logic Engine to evaluate that worksheet.

To reload the configuration