public WfExecutionOjbect(WfInstanceElement wfinstance, Prodef prodef) { if (LoggingService.IsInfoEnabled) { LoggingService.Info("Init the WfProcess"); } this.wfInstance = wfinstance; this.wfInstance.Name = prodef.Name; this.InitInstByProdef(prodef); this.InitElse(); }
public WfProcess(Prodef prodef, IWfProcessMgr processMgr) : base(new Proinst(), prodef) { this.manager = processMgr; this.proinst = base.wfInstance as Proinst; this.proinst.Responsible = prodef.ResponsibleId; this.proinst.DueTime = prodef.Duration; this.proinst.FormId = prodef.DaoDataFormId; this.proinst.TempletDataSetId = prodef.DaoDataSetId; this.proinst.Style = prodef.Style; this.proinst.ProjectId = this.GetNewProjectId(prodef.Package.Logo); }
public void ShowMe(Prodef prodef, Proinst proinst) { if (prodef != null) { if (this.mGraphDoc != null) { this.mGraphDoc.Reset(); } else { this.InitGraphDoc(); } if (this.mProinstDoc == null) { this.mProinstDoc = new ProinstDoc(); } this.mProinstDoc.Load(prodef, proinst, this.mGraphDoc, this.img32); } }
public void Load(SkyMap.Net.Workflow.XPDL.Prodef prodef, Proinst proinst, GraphDoc gDoc, ImageList imgList) { if (prodef == null) { throw new ArgumentNullException("Prodef cannot be null"); } if (proinst == null) { throw new ArgumentNullException("Proinst cannot be null"); } if ((this.mProdef == null) || (prodef.Id != this.mProdef.Id)) { this.Close(); this.mProdef = prodef; this.mProinst = proinst; foreach (Actdef actdef in prodef.Actdefs.Values) { IList<Transition> froms = actdef.Froms; if (froms.Count > 0) { foreach (Transition transition in froms) { if (!this.mWFTRANSITIONs.ContainsKey(transition.Id)) { this.mWFTRANSITIONs.Add(transition.Id, transition); } } } } } if (LoggingService.IsDebugEnabled) { LoggingService.Debug("开始画流程图..."); } this.BuildGraphDoc(gDoc, imgList); if (LoggingService.IsDebugEnabled) { LoggingService.Debug("结束画流程图..."); } }
public void LoadMe(Prodef domainObject, UnitOfWork currentUnitOfWork) { Prodef prodef = domainObject; if (prodef == null) { throw new ArgumentOutOfRangeException("domainObject"); } if (this.mGraphDoc != null) { this.mGraphDoc.Reset(); } else { this.InitGraphDoc(); } if (this.mProDefDoc == null) { this.mProDefDoc = new ProDefDoc(); } this.mProDefDoc.Load(prodef, currentUnitOfWork); this.mProDefDoc.BuildGraphDoc(this.mGraphDoc, this.img32); this.mAction = DrawAction.SingleSelect; }
public WfProcessMgr(Prodef prodef) { try { this.prodef = prodef; if (prodef.Status) { this.state = ProcessMgrStateType.Enabled; } else { this.state = ProcessMgrStateType.Disabled; } this.processList = new List<IWfProcess>(); } catch (ApplicationException exception) { if (LoggingService.IsDebugEnabled) { LoggingService.Debug("Except on new WfProcessMgr:" + exception.Message); } throw new WfException("创建WfProcessMgr时发生错误", exception); } }
protected void InitInstByProdef(Prodef prodef) { this.wfInstance.PackageId = prodef.Package.Id; this.wfInstance.PackageName = prodef.Package.Name; this.wfInstance.ProdefId = prodef.Id; this.wfInstance.ProdefName = prodef.Name; this.wfInstance.ProdefVersion = prodef.Version; }
public void Load(SkyMap.Net.Workflow.XPDL.Prodef prodef, UnitOfWork currentUnitOfWork) { if (prodef == null) { throw new NullReferenceException("Prodef cannot be null"); } this.Close(); this.mProdef = prodef; this.currentUnitOfWork = currentUnitOfWork; foreach (Actdef actdef in prodef.Actdefs.Values) { IList<Transition> froms = actdef.Froms; if (froms.Count > 0) { foreach (Transition transition in froms) { if (!this.mWFTRANSITIONs.Contains(transition.Id)) { this.mWFTRANSITIONs.Add(transition.Id, transition); } } } } }
public void Close() { this.mWFTRANSITIONs.Clear(); this.mProdef = null; }
public override object GetDefineOject() { if (this.prodef == null) { IDA0 daoInstance = DaoUtil.GetDaoInstance("SkyMap.Net.Workflow"); this.prodef = QueryHelper.Get<Prodef>("Prodef_" + this.proinst.ProdefId, this.proinst.ProdefId); } return this.prodef; }
public static void CreateProcessAndAccept(IWfBox box, Prodef prodef, int num) { string id = prodef.Id; WorkflowService.WfcInstance.CreateWfProcessAndAccept(id, num); }
public static IWfProcessMgr GetWfProcessMgr(Prodef prodef) { if (prodef == null) { throw new WfException("Prodef cannot be null"); } return new WfProcessMgr(prodef); }
public static IWfProcess GetWfProcess(Prodef prodef, IWfProcessMgr processMgr) { if (prodef == null) { throw new WfException("Process definition object cannot be null"); } if (processMgr == null) { throw new WfException("ProcessMgr cannot be null"); } return new WfProcess(prodef, processMgr); }