Skip to content

[Phase 1 BE] Cancel fix: chunked sleep in WaitNodeExecutor + AutomationCancelledException #2792

Description

@stelbailey

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions