import { NFNodeType } from "../types"; import { NFNode } from "./node"; /** * 开始节点:沿唯一出口顺序流继续。 */ export class NFStartNode extends NFNode{ /** * @param cfg - 节点配置 * @param process - 所属流程 */ constructor(cfg,process){ super(cfg,process); this.type = NFNodeType.START; } /** * 进入后执行出口顺序流。 */ async run(){ await super.run(); const node = this.process.nodeManager.getSequenceNode(this.id); if(node){ await node.run(); } } }