Troubleshooting Oracle Workflow
While working on any project that involves configuring new approval rules or troubleshooting issues with existing one, the lack of a direct way to print log messages that can guide us in the right direction can be frustrating. In this article, we will learn a few simple techniques that can help us overcome this problem. (If you have just started your journey in the filed approval management, we recommend you to go through this article » Learn Oracle Cloud Approval Management (BPM & Transaction Console) with examples.)
Firstly, let’s delve into one of the most effective techniques to print log messages that can help guide us in the right direction.
1. Fetch Transaction Details Report
To run fetch transaction details reports, we need to follow below steps, which will print detailed log message at the end.
1.1. Get Transaction ID
Before running this report, you’ll need to obtain the transaction ID for the approval rule that has failed and you’re trying to debug. To do this, go to Tools » Transaction Console, and search for the relevant transaction. Click on the transaction to view its details, and you’ll find the transaction ID at the top of the page. In this example, the transaction ID is: 300000992596151.
1.2. Run Diagnostics Test
Click on your profile picture (the one you click to sign-out from oracle application) and from the panel click on the link Run Diagnostics Test, which is available under Troubleshooting.
This will take you to Diagnostic Dashboard page. On this page, enter the test name as “Fetch Transaction Details” and click on Search button. From the search result, click on the checkbox against test name and then click on the button Add to Run.
In the same page, navigate to the Run Test section and click the warning icon labeled Required Input Value Missing. This action will bring up a new pop-up window where you can enter the transaction ID obtained in the previous step. Once entered, click ‘OK‘ to dismiss the pop-up and return to the Diagnostic Dashboard.
In the Run Tests section, click on the Run button, which will bring up a confirmation dialogue box Test Run Submitted. Click on OK button to dismiss the dialogue box
1.3. Fetch Diagnostics Test
While you are still on the Diagnostic Dashboard page, scroll below to Run Status section and click on the refresh button and wait for the Execution Status to change Completed. This process doesn’t take long to finish but you can click on the refresh button again until the status is updated to Completed.
Once Execution Status changes to Completed, click on the Report icon, which will open a new browser tab. On this new tab, scroll below to the Executions section. Click on the hyperlink shown under the column Execution ID.
This will refresh the same tab again and you will see the revised page titled as Fetch Transaction Details. If you scroll down to this page, you will find a hyperlink which says “Transaction Details Report”. Click on this hyperlink, which will download a file “TransactionReport.html” file.
1.3. Read Transaction Report
Open the downloaded file (.html extension) using your browser. You will see different sections in this file. Here is the short description of each section and how can you use them in debugging your approval configuration.
1.3.1 Transaction Details
This section gives some basic information about the transaction like flow name (approval process name), Requestor (who generated this report), Status Category etc.
1.3.2 Composite Faults
This section tells on a high level what caused approval transaction to fail. Read the log message and try to unlock the message system it trying to deliver. Most of the time its full of jargon but some time you could be lucky.
1.3.3 Audit Trail
In most of the case, this section is not much useful so you can safely ignore.
1.3.3 Rules Evaluated For This Transaction
This section is critical as it provides you with the name of the rule that was triggered. It’s essential to know which rule was triggered during the runtime, especially if you have multiple rules configured for the approval process. This information can help guide you in the right direction, indicating whether the expected rule was executed or something else.
At times, you may come across a message that reads “None of the rules got triggered for this transaction. Please check the error details.” This message implies that none of the rules that you have configured were met for this transaction. Consequently, no approvers were identified for your transaction.
1.3.4 Rule Configuration
This is another critical section and you should pay highest attention here. It will list down all the rules you have configured in separate boxes and the rule which got triggered will be highlighted in yellow.
In each rule box you will have following sections
- Rule Name : This will fetch the exact rule name from your configuration.
- Active: If the rule is active it will fetch TRUE otherwise FALSE. By seeing this message, ensure that your rule is in correct state.
- Rule Condition : It will display the rule condition you have used inside the rule.
- Values : This is important. It will fetch the run time value of each variable you have used in the rule. For example you have based your condition on the basis or marital status of an employee and used a payload “Task.payload.Current Person LegislativeInfo.result.MaritalStatus”, you can see what is the run time value of this payload. Value of all payloads used in the rule conditional will be displayed in the list. Very handy right!!
- Approval chain : In this section you will see that if the rule condition is evaluated, who will be the approves, again based on the runtime value.
2. Error Diagnostic Report
We’ve just gone through a detailed process to obtain a transaction detail report. However, there is another option that provides a similar report without the need to navigate through multiple pages. The only downside to this method is that it’s only beneficial for debugging a failed transaction and may not be effective for transactions which is in-progress. Let’s see how can we get the report for a failed transaction.
Navigate to Tools » Transaction Console » find the approval request which has failed and click on the same to open it. You will see Download link. Click on the same to down load report.
In this Error Diagnostic Report each rule will be segregated by horizontal line and Rule Component field will give run time value of each payload used in the rule condition. Other sections will be similar to Transaction Diagnostic Report.
3. Test Simulation Approach
The third approach in the troubleshooting process for approval processes is to use the Test Simulation functionality provided by Oracle. To access this feature, navigate to Tools » Transaction Console » Approval Rule, search for the name of the approval process you want to debug (e.g., ‘Change Personal Information’), and then click on the ‘Test Rules’ button. Before using this functionality, make sure that you have already submitted a transaction.
After clicking on Test Rules, you will see all the approval requests that are currently submitted for this approval process. Click on the Simulate button next to the request that you want to debug. The system will submit a process, and after a while, scroll down to the Approval Simulation Results section, where you can view the runtime value generated for some of the attributes, as well as the executed rules called by this approval request.
4. Run Delivered Notification Report.
The fourth and the final approach is very interesting and has lots of potential if you have some exposer in the technical side of the application. You can modify delivered reports to customize them and obtain desired results.
To understand it better, lets assume we have a Transfer approval request submitted with transaction id : 300000990777425 and you are trying to debug this request. Here are the steps you can follow
- Navigate to Tools » Reports and Analytics » Browse Catalog
- Navigate to folder /Shared Folder/Human Capital Management/ Workflow Notifications
- Search for the report “Transfer Report”, click on Open button’
4. When report opens, you can enter your transaction id and click on the run button to generate output. This will again help on debugging transaction as it generates run time value. You can also make a copy of the delivered report and print additional payload that you have used in the approval rule.
Conclusion
In summary, we have covered various approaches to debug approval workflows, and we hope you found them useful in identifying and resolving issues. We encourage you to try out these methods and become proficient in any one of them. If you have any other techniques or tips for troubleshooting approval configurations, please do share them with us.
For any question on this topic, please post them on hcmfolks.com