Example #1
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);
         }
     }
 }
Example #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="msg">返回的信息</param>
 /// <returns>msg默认null,通过为true</returns>
 private void wfInstalledcheck()
 {
     wfInstalled = bworkFlow.GetWorkFlowRunModel(data.flowid);
     if (wfInstalled == null)
     {
         Msg         = "未找到流程运行时实体,请确认流程是否已安装!";
         Check       = false;
         currentStep = wfInstalled.Steps.Where(p => p.ID == data.stepid.ToGuid());
     }
     Check = true;
 }
Example #3
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);
        }