Archiving, Summary Statistics and Log Purging #578
Unanswered
rallen2010
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been working on a group of functionality that is "Audit & Logging Phase 2" and comprises several individual features that can be assembled to form a feature for in Flows for APEX v23.1. I'm looking for advice and requirements for how to put these together.
What we have now (in v22.2)
Way back in 21.1 ( I think) we added Logging and Auditing Phase 1. This added:
flow_flow_event_log
to record changes to models and their meta-data (which we haven't used yet!)flow_instance_event_log
to record important events in a process instance, like instance creation, start, reset, completion, termination, errors, etc.flow_step_event_log
which contains one row for each completed instance step, containing timestamps for step becoming current, work starting, step completion, reservation, priority, due date, etc.flow_variable_event_log
, which records the value of a process variable every time it is set.As we were short of time, we didn't provide any built-in mechanisms for managing these logs, for archiving them, or purging them. And we didn't do much with them. That was left for a future release....
What do we want to provide next?
We now want to take this all a few steps further, in the following directions:
logging_archive_instance_summaries
= "TRUE" or "FALSE" (default: false).instance_archive_destination
to contain a JSON snippet specifying the archive location, as follows:flow_instance_stats
and Step Eventsflow_step_stats
. Instance Duration, Step Duration, and Step Waiting Times should be help with quartile, median, and max information in the summaries. (MUST)create_log_summary
procedure which can be called from APEX Automations after midnight each day to generate daily summaries, a Month To Date summary for the current month, and to create monthly and quarterly summaries as required on the appropriate days. (MUST)flow_admin_api
package to contain admin functions to be called from outside Flows for APEX.Pulling This Functionality Together - Intended Operation
Automation Jobs
Daily Instance Archiver
archive_all_instance_logs
set totrue
), a daily job should create an instance archive documents for eachcompleted
orterminated
process instance, and store it in the specified location (i.e., archive table or OCI Object Storage bucket).flow_processes.prcs_archived_ts
column if successful.flow_api_pkg.delete_process
is called on an instance that has not yet been archived on a 'secure' site, then theflow_api_pkg.delete_process
will archive the instance before deleting it. This is a low frequency event , but on a secure installation, this might be important as it prevents a user from performing a workflow that ends up being non-accountable as it would not appear in the archives.Daily Stats Generator
Log Purging
It is envisioned that the instance, step, and variable logs will be retained for some period of time - maybe 30,90, or 365 days, depending on customer business requirements - but will eventually be purged. The retention period, specified as the number of days since the process instance was completed (with
completed
orterminated
status), is stored in the system configuration parameterlogging_retain_logs_after_prcs_completion_days
. A routine will be provided that can be scheduled from an APEX Automation to periodically purge log records for process instances exceeding this age. If a site hasarchive_all_instance_logs
set totrue
, the purge routine checks that instances are recorded as having been archived.Stats Purge
Statistics will also be purged when the exceed configured ages. Thes are specified using the following configuration parameters:
stats_retain_daily_summaries_days
- Unit Daysstats_retain_monthly_summaries_months
- Unit Monthsstats_retain_quarerly_summaries_months
- Unit MonthsComments please...
Beta Was this translation helpful? Give feedback.
All reactions