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:
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:
You can call the Business Logic Engine from within a workflow step. See “BLE Step”.
You can use the desktop BLE user interface, described here
There are three general types of requests:
Start the desktop BLE user interface and submit a request to process a worksheet. These requests are called manual requests. The desktop BLE user interface displays the status of all these requests.
Run the Business Logic Engine from the command line, passing to it the ID of a previously defined request. These requests are called automatic requests. The desktop BLE user interface displays the status of instances of the automatic requests.
Within a workflow, include a BLE Step, which starts the Business Logic Engine if necessary and evaluates the specified worksheet. These requests are called workflow-launched requests. The desktop BLE user interface does not display the status of these requests. To monitor them, you use the Workflow Manager; see “Viewing Workflow Status".
Before starting the desktop BLE user interface, make sure that the database is running.
To open the desktop BLE user interface
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.
Enter your user name and password
Click Login. The Business Logic Engine window appears.
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
Start the desktop BLE user interface, as described in “Logging onto the Desktop BLE User Interface”
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:
User name of the owner of a specific component.
User with the System Manager permission level (see “Permission Levels").
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
Click Monitor > Refresh Monitor. Or click the Refresh Monitor button.
To specify the refresh delay
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.
Click Monitor > Set Refresh Delay. Or click the Set Refresh Delay button.
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
Start the desktop BLE user interface, as described in “Logging onto the Desktop BLE User Interface".
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.
To stop the Business Logic Engine
Within the desktop BLE user interface, click Monitor > Stop Engine. Or click the Stop Engine button.
The animated button disappears from the upper right corner of the Batch Monitor dialog box.
To create or modify a manual request
Start the desktop BLE user interface, as described in “Logging onto the Desktop BLE User Interface”
Make sure the New Requests radio button is selected.
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.
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.
. In the Query Name box, select a worksheet from the list of available worksheets.
(Optional) In the Comments box, type a comment
Click OK
To run a manual request
Make sure that the Business Logic Engine is running so that it can process the request; see “Starting the Business Logic Engine”.
To create or modify an automatic request
Start the desktop BLE user interface, as described in “Logging onto the Desktop BLE User Interface”
Make sure the Automatic Requests radio button is selected.
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
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.
In the Query Name box, select a worksheet from the list of available worksheets.
. (Optional) In the Comments box, type a comment
Click OK.
To run an automatic request
In the desktop BLE user interface, make a note of the numeric ID of the automatic request you want to run.
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.
To delete a request
Start the desktop BLE user interface, as described in “Logging onto the Desktop BLE User Interface”
In the Batch Monitor window, select the request that you want to delete
Click Monitor > Delete Request. Or click the Delete Request button
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
Click Window > Reload Configuration.
Or exit and reopen the desktop BLE user interface.