java.lang.Object
com.agentforge4j.runtime.event.EventRecorder
Thin helper that builds
WorkflowEvent instances and appends them to the configured
WorkflowEventLog.
Centralising event creation keeps the executors focused on orchestration and guarantees that every event has a correctly-generated id and timestamp.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAppends a newWorkflowEventwith a generated id andclocktimestamp.
-
Constructor Details
-
EventRecorder
Creates a recorder.- Parameters:
eventLog- append target for constructed eventsclock- source of event timestamps
-
-
Method Details
-
record
public void record(String runId, String stepId, WorkflowEventType eventType, String payload, String actorId) Appends a newWorkflowEventwith a generated id andclocktimestamp.- Parameters:
runId- non-blank run scope idstepId- optional step scope; may benullfor run-level eventseventType- non-null event discriminatorpayload- optional human-readable payload; may benullactorId- optional logical actor (for example"runtime"or"user"); forwarded as-is to the event log- Throws:
IllegalArgumentException- ifrunIdis blank oreventTypeisnull
-