@node-ts/bus-workflow
Version:
A workflow engine for orchestrating logic flows in distributed applications.
13 lines (12 loc) • 874 B
TypeScript
import { Message, MessageAttributes } from '@node-ts/bus-messages';
import { WorkflowData } from './workflow-data';
export declare class MessageWorkflowMapping<MessageType extends Message, WorkflowDataType extends WorkflowData> {
lookupMessage: (message: MessageType, messageOptions?: MessageAttributes) => string | undefined;
readonly workflowDataProperty: keyof WorkflowDataType;
/**
* A mapping definition between an incoming message and 0..* workflow data instances in persistence.
* @param lookupMessage A lookup function that resolves a value used to lookup workflow data
* @param workflowDataProperty The field in workflow data where the lookup value is matched against
*/
constructor(lookupMessage: (message: MessageType, messageOptions?: MessageAttributes) => string | undefined, workflowDataProperty: keyof WorkflowDataType);
}