Harden flow advancement exit assertions

This commit is contained in:
2026-05-23 16:41:21 +02:00
parent 72a0950a35
commit d4e2c1a461
4 changed files with 82 additions and 2 deletions

View File

@@ -69,7 +69,13 @@ class FlowEngine:
)
]
evaluator = AssertionEvaluator(custom_ops=self.custom_ops)
failed = self._failed_assertions(workstation.entry_assertions, obj, evaluator)
current_name = str(obj.get("workstation") or obj.get("status") or "")
failed: list[AssertionResult] = []
if target_workstation != current_name:
current = flow.workstation(current_name)
if current is not None:
failed.extend(self._failed_assertions(current.exit_assertions, obj, evaluator))
failed.extend(self._failed_assertions(workstation.entry_assertions, obj, evaluator))
return not failed, failed
@staticmethod