"Conditional Activity" with only "Then"




Creating If only activity
Creating If only activity

Hi @Robson_Fernando

May I ask for some more details about this? An use case maybe? Currently you can leave the Else box empty and it will work like you proposed.



It’s more related to code clean and organized. It leaves the “else” in blank waste the limited space that I can see on the screen. It’s all about User Experience and clean code.

It’s the same case for Keep Acitvity Panel Size


I was just now looking for such activity :slight_smile:


When we need to execute a block if a condition matches else need to skip it, as of now, we still use the one activity that is there in UI Path. This serves the purpose. But this activity will check the else part as well even though it’s not necessary for the flow. This includes an execution time.
It will be good if a if-only activity is added into the activity list.


Hi @Madhavi

I am not sure I understand. If you are 100% certain that your condition will always return True, then you don’t need an IF condition at all.

Also, I think Else is only executed when the condition evaluates as False. At the very last, it serves as the perfect place to throw an exception if you need to be 100% sure that Then is always executed.


I suppose @Madhavi means this "Conditional Activity" with only "Then" :slight_smile:


I see… I still don’t get the point :smiley: Wouldn’t you always want to log the exception when something is not as you expect it?

Either way, I’ll merge your topic with the older one to keep the discussion together :slight_smile:


Actually, it’s one null check difference -> see source here (lines 85-98). If activity hasn’t been changed in ages, so even though it’s newer source it’s still the same.
There is also a refactoring consideration - if at some point in the future you will need the Else branch, you can’t just fill it in, you have to recreate this part using the original If implementation.
It’s UiPath’s call, but I’d say this one is probably not worth it.


More to the actual point though, ‘related to code clean and organized’
i agree some big efficiency gains if we can standardize the size of the activity block in workflow/diagram ui.

the varying sizes of the activity blocks in the workflow is very messy and the inability to resize is limiting / causes restraints on comparing code / reviewing / just plain looking at it.