Beispiel #1
0
        /// <summary>
        /// 发布流程模板
        /// </summary>
        public JsonResult PublishWorkflow(WorkflowTemplateViewModel model)
        {
            return(ExecuteFunctionRun(() =>
            {
                DraftWorkflowTemplate DraftWorkflowTemplate = ReadRequestWorkflowTemplate(model);
                if (DraftWorkflowTemplate == null)
                {
                    return Json(new { Result = false, Errors = new List <string>()
                                      {
                                          "Designer.WorkflowHandler_Msg1"
                                      } });
                }

                string WorkflowCode = DraftWorkflowTemplate.WorkflowCode;
                WorkflowClause Clause = this.Engine.WorkflowManager.GetClause(WorkflowCode);
                if (Clause == null)
                {
                    return Json(new { Result = false, Errors = new List <string>()
                                      {
                                          "Designer.WorkflowHandler_Msg2"
                                      } });
                }
                DraftWorkflowTemplate.BizObjectSchemaCode = Clause.BizSchemaCode;

                // 先保存流程模板
                if (!this.Engine.WorkflowManager.SaveDraftTemplate(this.UserValidator.UserID, DraftWorkflowTemplate))
                {
                    return Json(new { Result = false, Errors = new List <string>()
                                      {
                                          "Designer.WorkflowHandler_Msg3"
                                      } });
                }

                OThinker.H3.DataModel.BizObjectSchema schema = this.Engine.BizObjectManager.GetPublishedSchema(Clause.BizSchemaCode);
                OThinker.H3.ValidationResult ValidationResult = DraftWorkflowTemplate.Validate(schema);

                if (!ValidationResult.Valid)
                {
                    return Json(ValidationResult);
                }

                PublishResult PublishResult = this.Engine.WorkflowManager.RegisterWorkflow(this.UserValidator.UserID, DraftWorkflowTemplate.WorkflowCode, true);

                if (PublishResult.Result == (long)OThinker.H3.ErrorCode.SUCCESS)
                {
                    return Json(new { Result = true, Message = new List <string>()
                                      {
                                          "流程发布成功:当前版本号: " + PublishResult.RegisteredVersion.ToString()
                                      } });
                }
                else
                {
                    return Json(new { Result = false, Errors = PublishResult.Errors });
                }
            }));
        }
Beispiel #2
0
        List <FormulaTreeNode> GetDataItems(string SchemaCode, string ParentID)
        {
            var             RootNodeID   = Guid.NewGuid().ToString();
            FormulaTreeNode flowDataNode = new FormulaTreeNode()
            {
                ObjectID = RootNodeID,
                Text     = "Designer.Designer_InstanceDataItem",
                Value    = "",
                Icon     = this.PortalRoot + "/WFRes/_Content/designer/image/formula/folder_16.png",
                ParentID = ParentID
            };
            List <FormulaTreeNode> lstDataItems = new List <FormulaTreeNode>();

            lstDataItems.Add(flowDataNode);

            WorkflowClause clause = this.Engine.WorkflowManager.GetClause(SchemaCode);

            if (clause != null)
            {
                SchemaCode = clause.BizSchemaCode;
            }
            if (!string.IsNullOrEmpty(SchemaCode))
            {
                DataModel.BizObjectSchema BizSchema = this.Engine.BizObjectManager.GetDraftSchema(SchemaCode);

                if (BizSchema != null)
                {
                    if (BizSchema != null && BizSchema.Properties != null)
                    {
                        foreach (DataModel.PropertySchema Property in BizSchema.Properties)
                        {
                            //不显示保留数据项
                            if (!DataModel.BizObjectSchema.IsReservedProperty(Property.Name))
                            {
                                lstDataItems.Add(new FormulaTreeNode()
                                {
                                    ObjectID = Guid.NewGuid().ToString(),
                                    IsLeaf   = true,
                                    ParentID = RootNodeID,
                                    Text     = Property.DisplayName,
                                    Value    = Property.Name
                                });
                                ;
                            }
                        }
                    }
                }
            }

            return(lstDataItems);
        }
Beispiel #3
0
 /// <summary>
 /// 根据流程编码获取可映射的数据项
 /// </summary>
 public JsonResult GetDataItemsByWorkflowCode(string WorkflowCode)
 {
     return(ExecuteFunctionRun(() =>
     {
         string SchameCode = string.Empty;
         if (!string.IsNullOrEmpty(WorkflowCode))
         {
             WorkflowClause Clause = this.Engine.WorkflowManager.GetClause(WorkflowCode);
             if (Clause != null)
             {
                 SchameCode = Clause.BizSchemaCode;
             }
         }
         return WriteSchema(SchameCode);
     }));
 }
Beispiel #4
0
 public JsonResult UpdateClauseName(string WorkflowCode, string ClauseName)
 {
     return(ExecuteFunctionRun(() =>
     {
         ActionResult result = new ActionResult(false, "");
         WorkflowClause Clause = this.Engine.WorkflowManager.GetClause(WorkflowCode);
         if (Clause != null)
         {
             Clause.WorkflowName = ClauseName;
             if (this.Engine.WorkflowManager.UpdateClause(Clause) == (long)ErrorCode.SUCCESS)
             {
                 result.Success = true;
             }
         }
         return Json(result);
     }));
 }
Beispiel #5
0
        /// <summary>
        /// 输出流程模板包、流程模板
        /// </summary>
        public JsonResult RegisterActivityTemplateConfigs(string WorkflowCode, int WorkflowVersion, string InstanceID)
        {
            return(ExecuteFunctionRun(() =>
            {
                WorkflowCode = Server.UrlDecode(WorkflowCode); //解决WorkflowCode为汉字的情景
                ActivityTemplateConfigsViewModel model = new ActivityTemplateConfigsViewModel();
                if ((WorkflowCode == null || WorkflowCode == "") && WorkflowVersion == -1)
                {
                    Instance.InstanceContext InstanceContext = this.Engine.InstanceManager.GetInstanceContext(InstanceID);
                    if (InstanceContext != null)
                    {
                        WorkflowCode = InstanceContext.WorkflowCode;
                        WorkflowVersion = InstanceContext.WorkflowVersion;
                        model.InstanceContext = InstanceContext;
                        model.ExceptionActivities = this.ExceptionActivities(InstanceID);
                    }
                }

                #region 是否锁定
                model.IsControlUsable = BizWorkflowPackageLockByID(WorkflowCode);
                #endregion

                #region 流程模板

                WorkflowDocument WorkflowTemplate = null;
                if (WorkflowVersion == WorkflowDocument.NullWorkflowVersion)
                {
                    WorkflowTemplate = this.Engine.WorkflowManager.GetDraftTemplate(WorkflowCode);
                }
                else
                {
                    WorkflowTemplate = this.Engine.WorkflowManager.GetPublishedTemplate(WorkflowCode, WorkflowVersion);
                }

                #endregion

                #region 数据模型

                //数据项
                List <string> lstDataItems = new List <string>();
                //所有属性
                List <object> lstProperties = new List <object>();
                //输出到前台的数据项
                List <object> lstFrontDataItems = new List <object>();
                //允许设置权限的数据项
                List <string> lstPermissionDataItems = new List <string>();

                //参与者数据项
                List <string> lstUserDataItems = new List <string>();
                //逻辑型数据项
                List <string> lstBoolDataItems = new List <string>();

                //业务方法名称列表
                List <string> lstBizMethodNames = new List <string>();
                List <object> lstAllDataItems = new List <object>();//系统数据项,+流程数据项,流程设计选择时使用

                WorkflowClause Clause = this.Engine.WorkflowManager.GetClause(WorkflowCode);
                if (Clause != null && Clause.BizSchemaCode != null)
                {
                    //ScriptManager.RegisterClientScriptBlock(this.Page, Page.GetType(), "ClauseName", "var ClauseName=" + JSSerializer.Serialize(Clause.DisplayName + string.Empty) + ";", true);
                    model.ClauseName = Clause.WorkflowName + string.Empty;
                    //流程模板浏览页面地址
                    // ScriptManager.RegisterClientScriptBlock(this.Page, Page.GetType(), "WorkflowViewUrl", "var WorkflowViewUrl=" + JSSerializer.Serialize(GetPortalRoot(this.Page) + ConstantString.PagePath_WorkflowDesigner) + ";", true);
                    model.WorkflowViewUrl = PortalRoot + ConstantString.PagePath_WorkflowDesigner;
                    DataModel.BizObjectSchema BizObject = this.Engine.BizObjectManager.GetDraftSchema(Clause.BizSchemaCode);
                    if (BizObject != null)
                    {
                        //流程包
                        object Package = new
                        {
                            SchemaCode = BizObject.SchemaCode
                        };
                        //ScriptManager.RegisterClientScriptBlock(this.Page, Page.GetType(), "Package", "var Package=" + JSSerializer.Serialize(Package) + ";", true);
                        model.Package = Package;

                        #region 页标签

                        if (Clause != null)
                        {
                            string TabName = string.IsNullOrEmpty(Clause.WorkflowName) ? Clause.WorkflowCode : Clause.WorkflowName;
                            if (WorkflowVersion != WorkflowDocument.NullWorkflowVersion)
                            {
                                TabName += "[" + WorkflowVersion + "]";
                            }
                            else
                            {
                                TabName += "[设计]";
                            }
                            //SetTabHeader(TabName);//前台执行
                            model.TabName = TabName;
                        }

                        #endregion

                        List <object> lstBizMethods = new List <object>();
                        //可选的业务方法
                        if (BizObject.Methods != null)
                        {
                            foreach (var Method in BizObject.Methods)
                            {
                                if (!DataModel.BizObjectSchema.IsDefaultMethod(Method.MethodName) && Method.MethodType == DataModel.MethodType.Normal)
                                {
                                    lstBizMethodNames.Add(Method.MethodName);
                                    lstBizMethods.Add(new { Text = Method.FullName, Value = Method.MethodName });
                                }
                            }
                        }
                        model.BizMethods = lstBizMethods;
                        //ScriptManager.RegisterClientScriptBlock(this.Page, Page.GetType(), "BizMethods", "var BizMethods=" + JSSerializer.Serialize(lstBizMethods.ToArray()) + ";", true);

                        #region  数据项、参与者、逻辑型数据项
                        //数据项、参与者、逻辑型数据项
                        if (BizObject.Properties != null)
                        {
                            List <Object> listNotifyCondition = new List <object>();
                            List <Object> listApprovalDataItem = new List <object>();
                            List <Object> listCommentDataItem = new List <object>();

                            listNotifyCondition.Add(new { Text = string.Empty, Value = string.Empty });
                            listApprovalDataItem.Add(new { Text = string.Empty, Value = string.Empty });
                            listCommentDataItem.Add(new { Text = string.Empty, Value = string.Empty });

                            foreach (DataModel.PropertySchema Property in BizObject.Properties)
                            {
                                //不显示保留数据项
                                if (!DataModel.BizObjectSchema.IsReservedProperty(Property.Name))
                                {
                                    lstDataItems.Add(Property.Name);
                                    lstProperties.Add(new
                                    {
                                        Text = Property.DisplayName,
                                        Value = Property.Name
                                    });

                                    lstFrontDataItems.Add(new
                                    {
                                        Text = Property.DisplayName,
                                        Value = Property.Name,
                                        //标记子表标题行
                                        ItemType = Property.LogicType == Data.DataLogicType.BizObjectArray ? "SubTableHeader" : string.Empty
                                    });
                                    lstPermissionDataItems.Add(Property.Name);



                                    //通知条件 TODO
                                    // sltNotifyCondition.Items.Add(new ListItem(Property.DisplayName, Property.Name));
                                    listNotifyCondition.Add(new { Text = Property.DisplayName, Value = Property.Name });

                                    //子表
                                    if ((Property.LogicType == Data.DataLogicType.BizObject || Property.LogicType == Data.DataLogicType.BizObjectArray) &&
                                        Property.ChildSchema != null && Property.ChildSchema.Properties != null)
                                    {
                                        foreach (DataModel.PropertySchema ChildProperty in Property.ChildSchema.Properties)
                                        {
                                            if (!DataModel.BizObjectSchema.IsReservedProperty(ChildProperty.Name))
                                            {
                                                lstFrontDataItems.Add(new
                                                {
                                                    Text = Property.DisplayName + "." + ChildProperty.DisplayName,
                                                    Value = Property.Name + "." + ChildProperty.Name
                                                });
                                                lstPermissionDataItems.Add(Property.Name + "." + ChildProperty.Name);
                                            }
                                        }
                                    }
                                    //参与者
                                    else if (Property.LogicType == Data.DataLogicType.SingleParticipant ||
                                             Property.LogicType == Data.DataLogicType.MultiParticipant)
                                    {
                                        lstUserDataItems.Add(Property.Name);
                                    }
                                    //逻辑型
                                    else if (Property.LogicType == Data.DataLogicType.Bool)
                                    {
                                        lstBoolDataItems.Add(Property.Name);
                                        //TODO
                                        listApprovalDataItem.Add(new { Text = Property.DisplayName, Value = Property.Name });
                                    }
                                    //文本
                                    else if (Property.LogicType == Data.DataLogicType.String)
                                    {
                                        listCommentDataItem.Add(new { Text = Property.DisplayName, Value = Property.Name });
                                    }

                                    //else if (Property.LogicType == Data.DataLogicType.TimeSpan)
                                    //    sltAllowedTime.Items.Add(new ListItem(Property.DisplayName, Property.Name));
                                }
                            }
                            model.NotifyCondition = listNotifyCondition;
                            model.ApprovalDataItem = listApprovalDataItem;
                            model.CommentDataItem = listCommentDataItem;
                        }

                        #endregion

                        #region 关联对象权限

                        if (BizObject.Associations != null)
                        {
                            foreach (DataModel.BizObjectAssociation association in BizObject.Associations)
                            {
                                DataModel.BizObjectSchema AssociatedSchema = this.Engine.BizObjectManager.GetPublishedSchema(association.AssociatedSchemaCode);
                                if (AssociatedSchema != null && AssociatedSchema.Properties != null)
                                {
                                    lstFrontDataItems.Add(new
                                    {
                                        Text = association.DisplayName,
                                        Value = association.Name,
                                        //标记子表标题行
                                        ItemType = "SubTableHeader"
                                    });
                                    lstPermissionDataItems.Add(association.Name);

                                    foreach (DataModel.PropertySchema AssociatedChildProperty in AssociatedSchema.Properties)
                                    {
                                        if (!DataModel.BizObjectSchema.IsReservedProperty(AssociatedChildProperty.Name))
                                        {
                                            lstFrontDataItems.Add(new
                                            {
                                                Text = association.DisplayName + "." + AssociatedChildProperty.DisplayName,
                                                Value = association.Name + "." + AssociatedChildProperty.Name
                                            });
                                            lstPermissionDataItems.Add(association.Name + "." + AssociatedChildProperty.Name);
                                        }
                                    }
                                }
                            }
                        }

                        #endregion

                        #region 可选表单
                        //TODO
                        // sltSheetCodes.Items.Clear();
                        List <object> listSheetCodes = new List <object>();
                        Sheet.BizSheet[] Sheets = this.Engine.BizSheetManager.GetBizSheetBySchemaCode(Clause.BizSchemaCode);
                        if (Sheets != null)
                        {
                            foreach (Sheet.BizSheet Sheet in Sheets)
                            {
                                listSheetCodes.Add(new { Text = Sheet.DisplayName + "[" + Sheet.SheetCode + "]", Value = Sheet.SheetCode });
                            }
                        }
                        model.SheetCodes = listSheetCodes;
                        #endregion
                    }
                }
                model.DataItems = lstFrontDataItems;

                #endregion

                //设置可选的数据项 TODO 前台处理
                //SetDataItems(lstDataItems);

                #region 前置条件, Text前台需要解析多语言包
                // TODO
                List <object> listEntryCondition = new List <object>();
                listEntryCondition.Add(new { Text = "Designer.Designer_AnyOne", Value = (int)EntryConditionType.Any + string.Empty, Indext = 0 });
                listEntryCondition.Add(new { Text = "Designer.Designer_All", Value = (int)EntryConditionType.All + string.Empty, Index = 1 });
                model.EntryCondition = listEntryCondition;

                #endregion

                #region  步异步

                List <object> listSync = new List <object>();
                listSync.Add(new { Text = "Designer.Designer_Sync", Value = "true", Index = 0 });
                listSync.Add(new { Text = "Designer.Designer_Async", Value = "false", Index = 1 });
                model.SyncOrASync = listSync;
                #endregion

                #region 参与者策略
                //TODO
                List <object> listParAbNormalPolicy = GetParAbnormalPolicy();
                model.ParAbnormalPolicy = listParAbNormalPolicy;


                #endregion

                #region 发起者参与者策略
                List <object> listOriginatorParAbnormalPolicy = GetOriginatorParAbnormalPolicy();
                model.OriginatorParAbnormalPolicy = listOriginatorParAbnormalPolicy;
                #endregion

                #region 参与方式:单人/多人
                //TODO
                List <object> listParticipantMode = new List <object>();
                listParticipantMode.Add(new { Text = "Designer.Designer_Single", Value = (int)ActivityParticipateType.SingleParticipant + string.Empty, Index = 0 });
                listParticipantMode.Add(new { Text = "Designer.Designer_Mulit", Value = (int)ActivityParticipateType.MultiParticipants + string.Empty, Index = 1 });
                model.ParticipantMode = listParticipantMode;
                #endregion

                #region 可选参与方式:并行/串行
                //TODO
                List <object> listParticipateMethod = new List <object>();
                listParticipateMethod.Add(new { Text = "Designer.Designer_Parallel", Value = (int)ParticipateMethod.Parallel + string.Empty, Index = 0 });
                listParticipateMethod.Add(new { Text = "Designer.Designer_Serial", Value = (int)ParticipateMethod.Serial + string.Empty, Index = 1 });
                model.ParticipateMethod = listParticipateMethod;

                #endregion

                #region 提交时检查
                //TODO
                List <object> listSubmittingValidation = new List <object>();
                listSubmittingValidation.Add(new { Text = "Designer.Designer_NotCheck", Value = (int)SubmittingValidationType.None + string.Empty, Index = 0 });
                listSubmittingValidation.Add(new { Text = "Designer.Designer_CheckParticipant", Value = (int)SubmittingValidationType.CheckNextParIsNull + string.Empty, Index = 1 });
                model.SubmittingValidation = listSubmittingValidation;

                #endregion

                #region 子流程数据映射类型

                List <object> lstMapTypes = new List <object>();
                foreach (string WorkflowDataMapInOutType in Enum.GetNames(typeof(OThinker.H3.WorkflowTemplate.WorkflowDataMap.InOutType)))
                {
                    //不需要使用InOutAppend
                    if (WorkflowDataMapInOutType != OThinker.H3.WorkflowTemplate.WorkflowDataMap.InOutType.InOutAppend.ToString())
                    {
                        lstMapTypes.Add(new
                        {
                            Text = WorkflowDataMapInOutType,
                            Value = (int)Enum.Parse(typeof(OThinker.H3.WorkflowTemplate.WorkflowDataMap.InOutType), WorkflowDataMapInOutType) + string.Empty
                        });
                    }
                }
                model.MapTypes = lstMapTypes;

                #endregion

                #region 表单锁
                //TODO

                List <object> listLockLevel = new List <object>();
                listLockLevel.Add(new { Text = "Designer.Designer_PopupManyPeople", Value = (int)LockLevel.Warning + string.Empty });
                listLockLevel.Add(new { Text = "Designer.Designer_ProhibitOneTime", Value = (int)LockLevel.Mono + string.Empty });
                listLockLevel.Add(new { Text = "Designer.Designer_CancelExclusive", Value = (int)LockLevel.CancelOthers + string.Empty });
                model.LockLevel = listLockLevel;

                #endregion

                #region 锁策略
                //TODO
                List <object> listLockPlicy = new List <object>();
                listLockPlicy.Add(new { Text = "Designer.Designer_NotLock", Value = (int)LockPolicy.None + string.Empty });
                listLockPlicy.Add(new { Text = "Designer.Designer_LockOpen", Value = (int)LockPolicy.Open + string.Empty });
                listLockPlicy.Add(new { Text = "Designer.Designer_LockRequest", Value = (int)LockPolicy.Request + string.Empty });
                model.LockPolicy = listLockPlicy;


                #endregion

                #region 超时策略
                //TODO
                List <object> listOvertimePolicy = new List <object>();
                listOvertimePolicy.Add(new { Text = "Designer.Designer_ExecuteStrategy", Value = (int)OvertimePolicy.None + string.Empty });
                listOvertimePolicy.Add(new { Text = "Designer.Designer_Approval", Value = (int)OvertimePolicy.Approve + string.Empty });
                //超时审批拒绝,暂时关闭
                //listOvertimePolicy.Add(new { Text = "Designer.Designer_ApprovalVote", Value = (int)OvertimePolicy.Disapprove + string.Empty });
                listOvertimePolicy.Add(new { Text = "Designer.Designer_AutoComplete", Value = (int)OvertimePolicy.Finish + string.Empty });
                listOvertimePolicy.Add(new { Text = "Designer.Designer_RemindStrategy1", Value = (int)OvertimePolicy.Remind1 + string.Empty });
                listOvertimePolicy.Add(new { Text = "Designer.Designer_RemindStrategy2", Value = (int)OvertimePolicy.Remind2 + string.Empty });
                //超时策略3,4在消息设置中去除,关闭
                //listOvertimePolicy.Add(new { Text = "Designer.Designer_RemindStrategy3", Value = (int)OvertimePolicy.Remind3 + string.Empty });
                //listOvertimePolicy.Add(new { Text = "Designer.Designer_RemindStrategy4", Value = (int)OvertimePolicy.Remind4 + string.Empty });
                model.OvertimePolicy = listOvertimePolicy;


                #endregion

                #region 数据项映射类型

                List <object> lstDataDisposalTypes = new List <object>();
                foreach (string DisposalTypeString in Enum.GetNames(typeof(DataDisposalType)))
                {
                    lstDataDisposalTypes.Add(new
                    {
                        Text = DisposalTypeString,
                        Value = (int)Enum.Parse(typeof(DataDisposalType), DisposalTypeString) + string.Empty
                    });
                }
                model.DataDisposalTypes = lstDataDisposalTypes;

                #endregion

                #region 初始化活动的数据权限

                if (WorkflowVersion == WorkflowDocument.NullWorkflowVersion && WorkflowTemplate != null && WorkflowTemplate.Activities != null)
                {//流程模板编码\显示名称
                    Dictionary <string, string> dicWorkflowNames = new Dictionary <string, string>();
                    //整理数据项权限
                    foreach (Activity Activity in WorkflowTemplate.Activities)
                    {
                        if (Activity is ParticipativeActivity)
                        {
                            ParticipativeActivity ParticipativeActivity = (ParticipativeActivity)Activity;

                            List <string> lstValidPermissionItemNames = new List <string>();
                            List <DataItemPermission> lstValidDataItemPermissions = new List <DataItemPermission>();
                            if (ParticipativeActivity.DataPermissions == null)
                            {
                                ParticipativeActivity.DataPermissions = lstValidDataItemPermissions.ToArray();
                            }

                            if (ParticipativeActivity.DataPermissions != null)
                            {
                                foreach (DataItemPermission DataItemPermission in ParticipativeActivity.DataPermissions)
                                {
                                    if (lstPermissionDataItems.Contains(DataItemPermission.ItemName))
                                    {
                                        lstValidDataItemPermissions.Add(DataItemPermission);
                                        lstValidPermissionItemNames.Add(DataItemPermission.ItemName);
                                    }
                                }
                            }

                            foreach (string ItemName in lstPermissionDataItems)
                            {
                                if (!lstValidPermissionItemNames.Contains(ItemName))
                                {
                                    lstValidDataItemPermissions.Add(new DataItemPermission()
                                    {
                                        ItemName = ItemName,
                                        Visible = true,
                                        MobileVisible = true
                                    });
                                    lstValidPermissionItemNames.Add(ItemName);
                                }
                            }

                            ParticipativeActivity.DataPermissions = lstValidDataItemPermissions.ToArray();
                        }
                        //子流程:获取流程模板显示名称
                        else if (Activity is SubInstanceActivity)
                        {
                            string _SubWorkflowCode = ((SubInstanceActivity)Activity).WorkflowCode;
                            if (!string.IsNullOrEmpty(_SubWorkflowCode) && !dicWorkflowNames.ContainsKey(_SubWorkflowCode.ToLower()))
                            {
                                WorkflowClause _SubClause = this.Engine.WorkflowManager.GetClause(_SubWorkflowCode);
                                dicWorkflowNames.Add(_SubWorkflowCode.ToLower(), _SubClause == null ? _SubWorkflowCode : _SubClause.WorkflowName);
                            }
                        }
                    }
                    //流程模板编码\显示名称
                    model.WorkflowNames = dicWorkflowNames;
                }

                #endregion
                model.WorkflowTemplate = WorkflowTemplate;

                #region 数据项

                model.DataItemsSelect = GetALLDataItems(WorkflowCode);
                #endregion

                return Json(model, JsonRequestBehavior.AllowGet);
            }));
        }