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.
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.