Documentation >
MAC-PAC Reference Library >
Reference >
Common Features >
Key Concepts and Procedures >
Business Process Manager >
Business Process Manager Event Handling
Business Process Manager Event Handling
The Business Process Manager (BPM) Asynchronous Monitor program is responsible for monitoring the system for the occurrence of BPM events. When the occurrence of an event is detected, the BPM Asynchronous Monitor controls the extraction of the event information and the routing of that information to the appropriate BPM mailboxes.
The BPM Asynchronous Monitor performs these tasks by controlling the following processes performed by other programs:
· Retrieve BPM defaults
· Check for events to process
· Extract event information
· Route event information
The BPM Asynchronous Monitor is brought up each day and runs until the user-specified stop time when it automatically shuts down.
Note: To prevent performance problems, submit the BPM monitor at a lower priority than other monitors you are running.
Retrieve BPM Defaults
When the BPM Asynchronous Monitor is started, it calls the Retrieve Business Process Manager Defaults program. This program retrieves default information from Reference File category N05, including the extract frequency and monitor stop time, and returns it to the BPM Asynchronous Monitor.
Check for Events to Process
The monitor then waits the amount of time specified by the extract frequency, and when this time has passed, calls the Retrieve Next Event to Process program. This program checks the Events by Frequency and Next Date and Time to Process file for events that have an extract frequency of multiple times per day and have a next extract date and time equal to or earlier than the current time. If such events are found, the program passes the extract name and extract type code for the events to the BPM Asynchronous Monitor. If no such events are found, control passes back to the BPM Asynchronous Monitor, which waits the amount of time specified by the extract frequency retrieved from Reference File category N05 before calling the Retrieve Next Event to Process program again.
Extract Event Information
If the Retrieve Next Event to Process program finds an event extract that needs to be run, the BPM Asynchronous Monitor uses the extract name and extract type code passed from the program to run the user-created extract program or query for the event.
The user-created extract determines if the specific event has occurred. If occurrences of the event are found, the extract retrieves the appropriate information and writes it to the Extracted Data Workfile.
Route Event Information
After event information has been extracted, the BPM Asynchronous Monitor calls the Accumulate and Route Event Data program. This program reads the event information from the Extracted Data Workfile and writes it to the Extracted Master file. The program then routes the event information to the appropriate BPM mailboxes by comparing the extracted information with the values of the route based on information and the control value minimum and maximum amounts from the Event Dispatch List Master file.
The program then calculates the next extract date and time for the event type based on the event frequency code, and control passes back to the BPM Asynchronous Monitor. The monitor then waits the amount of time specified by the extract frequency retrieved from Reference File category N05 before starting the process again by calling the Retrieve Next Event to Process program.
Monitor Shutdown
When the current time reaches the monitor stop time retrieved from Reference File category N05, the BPM Asynchronous Monitor automatically shuts down. Before it does so, however, it processes all the events with a daily extract frequency. Then, if events with an extract frequency of weekly or monthly are due to be processed (based on the event type’s next extract date), it processes those events (weekly events first, then the monthly events).