Idea Summary
Currently, it's only possible to determine if an Automation is running, but not much else. It would be nice to have built-in support for tracking an Automation's progress. This would mainly apply to Automations with a Query source type. A general improvement would be if the Automation logging procedures where autonomous so the execution log could be queried in real-time.
Use Case
Display a progress bar in the UI, or report of all running Automations with a status or completion percentage.
Preferred Solution (Optional)
Some ideas, these could be used independently to track progress.
- Add a new bind variable for total row count, like APEX$AUTOMATION_ROW_COUNT that holds the total row count selected in the Query source. (For performance this would have to be enabled in the automation just like other APEX components that support a row count)
- Make the apex_automation.log_x procedures Autonomous so that log content can be queried while the automation is still running. Currently we have to create our own autonomous logging procedure to do that. You should immediately see a row added to the Execution Log when an Automation is started with a status of “In Progress.”
- Tap into DBMS_APPLICATION_INFO to track progress.There are two approaches here, one with SET_SESSION_LONGOPS and the other with SET_MODULE, SET_ACTION, and SET_CLIENT_INFO. For effective use, SET_SESSION_LONGOPS requires knowing the total work that needs to be done and progress, so it may not apply in all cases.
For example, the total row count could be passed to the totalwork param in SET_SESSION_LONGOPS and sofar would be increased with each processed row. SET_MODULE could be used to set the Automation name and sessionid and SET_ACTION could be used to set the name of each Automation Action as it runs.
- Ideally there would be a view or some other way to pass a progress percentage or other numeric value and a short status message (or current action name) in a way that can be used with something like the FOS Progress Bar plug-in: https://fos.world/ords/f?p=10000:4040:::NO:::