Check App State - Toggle Branches Error

Hi guys!

I’ve started working more with Modern UI activities recently and was confused about the functionality of the Check App State activity’s “Toggle branches” button. Here’s what the documentation for the activity says:

“Click Toggle branches in the body of the activity to configure the visibility of the Target appears and Target does not appear containers”

This indicates that the “Toggle branches” button changes the VISIBILITY of the two containers, which makes sense. In practice, however, I’ve found that the button toggles not just the visibility but also the FUNCTIONALITY of the branches. So, if I have activities in a branch that isn’t visible, that branch won’t run even if its conditions are met.

I found the following forum post in which this is stated to be an intended feature of the Check App State activity: Check app state toggle branches error - Feedback / Activities - UiPath Community Forum. However, the rationale behind the feature is not described. Why would I ever want to toggle functionality for one or both of my branches? If I didn’t want to use a certain branch, but still wanted to preserve the activities, I would just comment it out. Additionally, why does the documentation for the activity indicate that it’s a visibility toggle and not a functionality toggle? Am I misunderstanding something about the activity, or is this a bug?

Thanks again!

@calebtatkins for me it was unclear too.

I agree that should be corrected in documentation. The idea of ignoring activities in hidden branch has benefits - it helps in Code Review. It means that developer would not hide something inside this activity that would be skipped while code review or when you need to maintain the code.

But devloper should be informed about this in documentation and possibly in some hints inside Studio.

Because you only need to do something if it does or does not appear (or disappear).