Add check for existance of currentWorkflow before trying to access its input_relationships.