Пример #1
0
 def run(self, workflow: Workflow) -> None:
     try:
         # Run the specified workflow with the context of the parent workflow
         workflow.composition.get_workflow(workflow.env, self._workflow).run()
     except KeyError:
         raise errors.UnknownItem(
             f"workflow in {workflow.composition.name}",
             self._workflow,
             (w for w in workflow.composition.workflows),
         )
 def named(cls, name: str) -> Type["WorkflowStep"]:
     try:
         return cls._steps[name]
     except KeyError:
         raise errors.UnknownItem("step", name, list(cls._steps))