/// <summary> /// 加载模板,并初始化流程 /// </summary> /// <param name="template">模板名称</param> /// <param name="flowAttachment">流程附属数据</param> /// <returns></returns> public FlowEngine TemplateLoad(string template, FlowAttachment flowAttachment) { string file = this.GetTemplateFile(template); FlowEngine flowEngine = FlowEngine.Load(file); flowEngine.ResetIdentity(); flowEngine.Reset(flowAttachment); return(flowEngine); }
/// <summary> /// 加载模板 /// </summary> /// <param name="template"></param> /// <returns></returns> public FlowEngine TemplateLoad(string template) { string file = this.GetTemplateFile(template); FlowEngine flowEngine = FlowEngine.Load(file); flowEngine.FinishedHandler -= new FlowEngine.FinishedEventHandler(FlowManager.FlowFinished); flowEngine.FinishedHandler += new FlowEngine.FinishedEventHandler(FlowManager.FlowFinished); flowEngine.FlowState = FlowState.SelfWaiting; flowEngine.ResetIdentity(); return(flowEngine); }