fix(swf): wait for new events after empty decisions (#5746)

* fix(swf): wait for new events after empty decisions

Signed-off-by: Andre Kurait <akurait@amazon.com>

* fix(swf): wake senders after successful external outcomes

Signed-off-by: Andre Kurait <akurait@amazon.com>

---------

Signed-off-by: Andre Kurait <akurait@amazon.com>
This commit is contained in:
Andre Kurait authored and GitHub committed 2026-10-16 14:01:24 -04:00
1 parent 4776bfb899
commit e245dbbdd5
4 files changed
+125 -7

No files matched your search

@@ -614,7 +614,7 @@ public class SwfService implements Resettable {
applyDecisions(execution, decisions, queued, decisionEventId);
if (execution.isOpen() && (execution.isDecisionNeeded() || hasNothingPending(execution))) {
if (execution.isOpen() && execution.isDecisionNeeded()) {
execution.setDecisionNeeded(false);
scheduleDecisionTask(execution);
}
@@ -1036,6 +1036,7 @@ public class SwfService implements Resettable {
.attr("workflowExecution", Map.of("workflowId", target.getWorkflowId(),
"runId", target.getRunId()))
.attr("initiatedEventId", initiated.getEventId());
execution.setDecisionNeeded(true);
}
private void cancelExternal(SwfWorkflowExecution execution, Decision decision, long decisionEventId) {
@@ -1067,6 +1068,7 @@ public class SwfService implements Resettable {
.attr("workflowExecution", Map.of("workflowId", target.getWorkflowId(),
"runId", target.getRunId()))
.attr("initiatedEventId", initiated.getEventId());
execution.setDecisionNeeded(true);
}
private void startChild(SwfWorkflowExecution execution, Decision decision, long decisionEventId) {