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:
- Set up the data stream using the procedure in BAM
example - data source setup.
- 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
- Log on to FileNet Application Workbench.
- On the Application Workbench tab, click the Events
folder. Click New Event.
- Select Single Event. Click Continue.
- Select JDBC. Click Continue.
- 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'
- Click Continue.
- Enter a name for the event: Work Item
Amount Threshold Event.
On the Polling tab, set the poll interval to 300
seconds.
Click the Clear State Interval
tab. Select Always Clear State (Every Event).
(For work in progress, you generally want the current
value of items in the queues—you don't want to add the current
value detected at each polling interval to the previous value.)
-
Click Save Event.
- Click the Contexts folder and confirm that
it contains Location_Context. (If not,
see BAM example - Sum and average
Amount by Location for instructions.)
- Click the Views folder. Click New
View.
- Select Work Item Amount Threshold Event
as the base of the new view. Click Next.
- For Context, click OK—do not add
additional contexts for the view.
- Enter a name: Work Item Amount Threshold
View.
- 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)
- From Clause should contain the name of the threshold event.
- Click Save View.
- Click the Dimensions folder. Confirm that
it contains Location_dimension.
- Click the Scenario Modeler tab to create
an alert that prompts a specific user if the number of rejected high amount
work items exceeds a certain number.
- Under System Objects, click Business Activities. 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.
- Under Business Activities, click the new Work
Item Amount Thresholds folder. Click New
Scenario.
- Scenario Name: Rejected Hi Amount Scenario.
- Default View: Work Item Amount Threshold
View.
- Click OK.
- Under Business Activities, select Rejected
Hi Amount Scenario. Click the Rules
tab.
- Click New Rule.
- Rule Name: Rejected Hi Amount Rule
- Condition: RejectedHiAmount > 3.
- To create an alert that displays when the rule condition has been met, click
Choose on the Basic tab and click Create
Alert.
- Alert Name: Rejected Hi Amount Alert
- Click Add/Remove (Subscribers). Select a user name—probably system.
- Enter a Subject: More than 3 rejected
work items with Amount > 5000.
- Click Save. Click OK
to close the Alert window.
- Click the Advanced tab. Select a
type of action: Send an alert one time
(until reset).
- Click Finish Rule.
- This completes the setup tasks in Application Workbench.
Configure the dashboard objects to display the data from
Work Item Amount Threshold View.
- Log on to FileNet Operational Dashboard.
- Under Navigation Tree, select Dashboard Objects and click the Dashboard Object folder.
- Click Create Object.
- For the data source, select Work Item
Amount Threshold View. Click Continue.
- Select display type Indicator,
subtype Speedometer. Click Continue.
- For indicator value, select RejectedHiAmount.
- For indicator category, select No Categories.
Click Continue.
- Enter a name for this object: Work Item
(rejected) Amount > 5000. Click Save.
- Under Navigation Tree, click Dashboards.
- Select Work Items, then click
Edit Dashboard and select Edit
Dashboard Content.
- Select Work Item (rejected) Amount >
5000. Click Continue. Click Save.
- You can now monitor rejected work items with high amount values.
If you don't have any work items in the 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.