Portal Community

Visual Demo

Progress 7 / 12 nodes (58%)

How the Count Updates

The completedNodeCount increments each time a NodeExecutionCompleted event arrives (regardless of whether the node succeeded or was skipped). The totalNodeCount is set when the WorkflowExecutionStarted event arrives — it reflects the number of nodes the Process Engine expects to execute based on the workflow definition.

// Store update on NodeExecutionCompleted
incrementCompletedCount: () =>
  set(state => ({ completedNodeCount: state.completedNodeCount + 1 }))

// Store update on WorkflowExecutionStarted
set({ totalNodeCount: event.totalNodes })

Percentage Calculation

const percentage = totalNodeCount > 0
  ? Math.round((completedNodeCount / totalNodeCount) * 100)
  : 0;

// The bar reaches 100% when all nodes complete, even if the execution fails
// (the last event is still NodeExecutionFailed which increments the count)

Edge Cases

SituationBehaviour
Workflow cancelled mid-runProgress freezes at the last completed node count
Conditional path skips many nodesSkipped nodes still emit NodeExecutionCompleted (status=skipped) so the bar advances correctly
Dynamic branches (unknown node count)totalNodeCount may update via WorkflowExecutionProgress events as new branches are discovered
Single-node test runBar jumps directly from 0% to 100% in one event