Fix error when analyses with dependencies are submitted in a WS

NameError: global name 'workflow' is not defined