Example #1
0
 private void Init(IWfActivity wfActivity, CParticipant part)
 {
     Actinst instanceObject = wfActivity.GetInstanceObject() as Actinst;
     this.wfActivity = wfActivity;
     this.wfResinst = instanceObject.WfResinst;
     if (this.wfResinst == null)
     {
         this.wfResinst = new WfResinst();
         this.SetWfResInst(part, instanceObject);
     }
     WfLogicalPassContextData passContextData = WfUtil.GetPassContextData();
     if (passContextData != null)
     {
         this.SetWfResInst(passContextData);
     }
 }
 private void CreateRouteInstance(IWfActivity toActivity)
 {
     if (!StringHelper.IsNull(toActivity.Key))
     {
         WfRouteInst inst = new WfRouteInst();
         inst.Id = StringHelper.GetNewGuid();
         inst.From = this.wfActivity.GetInstanceObject() as Actinst;
         inst.To = toActivity.GetInstanceObject() as Actinst;
         inst.TimeStamp = new DateTime?(DateTimeHelper.GetNow());
         inst.ProinstId = toActivity.Container.Key;
         Actinst instanceObject = (Actinst) this.wfActivity.GetInstanceObject();
         instanceObject.FromCount++;
         Actinst actinst2 = (Actinst) toActivity.GetInstanceObject();
         actinst2.ToCount++;
         DaoUtil.GetDaoInstance("SkyMap.Net.Workflow").Put(inst, DAOType.SAVE);
     }
 }