Let us designate multiple targets for Check App State

It would be great if we could configure multiple targets for Check App State. A good example of its use would be after saving a record in an app, there are a number of different possible results. Currently we have to Check App State with a selector for the first possible result, wait for the timeout, do another Check App State with a selector for the second possible result, wait for the timeout, etc.

It could work very similar to a Switch. You define multiple Targets. Whichever Target it finds, it executes a specific code block. There would also need to be a default block that’s executed if none of the Targets are found within the timeout.

Totally agree Paul. I think we need this activity to manage popups in a better way.

Are there any fixes for this two and a half years later? Or a workaround that you’ve found @postwick

No change to the way the activity works. You just have to chain your Check App States together. Using the Parallel activity may work, but I’ve never tried nor figured out exactly how to do it.

Thanks for the reply.
Perhaps if you use a parallel activity, and set the condition to someVariable == true, it will break out of the parallel activity once the condition is met.

If that’s the case, you can then have 2 (or more) check app states in parallel, and set someVariable to true if the element is found. Once one of the elements are found, someVariable is true, and will break out of the parallel.

Based on the documentation here: Parallel Class (System.Activities.Statements) | Microsoft Learn

A Parallel activity operates by simultaneously scheduling each Activity in its Branches collection at the start. It completes when all of its Branches complete or when its CompletionCondition property evaluates to true .