Flow Designer for loop not showing all the for loop iteration results even after execution

Varun Sharma
Tera Expert

Hello experts, 

 

I've a requirement where i need to run a flow for a large number of data set , and i'm not able to see logs inside for loops as the code runs for count, 

check the screen shot , i'm not able to change the for loop counter to see other iterations, and output in them. 

Kindly guide me , in case you've faced the similar issue, or if there is some property that is blocking it . 

 

VarunSharma_0-1713947337236.png

 

Regards, 

 

Varun Sharma

 

2 ACCEPTED SOLUTIONS

James Chun
Kilo Patron

Hey @Varun Sharma,

 

Can you verify the following system property? com.snc.process_flow.reporting.iteration.lastn

Specify the number of recent iterations to report in the flow execution details. Use this property to sample a recent portion of flow logic iterations. Use a positive value to specify the number of recent iterations to display. Use the value of -1 to display all iterations. The system treats the value 0 as a value of 1.

https://docs.servicenow.com/bundle/washingtondc-build-workflows/page/administer/flow-designer/refere...

 

The value might be set to something like 1 in your instance.

 

Cheers

View solution in original post

William David
Giga Guru

I am attempting to see all of the iterations, in an iteration loop ('For Each Item in' Action step), which has only 5 iterations in its current configuration. It would seem that no matter how I configure the global Process Automation System Properties (I have tried several custom configurations of these properties), I continue to only be able to see the First and Last iteration loop. Furthermore, if I define specific System Flow Execution Settings {sys_flow_execution_setting} records, I still only get the First and Last iteration loops revealed in Execution Details records. I have created several of these records (System Flow Execution Settings {sys_flow_execution_setting}), on the triggering Flow, and on Subflows invoked by the triggering Flow, with no change in behavior of the Execution Details operational records. I still only see the First and Last iteration loops. I have tested 3 of the 4 'Reporting' levels

  1. 'Basic: Runtime states and durations only'
  2. 'Full: Action configuration and runtime values (for debugging only)'
  3. 'Trace: All values (for testing and Support only)'

I will test a few more times, focusing on observing the results when I define a System Flow Execution Settings {sys_flow_execution_setting} record that is set to the fourth reporting level of 'Off'.

 

This confounding behavior appeared only recently in Service Now Flow Designer/Workflow Studio (within the last 2 to 3 months). I used to be able to see all iteration loops, of large iteration sets (50 to 100, for example), by simply setting the appropriate global Process Automation System Properties. What has happened? This new behavior is preventing me from confirming proper operation of complex Subflow and Flow customizations that we are developing, as part of our System Testing of those customizations. This would appear to defeat one of the core reasons we decided to adopt Flows, Subflows, and Actions as our default Business Process logic in Service Now. Please help.

 

WilliamDavid_0-1723052583996.png

 

View solution in original post

12 REPLIES 12

@Varun Sharma 

Please try to create a flow execution setting record to show all the iterations.

 

In my PDI, I was able to see only first and last records in the loop.

 

So created this setting for the flow. it worked. But, please use this setting in only non-prod instances.

 

Karunakaran_0-1714038401931.png

 

i could see all the iterations

Karunakaran_1-1714038457984.png

 

 

Useful links:

https://docs.servicenow.com/bundle/washingtondc-build-workflows/page/administer/flow-designer/concep...

 

Please let me know, if you need more inputs here.

 

Thank you.

Regards,

Karunakaran.

James Chun
Kilo Patron

Hey @Varun Sharma,

 

Can you verify the following system property? com.snc.process_flow.reporting.iteration.lastn

Specify the number of recent iterations to report in the flow execution details. Use this property to sample a recent portion of flow logic iterations. Use a positive value to specify the number of recent iterations to display. Use the value of -1 to display all iterations. The system treats the value 0 as a value of 1.

https://docs.servicenow.com/bundle/washingtondc-build-workflows/page/administer/flow-designer/refere...

 

The value might be set to something like 1 in your instance.

 

Cheers

Hi @James Chun ,

 

Thanks for the property , i just read it in documentation as well. 

it works. 

thanks for taking your time to share the stuff. 

 

Regards, 


Varun Sharma

William David
Giga Guru

I am attempting to see all of the iterations, in an iteration loop ('For Each Item in' Action step), which has only 5 iterations in its current configuration. It would seem that no matter how I configure the global Process Automation System Properties (I have tried several custom configurations of these properties), I continue to only be able to see the First and Last iteration loop. Furthermore, if I define specific System Flow Execution Settings {sys_flow_execution_setting} records, I still only get the First and Last iteration loops revealed in Execution Details records. I have created several of these records (System Flow Execution Settings {sys_flow_execution_setting}), on the triggering Flow, and on Subflows invoked by the triggering Flow, with no change in behavior of the Execution Details operational records. I still only see the First and Last iteration loops. I have tested 3 of the 4 'Reporting' levels

  1. 'Basic: Runtime states and durations only'
  2. 'Full: Action configuration and runtime values (for debugging only)'
  3. 'Trace: All values (for testing and Support only)'

I will test a few more times, focusing on observing the results when I define a System Flow Execution Settings {sys_flow_execution_setting} record that is set to the fourth reporting level of 'Off'.

 

This confounding behavior appeared only recently in Service Now Flow Designer/Workflow Studio (within the last 2 to 3 months). I used to be able to see all iteration loops, of large iteration sets (50 to 100, for example), by simply setting the appropriate global Process Automation System Properties. What has happened? This new behavior is preventing me from confirming proper operation of complex Subflow and Flow customizations that we are developing, as part of our System Testing of those customizations. This would appear to defeat one of the core reasons we decided to adopt Flows, Subflows, and Actions as our default Business Process logic in Service Now. Please help.

 

WilliamDavid_0-1723052583996.png

 

After further testing, it appears that the setting configuration I was in search of was the creation of a System Flow Execution Setting {sys_flow_execution_setting} record, specifically one targeting the triggering Flow (or the invoked Subflow - there's still a bit of ambiguity here). When I created such a record, with the attribute 'Report all iterations' set to 'true' and the attribute 'Reporting' set to 'None' (or 'empty'), then I was able to view all iterations of an iteration loop, both while execution was active, and after the completion of execution.

 

WilliamDavid_0-1723052197445.png