Exemple #1
0
        public WorkFlowCustomEventParams WorkFlowCustomEventParamsSet(FoWoSoft.Data.Model.WorkFlowExecute.Execute execute)
        {
            var eventParams = new FoWoSoft.Data.Model.WorkFlowCustomEventParams()
            {
                FlowID     = execute.FlowID,
                GroupID    = execute.GroupID,
                StepID     = execute.StepID,
                TaskID     = execute.TaskID,
                InstanceID = execute.InstanceID,
            };

            return(eventParams);
        }
Exemple #2
0
 private void execDelegation(FoWoSoft.Data.Model.WorkFlowExecute.Execute execute)
 {
     foreach (var executeStep in execute.Steps)
     {
         for (int i = 0; i < executeStep.Value.Count; i++)
         {
             Guid newUserID = bworkFlowDelegation.GetFlowDelegationByUserID(execute.FlowID, executeStep.Value[i].ID);
             if (newUserID != Guid.Empty && newUserID != executeStep.Value[i].ID)
             {
                 executeStep.Value[i] = busers.Get(newUserID);
             }
         }
     }
 }
Exemple #3
0
        private void RoomisSend(FoWoSoft.Data.Model.WorkFlowExecute.Execute execute, Result reslut)
        {
            // 操作roomis审核
            // if (execute.ExecuteType == EnumType.ExecuteType.Completed)
            //new WebForm.Common.Meet().Roomis(execute.StepID.ToString(), WebForm.Common.RoomisOperation.put_step);
            // new WebForm.Common.Meet().Roomis(execute.InstanceID, WebForm.Common.RoomisOperation.put_approve);
            //else
            //{

            FoWoSoft.Platform.Log.Add(string.Format("发送流程({0})", execute.InstanceID.ToString()), "roomis", FoWoSoft.Platform.Log.Types.其它分类);

            new WebForm.Common.Meet().Roomis(execute);
            //   }
        }
Exemple #4
0
 public void backEnd(FoWoSoft.Data.Model.WorkFlowExecute.Execute execute)
 {
     if (WebForm.Common.Tools.CheckBack(execute.ExecuteType, execute.StepID))
     {
         var taskall      = new FoWoSoft.Platform.WorkFlowTask().GetAll();
         var installTasks = taskall.Where(s => s.InstanceID.ToString().Equals(execute.InstanceID, StringComparison.OrdinalIgnoreCase));
         foreach (var item in installTasks)
         {
             if (item.Status < 2)
             {
                 new FoWoSoft.Platform.WorkFlowTask().Completed(item.ID);
             }
         }
         Response.Write("<script type=\"text/javascript\">top.getTaskCount();top.mainTab.closeTab();</script>");
         Response.End();
     }
 }
Exemple #5
0
        private void CreateExecute()
        {
            var execute = new FoWoSoft.Data.Model.WorkFlowExecute.Execute();

            execute.Comment     = data.comment.IsNullOrEmpty() ? "" : data.comment.Trim();
            execute.FlowID      = data.flowid.ToGuid();
            execute.GroupID     = data.GroupID.ToGuid();
            execute.InstanceID  = data.instanceid;
            execute.IsSign      = "1" == data.IsSign;
            execute.Note        = "";
            execute.Sender      = data.CurrentUser;
            execute.StepID      = data.stepid.IsGuid() ? data.stepid.ToGuid() : wfInstalled.FirstStepID;
            execute.TaskID      = data.TaskID.ToGuid();
            execute.Title       = data.title ?? "";
            execute.ExecuteType = (EnumType.ExecuteType)Enum.Parse(typeof(EnumType.ExecuteType), opationJSON["type"].ToString(), true);
            execute.Steps       = new Dictionary <Guid, List <Data.Model.Users> >();
        }
