Пример #1
0
        private static object HandleGetData(HttpContext httpContext, RuntimeStepModel newrunmodel, ISqlSugarClient dbFactory, AConFlowStep s)
        {
            object dynaObject = null;

            //var objParams2 = new List<object>();
            //if (!string.IsNullOrEmpty(s.ArgNames))
            //{
            //    var args = s.ArgNames.Split(',');
            //    foreach (var aarg in args)
            //    {
            //        object obj = aarg;
            //        if (aarg.StartsWith("&"))
            //        {
            //            obj = newrunmodel.Resuce(aarg);

            //        }
            //        objParams2.Add(obj);
            //    }
            //}
            if (!String.IsNullOrEmpty(s.ArgNames))
            {
                if (s.ArgNames.Contains(','))
                {
                    dynaObject = newrunmodel.Resuce(s.ArgNames.Split(',')[0]);
                }
                else
                {
                    dynaObject = newrunmodel.Resuce(s.ArgNames);
                }
            }

            //if (objParams2 == null || objParams2.Count == 0)
            //{
            //    dynaObject = APP.GetData( s.InParamter1);
            //}
            //else
            //{
            dynaObject = APP.GetData(s.InParamter1, dynaObject);
            //}

            return(dynaObject);
        }
Пример #2
0
        private static async Task CheckAndRunNextRuntimeComposity(int requsetHash, HttpContext httpContext, RuntimeStepModel newrunmodel, ISqlSugarClient dbFactory, ISysDatabaseService codeService, IConfiguration config)
        {
            var resouce = newrunmodel.Resuce(newrunmodel.NextRunTimeKey);

            if (resouce != null)
            {
                var guid = (string)resouce;
                if (string.IsNullOrEmpty(guid))
                {
                    //newrunmodel.ResouceInfos.Remove(newrunmodel.NextRunTimeKey);
                    return;
                }
                var nextcon = codeService.GetConposity(guid).FirstOrDefault();
                if (nextcon == null)
                {
                    nextcon = new ComposeEntity()
                    {
                        Guid    = guid,
                        RunMode = RunMode.Coding
                    };
                    var reint = codeService.InsertCode(nextcon);
                }
                else
                {
                    var nextRnmodel = new RuntimeStepModel(config)
                    {
                        ParentRuntimeModel = newrunmodel,
                        Res           = newrunmodel.Res,
                        ComposeEntity = nextcon,
                        HashCode      = nextcon.GetHash()
                    };
                    nextRnmodel.Res.Remove(newrunmodel.NextRunTimeKey);
                    await RunComposity(requsetHash, httpContext, nextRnmodel, dbFactory, codeService, config);
                }
            }
        }