Variable value change in the catch blcok

I have an “if element exists activity” and based on its response i have to make an exception or continue certain activities.
In the process the response of the “if element exists activity” is TRUE.
When i want to use it in the catch, it turns to be FALSE.
I don’t understand why the value changes.
Can anyone help me.
(i’m using REFramework, i put the result variable of the activity as in_out argument and in the catch block as a variable)
Thank you in advance

check the scope of the variables and there are not duplicated variables with the same name residing in different scopes

Hi @Dhouha_Cherif,

Looks like its value is being replaced somewhere on the go. If you can share more details or screenshots on the flow, would be able to help better.

Regards
Sonali

As pointed by Peter, you need to check the scope of your variable. In case you are passing it somewhere check if you are assigning it properly.

The default value for a Boolean type is false. So if you are not setting/passing with proper scope it will be set to false.

these ares some screenshots to explain better.
This is where i put the throw activity.
The result of the “element exists” is stored in a variable called “ValidationErrorExists”.


This is the catch block

the “validationErrorExists” variable turns to be False in the catch block.

The variable is declared as a in_out Arg in the process file.

the scope of the variable is “General business Process”

Is your last screenshot arguments of process workflow, pls try after making it in/out in direction. And debug it while keeping your arguments and variables in Watch (find in Locals and right click then add to watch) to see at where its not passed.
If you fail to set it properly the default value of False would be set.