Portal Community

When Polling Activates

Polling activates automatically when:

useExecutionPolling

// useExecutionPolling.ts
export function useExecutionPolling(executionId: string, enabled: boolean) {
  useEffect(() => {
    if (!enabled) return;

    const interval = setInterval(async () => {
      const status = await fetch(
        `/api/v1/process-engine/executions/${executionId}/status`
      ).then(r => r.json());

      // Update store with polled status
      updateStoreFromPolledStatus(status);

      // Stop polling when execution is terminal
      if (['completed', 'failed', 'cancelled'].includes(status.status)) {
        clearInterval(interval);
      }
    }, 2000);

    return () => clearInterval(interval);
  }, [executionId, enabled]);
}

Polling Limitations vs SignalR

AspectSignalR (WebSocket)Polling (REST)
Latency<100ms event delivery0–2000ms (depends on poll timing)
Log streamingReal-time per-entryBatched log retrieval per poll
Network overheadLow (keep-alive pings only)Higher (HTTP round-trip every 2s)
Node status updatesEvent-driven, exact timingSnapshot per poll, may miss rapid transitions
Polling Shows "Live updates unavailable" When polling is active, a warning banner appears in the Observer Panel. Node status still updates correctly, but rapid successive status changes (e.g., a node that completes in under 2s) may appear to skip directly to completed without showing the running state.