Exemple #6
0
        private FoWoSoft.Data.Model.WorkFlowExecute.Execute CreateExecute(string instanceid, string flowid, FoWoSoft.Data.Model.WorkFlowInstalled wfInstalled, string comment, string stepid, LitJson.JsonData opationJSON, string title)
        {
            var execute = new FoWoSoft.Data.Model.WorkFlowExecute.Execute();

            execute.Comment     = comment.IsNullOrEmpty() ? "" : comment.Trim();
            execute.FlowID      = flowid.ToGuid();
            execute.GroupID     = Request.QueryString["groupid"].ToGuid();
            execute.InstanceID  = instanceid;
            execute.IsSign      = "1" == Request.Form["issign"];
            execute.Note        = "";
            execute.Sender      = FoWoSoft.Platform.Users.CurrentUser;
            execute.StepID      = stepid.IsGuid() ? stepid.ToGuid() : wfInstalled.FirstStepID;
            execute.TaskID      = Request.QueryString["taskid"].ToGuid();
            execute.Title       = title ?? "";
            execute.ExecuteType = (EnumType.ExecuteType)Enum.Parse(typeof(EnumType.ExecuteType), opationJSON["type"].ToString(), true);
            execute.Steps       = GetExecuteSetps(opationJSON["steps"], execute.ExecuteType);
            return(execute);
        }
Exemple #7
0
 private FoWoSoft.Data.Model.WorkFlowCustomEventParams NextEvent(FoWoSoft.Data.Model.WorkFlowExecute.Execute execute, FoWoSoft.Data.Model.WorkFlowCustomEventParams eventParams, IEnumerable <FoWoSoft.Data.Model.WorkFlowInstalledSub.Step> steps)
 {
     foreach (var step in steps)
     {
         //步骤提交后事件
         if (!step.Event.SubmitAfter.IsNullOrEmpty() &&
             (execute.ExecuteType == (EnumType.ExecuteType.Submit | EnumType.ExecuteType.Completed)))
         {
             object obj = btask.ExecuteFlowCustomEvent(step.Event.SubmitAfter.Trim(), eventParams);
             Response.Write(string.Format("执行步骤提交后事件:({0}) 返回值:{1}<br/>", step.Event.SubmitAfter.Trim(), obj.ToString()));
         }
         //步骤退回后事件
         if (!step.Event.BackAfter.IsNullOrEmpty() && execute.ExecuteType == EnumType.ExecuteType.Back)
         {
             object obj = btask.ExecuteFlowCustomEvent(step.Event.BackAfter.Trim(), eventParams);
             Response.Write(string.Format("执行步骤退回后事件:({0}) 返回值:{1}<br/>", step.Event.BackAfter.Trim(), obj.ToString()));
         }
     }
     return(eventParams);
 }
Exemple #8
0
 //归档
 public void WorkFlowArchives(FoWoSoft.Data.Model.WorkFlowInstalled wfInstalled, string title, FoWoSoft.Data.Model.WorkFlowExecute.Execute execute)
 {
     if (execute.ExecuteType == (EnumType.ExecuteType.Submit | EnumType.ExecuteType.Completed))
     {
         var currentsteps = wfInstalled.Steps.Where(p => p.ID == execute.StepID);
         if (currentsteps.Count() > 0 && currentsteps.First().Archives == 1)
         {
             string flowName, stepName;
             string commentHtml = Request.Form["form_commentlist_div_textarea"];
             stepName = bworkFlow.GetStepName(execute.StepID, execute.FlowID, out flowName, true);
             string archivesContents = new FoWoSoft.Platform.WorkFlowForm().GetArchivesString(Request.Form["form_body_div_textarea"], commentHtml);
             FoWoSoft.Data.Model.WorkFlowArchives wfr = new FoWoSoft.Data.Model.WorkFlowArchives();
             wfr.Comments   = commentHtml;
             wfr.Contents   = archivesContents;
             wfr.FlowID     = execute.FlowID;
             wfr.FlowName   = flowName;
             wfr.GroupID    = execute.GroupID;
             wfr.ID         = Guid.NewGuid();
             wfr.InstanceID = execute.InstanceID;
             wfr.StepID     = execute.StepID;
             wfr.StepName   = stepName;
             wfr.Title      = title.IsNullOrEmpty() ? flowName + "-" + stepName : title;
             wfr.TaskID     = execute.TaskID;
             wfr.WriteTime  = FoWoSoft.Utility.DateTimeNew.Now;
             new FoWoSoft.Platform.WorkFlowArchives().Add(wfr);
         }
     }
 }
Exemple #9
0
 public WorkFlowOpation(FoWoSoft.Data.Model.WorkFlowExecute.Execute execute)
 {
     this.execute = execute;
 }