Skip to content

EntropyEngine::Core::Concurrency::NodeStateChangedEvent

EntropyEngine::Core::Concurrency::NodeStateChangedEvent

Section titled “EntropyEngine::Core::Concurrency::NodeStateChangedEvent”

The workhorse event - tracks every state transition in your workflow. More…

#include <WorkGraphEvents.h>

Inherits from EntropyEngine::Core::Concurrency::WorkGraphEvent

Name
NodeStateChangedEvent(const WorkGraph * g, NodeHandle n, NodeState from, NodeState to)
Name
NodeStateoldState
What it was.
NodeHandlenode
The node that changed state.
NodeStatenewState
What it is now.

Public Functions inherited from EntropyEngine::Core::Concurrency::WorkGraphEvent

Name
WorkGraphEvent(const WorkGraph * g)

Public Attributes inherited from EntropyEngine::Core::Concurrency::WorkGraphEvent

Name
std::chrono::steady_clock::time_pointtimestamp
When this event was created.
const WorkGraph *graph
Which graph emitted this event.
struct EntropyEngine::Core::Concurrency::NodeStateChangedEvent;

The workhorse event - tracks every state transition in your workflow.

This is THE event for understanding execution flow. Every time a node changes state (Pending→Ready, Ready→Scheduled, etc.), this event fires. Perfect for building state diagrams, progress trackers, or debugging stuck workflows.

eventBus->subscribe<NodeStateChangedEvent>([](const auto& event) {
LOG_INFO("Node {} transitioned from {} to {}",
event.node.getData()->name,
nodeStateToString(event.oldState),
nodeStateToString(event.newState));
// Track progress
if (event.newState == NodeState::Completed) {
updateProgressBar();
}
});
inline NodeStateChangedEvent(
const WorkGraph * g,
NodeHandle n,
NodeState from,
NodeState to
)
NodeState oldState;

What it was.

NodeHandle node;

The node that changed state.

NodeState newState;

What it is now.


Updated on 2026-01-26 at 17:14:35 -0500