Problem
Cancel only checks between nodes, not inside them. WaitNodeExecutor doing a full Thread.sleep(seconds * 1000) blocks the thread for the entire duration — a cancel request sits unprocessed until the sleep finishes.
Fix
WaitNodeExecutor sleeps in 5-second chunks, checking the cancellation flag each iteration
- Add
AutomationCancelledException (unchecked) — thrown when cancel is detected mid-node so the run ends with status CANCELLED not FAILED
Files
src/prerna/reactor/automation/nodes/WaitNodeExecutor.java
src/prerna/reactor/automation/AutomationCancelledException.java (new)
TriggerAutomationReactor.java — catch AutomationCancelledException in the dispatch loop and set run status to CANCELLED
Problem
Cancel only checks between nodes, not inside them.
WaitNodeExecutordoing a fullThread.sleep(seconds * 1000)blocks the thread for the entire duration — a cancel request sits unprocessed until the sleep finishes.Fix
WaitNodeExecutorsleeps in 5-second chunks, checking the cancellation flag each iterationAutomationCancelledException(unchecked) — thrown when cancel is detected mid-node so the run ends with statusCANCELLEDnotFAILEDFiles
src/prerna/reactor/automation/nodes/WaitNodeExecutor.javasrc/prerna/reactor/automation/AutomationCancelledException.java(new)TriggerAutomationReactor.java— catchAutomationCancelledExceptionin the dispatch loop and set run status toCANCELLED