add "when" and "choose" as a draft step

This commit is contained in:
lda
2026-05-19 06:35:47 +07:00 Verified
parent 760207038f
commit 66db83dc5a
7 changed files with 291 additions and 7 deletions
+2 -2
View File
@@ -346,7 +346,7 @@ class WorkflowBuilder:
def when(
self,
condition: Expr,
condition: CoreCondition | Expr,
*,
then: BranchRef,
otherwise: BranchRef = runtime_error,
@@ -369,7 +369,7 @@ class WorkflowBuilder:
def choose(
self,
*clauses: tuple[Expr, BranchRef],
*clauses: tuple[CoreCondition | Expr, BranchRef],
default: BranchRef = runtime_error,
id: str | None = None,
) -> DecisionResult: