/// <summary>上 /// 获取流程实体(用于流程创建) /// </summary> /// <returns></returns> public ActionResult GetFlowJson(string keyValue) { var schemeInfo = wfFlowInfoBLL.GetEntity(keyValue); IWfRuntime wfRuntime = new WfRuntime(schemeInfo.F_SchemeContent); WFNodeModel wfNodeModel = wfRuntime.getStartNode(); FormModuleEntity formEntity = fromModuleBLL.GetEntity(wfNodeModel.setInfo.nodeForm); var dataJson = new { schemeInfo = schemeInfo, formEntity = formEntity, currentNode = wfNodeModel }; return(Content(dataJson.ToJson())); }
public ActionResult GetProcessNodeJson(string keyValue) { WFProcessInstanceEntity processEntity = wfProcessBll.GetProcessEntity(keyValue); WFProcessSchemeEntity processSchemeEntity = wfProcessBll.GetProcessSchemeEntity(processEntity.F_ProcessSchemeId); var nodeList = wfProcessBll.GetProcessNodeList(keyValue); IWfRuntime wfRuntime = new WfRuntime(processSchemeEntity.F_SchemeContent); WFNodeModel node = wfRuntime.getStartNode(); Dictionary <string, FormModuleEntity> formDataLsit = new Dictionary <string, FormModuleEntity>(); FormModuleEntity formNewEntity = formModuleBLL.GetEntity(node.setInfo.nodeForm); formDataLsit.Add(node.setInfo.nodeForm, formNewEntity); List <FormModuleEntity> formEntityList = new List <FormModuleEntity>(); Dictionary <string, FormModuleInstanceEntity> dFormData = new Dictionary <string, FormModuleInstanceEntity>(); var formdata = formModuleBLL.GetInstanceList(keyValue); foreach (var item in formdata) { Form_ModuleContentEntity formEntity = formModuleBLL.GetFormContentEntity(item.F_FrmContentId); if (formDataLsit.ContainsKey(formEntity.F_FrmId) && !dFormData.ContainsKey(formEntity.F_FrmId)) { formDataLsit[formEntity.F_FrmId].F_FrmContent = formEntity.F_FrmContent; formEntityList.Add(formDataLsit[formEntity.F_FrmId]); dFormData.Add(formEntity.F_FrmId, item); } } if (formEntityList.Count == 0) { formEntityList.Add(formNewEntity); } var dataJson = new { processEntity = processEntity, processSchemeEntity = processSchemeEntity, nodeList = nodeList, formEntityList = formEntityList, dFormData = dFormData, currentNode = node }; return(Content(dataJson.ToJson())); }