Runtime Messages

Use the Runtime Messages page, also known as the diagnostic dashboard, to view the diagnostic messages your scripts have written to the log. Use these diagnostic messages to assist with debugging your scripts.

On the Runtime Messages page, click the Get Latest Log Messages button to retrieve the latest Groovy script messages from the log file.

Runtime messages are diagnostic messages that you add to your script. They're useful for debugging your scripts if an error occurs.
Note: You can debug triggers by evaluating runtime messages. However, if you're using object workflows with Groovy scripts, then you can't use runtime messages to debug them.

To access the Runtime Messages page in Application Composer, go to the Common Tasks pane (on the bottom-left side), then click Run Time Messages. You must be in an active sandbox to perform this action.

Runtime messages are user-specific. Only you can see the messages that you create.

Note: The maximum limit for runtime messages in a sandbox is 250.

Use a Script to Write Messages to the Log

To write messages to the diagnostic log, use the print or println function. The former writes its value without any newline character, while the latter writes its value along with a newline. For example:

// Write a diagnostic message to the log. Notice how
// convenient string substitution expressions are
println("Status = ${Status_c}")

Find Messages

To find your messages on the Runtime Messages page:

  1. In Application Composer, go to the Common Tasks pane (on the bottom-left side), then click Run Time Messages

  2. Click the Get Latest Log Messages button to retrieve the latest Groovy script messages from the log file.

Your println Groovy scripts are written to different applications depending on the UI from which they're invoked (in other words, from where your scripts are triggered).

  • If your script is triggered from the application UI, then the messages are written to Common Setup > Runtime Messages under the application that displays in the URL when you click the global Home icon: http://<host>:<port>/<application>/faces/CrmFusionHome.

    For example, if the application in the URL is Customer, then navigate to Common Setup > Runtime Messages under the Customer Center application to find your runtime messages.

  • If your script is triggered from the desktop UI, then the messages are displayed on the same Runtime Messages page, but under the actual web application from where your script was triggered.

For example, if a println Groovy script is tied to a Create Quote button which is displayed on a application UI Opportunity page, then the message will be printed in the Customer Center application's runtime messages. If the same action is displayed on the desktop UI Opportunity page, then the associated message will be printed in the sales and service application's runtime messages, since your script was triggered from the sales and service application.

To sort in reverse chronological order so you can see your most recent messages first, click the down-pointing arrow in the Time stamp column header.

Improve Performance

After testing is complete, consider removing the println function from your scripts to improve performance.

Troubleshoot the Runtime Messages Page

If you're having trouble viewing the runtime messages log, try enabling the runtime messages logging by doing the following:

  1. In the Setup and Maintenance work area, search for the Manage Profile Options task.

  2. On the Manage Profile Options page, click the New icon.

  3. On the Create Profile Option page, create a profile option with the following details:

    • Profile Option Code: ORACLE_ADF_BUSINESSEDITOR_ENABLESCRIPTLOGGING

    • Profile Display Name: ORACLE.ADF.BUSINESSEDITOR.ENABLESCRIPTLOGGING

  4. Fill all the other required fields with the relevant details.

    You can choose logging at the site level or the user level and make it updatable.

  5. Click Save and Close.

  6. Go back to the Setup and Maintenance work area and search for the Manage Administrator Profile Values task.

  7. On the Manage Administrator Profile Values page, search for the ORACLE.ADF.BUSINESSEDITOR.ENABLESCRIPTLOGGING profile option that you just created and set its value to True.

  8. Click Save and Close.

  9. Send a service request to Support with the time frame in which you want the UI server to restart.