How To Debugg Custom Rules for Common Events
Common Events are the main mechanism for executing custom logic in DCM. There are multiple ways to debug these custom rules.
Here we show the use of two Monitoring tools: System Monitoring and Queue Monitoring
Analyzing input parameters for SQL functions
Custom rules usually have an INPUT parameter that is an XML string with context. For example, the Common Event for "Create Case" passes in an XML of any MDM data as well as other basic info about the Case.
There is a function called f_DAF_logEventFn that allows you to send to the log table (TBL_UTIL_LOG ). You can add it to your custom rules code, this function will record this context information into the system log. This entry in the log is viewable either on the History tab on the Case or Task detail page or under the DCM Setup → Monitoring → System Monitor menu as is shown below.
Analyzing input parameters for a C# rule
Any rule that is not a SQL Function will be executed through the AppBase Queue. You can see the results for the execution of the rule under the Queue Monitor log on the DCM Setup → Monitoring → Queue Monitor menu.
Logs view on History tab.
Logs view on System Monitor menu.
Logs view on Queue Monitor menu.
Analyzing input parameters for other SQL non-function rule
Any rule that is not a SQL Function will be executed through the AppBase Queue. You can see the results for the execution of the rule under the Queue Monitor log on the DCM Setup → Monitoring → Queue Monitor menu.
Logs view on History tab.
Logs view on System Monitor menu.
Logs view on Queue Monitor menu.
Catching errors in SQL functions
If there is an issue when executing a SQL function, the error description will show up in the History tab on the Case or Task detail page.
Logs view on System Monitor menu.
Catching incorrect parameters in SQL functions
If there is an issue with the input parameter, the error description will show up in the History tab on the Case or Task detail page.
Logs view on System Monitor menu.
Modify Common Event with broken SQL function
If you try to add a Common Event using a broken SQL function, you will get an error message when trying to save it due to the backend validation.