Testing and debugging a calculation
There are several areas to review when testing and debugging a calculation:
- Accuracy
Does the calculation run without errors and update the correct fields?
Are the values in the updated fields correct?
- Interaction in a Task View
Is the user interaction in a Task View working as you expect?
- Applicability
Are the correct objects subject to the calculation?
- Conditions on the input field
Are the correct objects subject to the calculation?
- Errors
What error messages are issued? How can you use them to guide you to a resolution?
Errors for the current session display as notifications.
System Fields:Comment) in
calculations.Performance
How you design your calculation can affect the overall performance of OpenPages®. For more information about designing calculations for better performance, see Understand how the design of the calculation can affect performance.
Accuracy
Test the calculation by running it is an administrator.
- Monitor the In Queue, Next in Queue, and Error Count columns in the Calculation List. Refresh the screen to display the latest information as the calculation progresses.
- Review the email that you received as the administrator who ran the calculation. The email lists all the objects that failed. Open those objects and review the error messages that are saved on the objects themselves.
Interaction in a Creation View and a Task View
Test the calculation by creating an object with a Creation View. Then, test it in a Task View that users work with. When users are working on a Task View and add or change the value of a field that is an input field for a calculation, the calculation runs and the set fields are updated. If an error is encountered, an error message displays as the user is working. Verify the contents of the Task View and that the correct fields display. Be prepared to support users when they encounter errors and resolve the problems.
Applicability
Test that the correct objects are subject to the calculation. Review how the Applicability is defined on the calculation and test it thoroughly.
Conditions on input fields
Test that the correct objects are subject to the calculation. Review how conditions are defined on input fields in the calculation and test them thoroughly.
Error messages
When a calculation encounters a problem, an error message is saved on the object. The error message is cleared after the problem is resolved.
Error messages are assigned a unique ID so that you can match what happened in the UI with the
stack trace in the aurora log file. For example, if the system issues an error,
UJA0J1RX75PA-OP-11604, search for UJA0J1RX75PA in the log file.
The descriptive text can also guide you to a solution.
If you get an error message Insufficient information, check that the calculation
contains an if exist/then/else statement. This error can occur if the statement has
no else statement, meaning that there is no default if none of the conditions are
met.