cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Switch State Machine: Intermittent Behavior Problem

I have an approval workflow in which I'm using a Switch action to simulate a State Machine. There are 3 approving departments, each dept has a Case in the Switch, and each Case ends with a Do Until action (looping every 10 minutes), checking a field which is updated with the name of the next approving dept when "Submit" is selected in the approval form - e.g. during Marketing approval the Dept field is "Marketing", when Marketing approve the submission the Dept field is set to "Finance", and the Do Until is checking to see if the Dept field != "Marketing", at which point the workflow moves to the next Case in the Switch - i.e. Finance.

This worked perfectly in testing, but now we've found that of 15 live approval items, 7 have functioned correctly and 8 have skipped over the 3rd approving dept: i.e. the 2nd dept approved and then the workflow completed.

I've tried to troubleshoot by looking at the version histories of each item to determine a pattern but I don't see one. I've also looked at the Run History of a incorrect item and the Dept field was correctly set to the 3rd dept in the 2nd dept Case.

Any thoughts on how else to troubleshoot this? 

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Switch State Machine: Intermittent Behavior Problem

Hi @russthomson ,

 

Could you please share a screenshot of the configuration of your flow?

Could you please share a screenshot of the flow run history of the 8 approval items that have skipped over the 3rd approving dept?

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
New Member

Re: Switch State Machine: Intermittent Behavior Problem

Hi Alice,

 

I've attached screenshots of the Switch in the workflow and an example of one which skipped.

In the workflow I've expanded the Do Until and the Set Variable - Dept actions. In the Do Until, the SC Submit is a column which contains the name of the current Case - when someone selects Submit or Send to Market in the form, this column is updated with "BA" or "Market", so SC Submit no longer = SC, and the workflow moves on. The Set Variable - Dept is then updated with either "BA" or "Market", for the Switch to then use to direct to the next Case.

In the example of the one which skipped, the Set Variable - Dept was correctly updated with "Market" but then the workflow completed, vs routing to the Market Case.

Please let me know if you require additional information - did you want a screenshot of the Run History page too - i.e. with the Start times, Durations and Statuses?

 

Thanks

 

Russ

 

Switch - WorkflowSwitch - WorkflowExample - SkippedExample - Skipped

Highlighted
New Member

Re: Switch State Machine: Intermittent Behavior Problem

I have spoken with MF Flow support and we have determined that the Do Until action is not functioning properly. The workflows which ran correctly were ones in which the Do Until action only had to loop for hours before receiving the input to move on - the ones which did not run correctly were those in which it was waiting days for an input.

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (7,618)