Fix workflow bug "Local variable 'value' referenced before assignment"
In lines 862-892 the local variable "value" is getting assigned in the "if..else.." statement. But there is a path that leaves the "value" unassigned, hence raising UnboundLocalError error. I think we either should define a default value for the "value" variable, or make sure that there is no path that could leave the "value" unassigned. I'm not familiar with the code, so my suggestion might be wrong. @klaus , @jerome can you please check?