UNPKG

@flowlab/all

Version:

A cool library focusing on handling various flows

15 lines (13 loc) 618 B
import { IWorkflowContext } from '../../types/runtime'; export interface IEventPayload { eventName: string; data?: Record<string, any>; sourceWorkflowId?: string; // ID of the workflow instance emitting the event timestamp: Date; } export interface IEventManager { emit(eventName: string, data?: Record<string, any>, sourceContext?: IWorkflowContext): Promise<void>; // Listener registration is often handled outside the engine core // but might have methods to bind workflows to events if needed // e.g., bindWorkflowToEvent(eventName: string, definitionId: string): Promise<void>; }