コード例 #1
0
 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();
 }
コード例 #2
0
ファイル: WfProcess.cs プロジェクト: vanloc0301/mychongchong
 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);
 }
コード例 #3
0
 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);
     }
 }
コード例 #4
0
ファイル: ProinstDoc.cs プロジェクト: vanloc0301/mychongchong
 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("结束画流程图...");
     }
 }
コード例 #5
0
 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;
 }
コード例 #6
0
 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);
     }
 }
コード例 #7
0
 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;
 }
コード例 #8
0
ファイル: ProDefDoc.cs プロジェクト: vanloc0301/mychongchong
 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);
                 }
             }
         }
     }
 }
コード例 #9
0
ファイル: ProDefDoc.cs プロジェクト: vanloc0301/mychongchong
 public void Close()
 {
     this.mWFTRANSITIONs.Clear();
     this.mProdef = null;
 }
コード例 #10
0
ファイル: WfProcess.cs プロジェクト: vanloc0301/mychongchong
 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;
 }
コード例 #11
0
ファイル: BoxHelper.cs プロジェクト: vanloc0301/mychongchong
 public static void CreateProcessAndAccept(IWfBox box, Prodef prodef, int num)
 {
     string id = prodef.Id;
     WorkflowService.WfcInstance.CreateWfProcessAndAccept(id, num);
 }
コード例 #12
0
ファイル: WfFactory.cs プロジェクト: vanloc0301/mychongchong
 public static IWfProcessMgr GetWfProcessMgr(Prodef prodef)
 {
     if (prodef == null)
     {
         throw new WfException("Prodef cannot be null");
     }
     return new WfProcessMgr(prodef);
 }
コード例 #13
0
ファイル: WfFactory.cs プロジェクト: vanloc0301/mychongchong
 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);
 }