I need to use a try/catch (attached image). Inside the first branch (affected by a possible error) there is an "edit variable node" with a replace of a global variable. If the global variable exist there are no problems but if the global variable doesn't exist the workflow doesn't continue with the second branch.

Anyone can help me?


You can test for the existence of a flow variable inside the "Java Edit Variable" node with the function flowVariableExists(name). Maybe that helps with your problem.

Thanks this is a solution but why my method doesn't work?

Your method doesn't work =(

Is there an error in my screenshot?

Ok it works.

Inside the branch of the FlowVariableExist you must access the variable through getFlowVariable