Info.ContextProcInst IProcService.GetInfoByWFId(string workflowId) { IList <Pkurg.BPM.Entities.WorkFlowInstance> infos = new Pkurg.BPM.Services.WorkFlowInstanceService().Find(string.Format("WFInstanceId='{0}'", workflowId)); if (infos.Count == 0) { return(null); } return(infos[0].ToContextInfo()); }
public static bool IsShow(string instId) { IList <Pkurg.BPM.Entities.WorkFlowInstance> infos = new Pkurg.BPM.Services.WorkFlowInstanceService().Find(string.Format("InstanceId='{0}'", instId)); if (infos.Count == 0) { return(false); } string instanceCreateUserCode = string.IsNullOrEmpty(infos[0].CreateByUserCode) ? "" : infos[0].CreateByUserCode; return(new IdentityUser().GetEmployee().PWordUser.EmployeeCode.ToLower() == instanceCreateUserCode.ToLower()); }
//public string VirtualRootPath { get; set; } protected void btnAdd_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(_BPMContext.ProcID)) { return; } string currentInstId = _BPMContext.ProcID; string[] procIds = hidRelatedFlowProcIdList.Value.Split(','); //当前流程已有的关联流程 List <string> ListProcId = new List <string>(); foreach (string procid in procIds) { Pkurg.BPM.Entities.FlowRelated info = Pkurg.PWorldBPM.Business.Controls.WF_Relation.GetRelatedFlowInfo(currentInstId.ToString(), procid); if (info == null) { Pkurg.BPM.Entities.WorkFlowInstance inst = new Pkurg.BPM.Services.WorkFlowInstanceService().GetByInstanceId(procid); if (inst == null) { continue; } info = new Pkurg.BPM.Entities.FlowRelated() { FlowId = currentInstId, RelatedFlowId = procid, CreateTime = DateTime.Now, // CreatorId=_BPMContext.CurrentUser.Id, CreatorName = _BPMContext.CurrentUser.Name, RelatedFlowName = inst.FormTitle, RelatedFlowCreator = inst.CreateByUserName, RelatedFlowEndTime = inst.FinishedTime }; Pkurg.PWorldBPM.Business.Controls.WF_Relation.AddRelatedFlowInfo(info); } } Refresh(); }
public static Pkurg.BPM.Entities.WorkFlowInstance ToDBInfo(this Pkurg.PWorldBPM.Common.Info.ContextProcInst instance) { IList <Pkurg.BPM.Entities.WorkFlowInstance> infos = new Pkurg.BPM.Services.WorkFlowInstanceService().Find(string.Format("InstanceId='{0}'", instance.ProcId)); if (infos.Count == 0) { return(null); } if (string.IsNullOrEmpty(infos[0].WfInstanceId)) { infos[0].WfInstanceId = instance.WorkflowId; } infos[0].WfStatus = instance.Status; infos[0].SumitTime = instance.StartTime; infos[0].FinishedTime = instance.EndTime; infos[0].FormData = instance.FormData; infos[0].AppId = instance.AppCode; infos[0].FormTitle = instance.ProcName; infos[0].FormId = instance.FormId; return(infos[0]); }