Replies: 3 comments 8 replies
-
Beta Was this translation helpful? Give feedback.
-
Just to confirm, in the history you still see the “waitUntil” activity executed but it just got unblocked immediately because of existing message in the channel (due to duplicate publishing). Is that correct? if so, here is the explanation: A Signal(or internal) channel and their messages belong to the whole workflow execution, not for a particular state or state execution. even you only have a single state waits for the channel, the remaining messages will stay in the channel for future consumption. I guess your expectation is that, when state B waits for the channel, it will take all messages, clearing the channel so that next time it will wait for new messages. Ideally, the waitUntil command should let you wait And take all available messages. This is not supported yet in this ticket #301 the ticket also suggests a workaround by using anyCommandCombination feature It’s a pretty good use case for this ticket ! Thanks for sharing that. We probably should build that feature (it’s a pretty small one IMO) Hope it helps . And thanks for using iWF. |
Beta Was this translation helpful? Give feedback.
-
yes, that's correct.
yes, i expect that way.
i dont think anyCommandCombination feature will solve my issue, because i dont know for sure how many time the unexpected signal will be fired. And it is using the same channel name.
There might be duplicate signal D or E, so i cant tracked or differentiate using channel name
There should be only one sender, but there is a chance that sender hit the function again multiple time before my status got updated. In the happy flow, that status should prevent the signaling process.
How i drained / dumped all unprocessed messages ? because that duplicate signal shouldnt be processed at all. Thanks for your explanation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, i'm trying to debug some unexpected behaviour in the running workflow.
Workflow simplified flow :
Workflow A has state B and C. State B wait for signal D and State C wait for signal E.
If state B received a signal it will process some data and move to state C.
if state C received a signal it will process some data and move to state B.
the flow will go back and forth between these two state before the workflow finish.
there is an unexpected case where state B is signaled more than one signal D. The state move properly to next state (state C), but after state C completed the task and move to state B again, state B will directly processed the data without waiting the signal first like it should.
why this behaviour happen ?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions