import { IItem, ILogger, NODE_ACTION, EXECUTION_EVENT, ITEM_STATUS, Node } from "../" interface IDefinition { name: any; processes: Map; rootElements: any; nodes: Map; flows: any[]; source: any; logger: any; accessRules: any[]; load(): Promise; getJson(): string; getDefinition(source: any, logger: ILogger): Promise; getStartNode(): Node; getNodeById(id: any): Node; } interface IElement { id: any; type: any; name: any; lane: any; behaviours: Map; continue(item: IItem): void; describe(): string[][]; restored(item: IItem): void; resume(item: IItem): void; /** * respond by providing behaviour attributes beyond item and node information * ex: timer due , input/outupt , fields * */ hasBehaviour(name: any): boolean; getBehaviour(name: any): any; addBehaviour(nane: any, behavriour: any): void; } interface IFlow extends IElement { } interface INode extends IElement { name: any; processId: any; def: any; outbounds: any[]; inbounds: any[]; doEvent(item: IItem, event: EXECUTION_EVENT, newStatus: ITEM_STATUS): Promise; enter(item: IItem): void; requiresWait(): boolean; canBeInvoked(): boolean; /** * this is the primary exectuion method for a node * * considerations: the following are handled by Token * 1. Loops we are inside a loop already (if any) * 2. Gatways * 3. Subprocess the parent node is fired as normal * run method will fire the subprocess invoking a new token and will go into wait */ execute(item: IItem): Promise; continue(item: IItem): Promise; start(item: IItem): Promise; run(item: IItem): Promise; end(item: IItem): Promise; /** * is called by the token after an execution resume for every active (in wait) item * different than init, which is called for all items * @param item */ resume(item: IItem): void; init(item: IItem): void; getOutbounds(item: IItem): IItem[]; } export {IDefinition , IElement , INode , IFlow }