'If this workflow is not attached to stored workflow directly,
recursively grab its parents until it is the top level workflow
which must have a stored workflow associated with it.'

@property
def top_level_workflow(self):

    top_level_workflow = self
    if (self.stored_workflow is None):
        assert (len(self.parent_workflow_steps) == 1)
        return self.parent_workflow_steps[0].workflow.top_level_workflow
    return top_level_workflow
