The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Lisa Holenstein
ServiceNow Employee
ServiceNow Employee

Workflow Automation CoE > FlowsBest Practices > Logging and Reporting

 

Flows Best Practices Logging and Reporting

Check out this Workflow Academy video on Flow and Action Error Handling for detailed instructions on how to use Try and Go back to flow logic, error handler, action error evaluation, etc.

 

Flow Execution Details generate a great amount of reporting data. This should be considered debug information used at development (in non-production) only, and enabled in production only for troubleshooting or in very low-volume use cases.
The reporting level determines what if any information is saved in the flow execution details. If a flow runs while reporting is off, execution details are not available for the flow. If the reporting level changes, future executions will honor the new reporting level.

  • If a flow runs while reporting is activated, execution details are for the flow based on the reporting level.
  • Flow and Action reporting can be enabled on a Flow and Action level basis.
  • Flow execution details are aggressively purged from the system to save on diskspace, if you require longer term reporting, either write key metrics to a record, or create a Performance Analytics report to summarize and aggregate your reporting details.
  • The reporting level has no effect on context and log records.
  • Note: QuickAPI runs a flow, subflow, action, or Data Stream action from a server-side script synchronously or asynchronously without creating a flow context, execution details, or other related records.
    - Improves performance by eliminating record-keeping overhead.
    - Use this API to increase the speed of high-volume processing, for example multiple executions per second, in a production environment.
    - No record will exist for the execution attempt or details. Any record keeping will be the duty of the calling method, or as an operation of the flow (for example, using the Log action to write a message to the system log).
    Any operation that causes additional write to the ServiceNow database, results in performance impact. As a best practice, limit the number of database writes when possible, to ensure optimal performance of your instance.
  • Flow Designer Property: com.snc.process_flow.reporting.level (Default value: Off).
  • Keeping reporting OFF on production instance improve flow performance.
  • Even with default reporting off, you can opt-in per Flow / Action reporting.
  • Logs are still available.
  • Testing a flow via Test Button produces execution details.
    Flow Reporting options:
  • Off: Reporting is deactivated. The system generates execution details only when you test a flow.
  • Flows Only: Reporting is activated for all flows and subflows.
  • (Default pre-Rome) Flows and Actions: Reporting is activated for all flows, subflows, and actions.
  • Flows Actions and Steps: Reporting is activated for all flows, subflows, actions, and custom action steps.
  • Developer Trace: Reporting is activated for all flows, subflows, actions, and steps (custom and base system).

 

Center of Excellence Navigation

  1. Workflow Automation - Center of Excellence
  2. Workflow Automation Migration Considerations
  3. What's new for Workflow Automation?
  4. Resource Hubs
    1. Flows
    2. Decision Tables
    3. Playbooks
  5. FAQ
  6. Training
  7. Workflow Academy
Comments
coribello
Tera Contributor

Hello,

 

I'm trying to figure out where I can view logs created by the Log action. I submitted the following post: 

Flow Designer Log Action - Where can I view the lo... - ServiceNow Community

 

Are you able to help with this?

 

Thanks.

Lisa Holenstein
ServiceNow Employee
ServiceNow Employee

Hi @coribello ,

 

The Log action logs a message in the Flow Designer log table sys_flow_log.

https://docs.servicenow.com/csh?version=latest&topicname=log-message-flow-designer

 

 



Have questions about Workflow Automation? Check out the Workflow Academy video series or the Workflow Automation - Center of Excellence

Tanmay Baranwal
Tera Contributor

Hello,

I am trying to figure out how we can set the log level to INFO for a specific flow, and not from the sys property: 

com.glide.hub.flow_engine.listener_trace.threshold

 

I need other flows to continue replicate logs at error level, but for one specific flow, I need logs at INFO/WARN level in action and in flow calling that action

Lisa Holenstein
ServiceNow Employee
ServiceNow Employee

@Tanmay Baranwal You can set specific flow logging levels per flow that will override the global flow reporting settings.

Version history
Last update:
‎08-12-2024 03:14 AM
Updated by:
Contributors