You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Let edge conditions read workflow state set by earlier executors #9450
An edge condition is called with the message data only. It gets no WorkflowContext and no way to read workflow state. So a condition can't route on a value that an earlier executor saved with ctx.set_state(...)
Use Case and Evidence
a ──► b (asks the user for the priority) ──(role == "l1")──► c
└─(role == "l2")──► d
a reads the user's message, works out the role (l1 or l2), saves it with ctx.set_state("role", ...), and sends on only the text.
b asks the user for the priority with request_info and waits. The answer comes in the next Teams message.
The b → c and b → d edges should pick the next executor by the role that a saved.
The conditions on b → c and b → d only get b's message (the text). They can't see role.
Desired Outcome
An edge condition (and a switch-case condition) can read the workflow state that earlier executors saved.
Alternatives Considered
Reading the state variables from the checkpoint by making a database call to load the checkpoint for every edge condition. This results in multiple database calls for each edge.
Proposed Direction
No response
Scope and Non-Goals
No response
Language
Both
Contribution Intent
I am willing to implement this
Acknowledgements
I searched existing issues and did not find a duplicate.
I will wait for explicit maintainer agreement before starting implementation of a non-trivial change.
Activity