BAM example - Rejected orders with Amount greater than 5000 (threshold)

In our example workflow, we reject orders if their credit number is less than 3. We want to monitor rejected work items with a high order amount—greater than 5000, and display an alert if there are more than three rejected high amount work items.

NOTE  Before you continue with this example, be sure that you have completed the following steps:

  1. Set up the data stream using the procedure in BAM example - data source setup.
  2. Specify the Context for the Location dimension. See BAM example - Sum and average Amount by Location.

Define the BAM event, view, and cube in FileNet Application Workbench

  1. Log on to FileNet Application Workbench.
  2. On the Application Workbench tab, click the Events folder, then click New Event.
    1. Select Single Event, and click Continue.
    2. Select JDBC, and click Continue.
    3. In the New Event dialog box, enter the following query into the Query box.

      (You can copy and paste it from this topic.)

      select f.DMWorkItem_key, w.WobNum, f.VMAE_Amount, 1 as RejectedHiAmount
      from F_DMWIP f, D_DMWorkItem w, D_DMQueueOp q
      where VMAE_Amount > 5000
        and f.DMWorkItem_key=w.DMWorkItem_key
        and f.DMOperation_key=q.DMOperation_key
        and q.QueueName='Notify'

    4. Click Continue.
    5. Enter a name for the event: Work Item Amount Threshold Event.

      Set poll interval to 300 seconds. Click Save Event.

      CAUTION  If you create a new event, you must modify the XML source for that event in order for the system to properly calculate the values returned from the query. See Enable "Clear State" for instructions.

  3. Click the Contexts folder and confirm that it contains Location_Context. (If not, see BAM example - Sum and average Amount by Location for instructions.)
  4. Click the Views folder, then click New View.
    1. Select Work Item Amount Threshold Event as the base of the new view. Click Next.
    2. For Context, click OK—do not add additional contexts for the view.
    3. Enter a name: Work Item Amount Threshold View.
    4. Drag the RejectedHiAmount field from the Work Set into the Fields area.

      Edit the Field Expression to add SUM at the beginning, as follows:

      sum("Work Item Amount Threshold Event".RejectedHiAmount)

    5. From Clause should contain the name of the threshold event.
    6. Click Save View.
  5. Click the Dimensions folder. Confirm that it contains Location_dimension.
  6. We can use Business Activities to create an alert that prompts a specific user if the number of rejected high amount work items exceeds a certain number.

    Click the Scenario Modeler tab.

  7. Under System Objects, click Business Activities, then click New Business Activity.

    If there are no existing folders under Business Activities, enter a name for a Business Activity Folder: Work Item Amount Thresholds.

  8. Under Business Activities, click the new Work Item Amount Thresholds folder, then click New Scenario.
    1. Scenario Name: Rejected Hi Amount Scenario.
    2. Default View: Work Item Amount Threshold View.
    3. Click OK.
  9. Under Business Activities, select Rejected Hi Amount Scenario, then click the Rules tab.
    1. Click New Rule.
    2. Rule Name: Rejected Hi Amount Rule
    3. Condition: RejectedHiAmount > 3.
  10. To create an alert that displays when the rule condition has been met, click Choose on the Basic tab, then click Create Alert.
    1. Alert Name: Rejected Hi Amount Alert
    2. Click Add/Remove (Subscribers), then select a user name—probably system.
    3. Enter a Subject: More than 3 rejected work items with Amount > 5000.
    4. Click Save, then click OK to close the Alert window.
    5. Click the Advanced tab, then select a type of action: Send an alert one time (until reset).
    6. Click Finish Rule.
  11. This completes the setup tasks in Application Workbench.

Configure the dashboard objects to display the data from Work Item Amount Threshold View.

  1. Log on to FileNet Operational Dashboard.
  2. Under Navigation Tree, select Dashboard Objects.
  3. Click the Dashboard Objects folder, then click Create Object.
    1. For the data source, select Work Item Amount Threshold View. Click Continue.
    2. Select display type Indicator, subtype Speedometer. Click Continue.
    3. For indicator value, select RejectedHiAmount.
    4. For indicator category, select No Categories. Click Continue.
    5. Enter a name for this object: Work Item (rejected) Amount > 5000. Click Save.
  4. Under Navigation Tree, click Dashboards.
    1. Select Work Items, then click Edit Dashboard and select Edit Dashboard Content.
    2. Select Work Item (rejected) Amount > 5000. Click Continue. Click Save.
  5. You can now monitor your rejected work items with high amount values.

    If you don't have any work items in your speedometer, open FileNet P8 Workplace Tasks, and check that you have completed some work items in your Inbox (the CheckCredit step) so that they will proceed to either the PackShip queue or the Notify queue.

    If you have work items in the Notify queue, open them and check the value of data field Amount—it must be over 5000 to appear in the speedometer. Don't complete the steps in the Notify queue.