|Oracle Common Application Calendar Implementation Guide|
Part Number E13405-04
This chapter covers the following topics:
If you are having difficulties using the Business Rule Monitor after implementing it, verify the following:
The Concurrent Manager is running.
Workflow background processes for all Escalation Workflows are running periodically.
Oracle Workflow is installed and correctly running.
Profile Option Business Rule Monitor Workflow Administrator is set to the Apps user ID of a valid user with the Workflow responsibility.
Profile Option Escalation: Default Level is set to a value which exists in the Define Escalation Level form.
The following suggestions are helpful when defining rules in the BRM:
The condition should not reflect an absolute state. Otherwise, the monitor will keep detecting the same objects and acting upon them; you may have repeated notifications sent.
Use reasonable check intervals. The check interval also determines the notification interval. So, if you check a rule every two minutes, notifications are sent every two minutes.
Take loop time into consideration. If the main scan cycle is set to run every ten minutes, then there is no point in setting the check frequency to two minutes.
Even in a simple rule, SQL syntax applies. You can use SQL functions, but you also have to use quotes around your character values. Also use IS NULL and IS NOT NULL instead of =NULL and <>NULL.
Verify that the view does what you intended for it to do. The simplest way to do this is to cut and paste the view definition from the Complex tab into a SQL+ session.
Check the performance of the view. Do a Select from your view. If it takes a long time to return the values, then ask a SQL expert for assistance.
Some patches for CRM Foundation require the Business Rule Monitor to be stopped before the patch can continue. You can tell if the Business Rule Monitor is running by entering the CRM Administrator responsibility and navigating to Business Rule Monitor > Business Rule Monitor - this invokes the Control Panel. The Status field will show 'Active' or 'Stopping' if the Business Rule Monitor is in a running state.
To stop the Business Rule Monitor press the 'Stop' button on the Business Rule Monitor Control Panel. Note that the workflow background process for the 'Business Rule Monitor Main Process' workflow should be running in order for the 'Stop' command to be processed.
If the Business Rule Monitor Control Panel shows a status of 'Stopping' for an unusually long period of time, this is normally caused by the workflow background process not being running at the time the 'Stop' button is pressed. To start the workflow background process perform the following steps:
Select System Administrator responsibility from the Requests menu option.
Run a Single Request.
The name is Workflow Background Process.
The item type is Business Rule Monitor Main Process
Leave min and max threshold blank.
Process deferred to Yes.
Process timeout to Yes.
Select the Schedule button.
Enter an end date and time of 15 minutes later.
Re-run every three minutes.
From Completion of the prior run, click OK.
Note that if your Business Rule Monitor main process is running every 30 minutes, for example, then you will need to extend the end time of the background process so that it is still running the next time the BRM process checks for instructions.
You then need to wait for the BRM to do its next run so that it will process the 'STOP' command, then the status should show 'Complete' and you can continue with the patch.
You should not comment out this script and continue with the patch as this will leave your system in an undefined state.
If for some reason the main BRM workflow will not process the 'STOP' command then you will need to abort the process from within the Workflow Monitor. To do this:
Find the error notification for itemkey JTFBRM and the process ID that is shown on the BRM control screen: these notifications are usually sent to the SYSADMIN user.
View the notification for this process.
At the bottom of the screen there is a poplist from where you choose what you want to happen next, select Abort.
After a short while the process should stop.
The following are frequently asked questions. Answers to these questions may help you in troubleshooting problems with the Business Rule Monitor.
Answer: In Business Rule Monitor (BRM), you have the option to select how often (in <<Interval>> Field) you want the BRM to check the rules noted in Business Rule Workbench (BRW).
In BRW, you have option to select how often (in <<Check Rule Every>>, <<Tolerate Condition For>> Fields) you want the BRM to check the rule noted here.
In Workflow background process (WBP), you have option to select how often you want to run the workflow background process.
For example, you can set five minutes as the Interval in BRM, set one minute in Check Rule Every in BRW for one of the rules AND only run the Workflow background process every DAY, then what will happen?
What is the point of reference for time in the BRM? If it is run at 12:00 PM, and started at 12:05 PM, will the BRM continue to check every five minutes until a specified time?
Answer: Be realistic when setting the time intervals as there is no cross-referencing between them, so all times are independent of each other.
In the example of having the BRM run every five minutes, the BR check every minute and the WBP run once a day, then the BRM will run once when the WBP 24-hour anniversary occurs each day. The checking of the actual BR will depend on when its WBP is next run after the BRM has run. The Workflow processes cannot do anything unless the WBP associated with that process is executed, so the timing of the BRM is dependant on when the WBP runs.
The point of reference for the BRM is when the 'Start' button was pressed in the Control screen. So if it is started at 12.00 pm to run every five minutes, then it will check at 12.00 pm, then at 12.05 pm, until the 'Stop' button is pressed OR until the WBP stops repeating. However, this is dependent on when the WBP is run for the BRM Main Process. If the WBP is run from 12.00 pm every one minute then the above will hold true. However, if it is run every two minutes then it will only check at 12.02 pm, 12:04 pm, 12:06 pm, and so forth, so the 12:05 pm run of the BRM will be delayed by a minute.
For each BR the timing is taken from when the last iteration of that BR occurred. This is affected also by the timing of the WBP for that individual BR Process, in the same way as the main BRM as explained above, plus the timing of the main BRM run and how it coincides with the timing of each BR check.
Once the conditions set in a Business Rule are met, then the notifications are sent continuously. Is this the intended functionality? Do you have the option to have a flag to indicate that only one notification should be sent?
Answer: If you choose to send a notification or create a Task, then that will happen each time the BR is checked if the condition is still true. This is as designed, you should set the BR interval to how often you want the notification to be sent. If you want to send the notification only once then you can either customize the Escalation Activity code to do that, or raise it as an Enhancement Request which will be considered for a future release.
In the BRW, you are limited to fields in the CS_BRM_3D_SERVICE_REQUEST_V view. For example, there is no problem code field in CS_BRM_3D_SERVICE_REQUEST_V. Is there an option to use fields from other tables or views?
Answer: The seeded 3D view makes available the fields that you see on the Service Request UI that are audited. You only use the fields that are audited because this is how you are able to detect how the values have changed over time. If you need additional fields then you can use the 'Complex' style of rule definition to specify these in standard SQL format.
When defining business rules, you have the ability to associate a Workflow process with each business rule. It is the Workflow process that generates the notifications.
The client can view the definition of these seeded workflow processes in the Workflow builder, however, it is not clear as to how the process determines whom the notifications should be sent to. For example, in the Workflow Builder, viewing the process definition of "Escalate a Service Request (notification only)", it has a notification activity called "Object Conformed to a Rule" which sends a notification to a role defined in the "Notification Person" item attribute.
What is the default behavior of this workflow process? What is the hierarchy of criteria that the system uses to determine who to notify?
Answer: Select the button labelled "..." which is next to the Workflow LOV. This brings up the Workflow Attributes window, and from there you can select a value for each of the attributes for that specific Workflow process. For example, for the notification workflow you can choose the Notification Role, which is the role of the (in relation to the object, i.e. Service Request) who you want the notification to go to. The options are:
Document Owner's HR Manager
Escalation Territory Primary Contact
The default setting is Business Owner, which is the owner of the Business Rule. If an individual resource cannot be identified programmatically for any reason, then the notification will always default to Business Owner.
I want to see if anything is happening for the rule I created which has six records in the database that have matched criteria. I completed all the necessary preliminary set ups to get the BRM running.
Answer: Perform the following steps.
First check that the rule will actually return the records that you think it should. Do this by going to the Complex tab in the rule definition and copy the text into SQL*Plus. If it returns rows, then the rule is fine, if not then re-examine your rule. Start simply, such as 'Task Number' = '12345'.
If rows are returned, then next look at the Workflow processes using the Workflow Monitor. Ensure that the SYSADMIN user has 'Workflow' responsibility attached, then connect to Applications as SYSADMIN through the PHP login for the instance that you are using.
Under the heading 'Self Service', click Workflow.
At the next page click View Progress.
In 'Item Type' choose the name of the Workflow process that you believe should be invoked for your rule. For example, any of the Task seeded Workflow processes would use 'Business Rule Monitor Task Process'.
Click Find. All of the Workflow processes that have been started in that instance will be displayed. Drill down into the details of each process.
If there are none, there can be a problem with the main BRM Workflow. You can look at its progress using the same method, but select Business Rule Monitor Main Process.
It could be that there is a problem with the Workflow you are using, so again it is suggested that you try the simplest case first so that you can see it working. Try using the "Escalate a Task - send a Notification" seeded Workflow and have the notification sent to the Business Rule Owner or the Document Owner.
Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.