code: def serialize_workflow(self):
          
          self.workflow.refresh_waiting_tasks()
          return CompactWorkflowSerializer().serialize_workflow(self.workflow,
                                                                include_spec=False)
docs: Serializes the current WF.
  
          Returns:
              WF state data.