From ed5fdab52a66eb002e3533f071d78be7daeb9746 Mon Sep 17 00:00:00 2001 From: Dona Jose Date: Mon, 29 Apr 2024 11:43:01 +0530 Subject: [PATCH 1/3] Api Loops & Transactions initial commit --- Objects/ApiBuilderRelated/EbApi .cs | 149 ++++++++++++++++++ Objects/SqlJobRelated/EbSqlJob.cs | 27 ++-- .../SqlJobService_Artifacts.cs | 2 +- 3 files changed, 164 insertions(+), 14 deletions(-) diff --git a/Objects/ApiBuilderRelated/EbApi .cs b/Objects/ApiBuilderRelated/EbApi .cs index 66b6f99e..72cffcce 100644 --- a/Objects/ApiBuilderRelated/EbApi .cs +++ b/Objects/ApiBuilderRelated/EbApi .cs @@ -228,6 +228,65 @@ private bool IsRequired(string name) return p == null || p.Required; } + [MetaOnly] + //[HideInPropertyGrid] + [EnableInBuilder(BuilderType.ApiBuilder)] + public ColumnColletion FirstReaderKeyColumnsColl { get; set; } + + private List _firstReaderKeyColumns = null; + public List FirstReaderKeyColumns + + { + get + { + if (_firstReaderKeyColumns == null) + { + _firstReaderKeyColumns = new List(); + foreach (EbDataColumn c in FirstReaderKeyColumnsTemp) + if (c != null) + _firstReaderKeyColumns.Add(c.ColumnName); + } + return _firstReaderKeyColumns; + } + } + + [EnableInBuilder(BuilderType.ApiBuilder)] + [PropertyEditor(PropertyEditorType.CollectionFrmSrc, "FirstReaderKeyColumnsColl")] + [Alias("First Reader Key Column")] + public ColumnColletion FirstReaderKeyColumnsTemp { get; set; } + + [MetaOnly] + //[HideInPropertyGrid] + [EnableInBuilder(BuilderType.ApiBuilder)] + public List ParameterKeyColumnsColl { get; set; } + + + private List _parameterKeyColumns = null; + public List ParameterKeyColumns + { + get + { + if (_parameterKeyColumns == null) + { + _parameterKeyColumns = new List(); + foreach (Param _p in ParameterKeyColumnsTemp) + { + if (_p != null) + _parameterKeyColumns.Add(_p.Name); + } + } + return _parameterKeyColumns; + } + } + + [EnableInBuilder(BuilderType.ApiBuilder)] + [Alias("Parameter Key Column")] + [PropertyEditor(PropertyEditorType.CollectionFrmSrc, "ParameterKeyColumnsColl")] + + public List ParameterKeyColumnsTemp { get; set; } + + + public EbApi GetApi(string RefId, IRedisClient Redis, IDatabase ObjectsDB, IDatabase DataDB) { EbApi Api = GetEbObject(RefId, Redis, ObjectsDB); @@ -239,6 +298,13 @@ public EbApi GetApi(string RefId, IRedisClient Redis, IDatabase ObjectsDB, IData public EbApi() { + ParameterKeyColumnsColl = new List(); + + ParameterKeyColumnsTemp = new List(); + + FirstReaderKeyColumnsTemp = new ColumnColletion(); + + FirstReaderKeyColumnsColl = new ColumnColletion(); } } @@ -260,6 +326,8 @@ public abstract class ApiResources : EbApiWrapper public virtual object GetResult() { return this.Result; } public virtual List GetParameters(Dictionary requestParams) { return null; } + + public virtual List GetOutParams(List _param, int step) { return new List(); } } [EnableInBuilder(BuilderType.ApiBuilder)] @@ -958,4 +1026,85 @@ public override string GetDesignHtml() ".RemoveCR().DoubleQuoted(); } } + + [EnableInBuilder(BuilderType.ApiBuilder)] + public class EbLoop : ApiResources, IApiCtrlCollection + { + [EnableInBuilder(BuilderType.ApiBuilder)] + [HideInPropertyGrid] + public OrderedList InnerResources { get; set; } + public override List GetOutParams(List _param, int step) + { + List OutParams; + if (this.InnerResources[0] is IApiCtrlCollection) + OutParams = ((this.InnerResources[0] as IApiCtrlCollection).InnerResources[step - 1]).GetOutParams(_param, step); + else + OutParams = this.InnerResources[step - 1].GetOutParams(_param, step); + + return OutParams; + } + public override string GetDesignHtml() + { + return @"
+
+
Loop Start
+
+
+
+
Loop End
+
+
".RemoveCR().DoubleQuoted(); + } + } + + [EnableInBuilder(BuilderType.ApiBuilder)] + public class EbTransaction : ApiResources, IApiCtrlCollection + { + [EnableInBuilder(BuilderType.ApiBuilder)] + [HideInPropertyGrid] + public OrderedList InnerResources { get; set; } + + public override List GetOutParams + (List _param, int step) + { + List OutParams; + if (this.InnerResources[0] is IApiCtrlCollection) + OutParams = ((this.InnerResources[0] as IApiCtrlCollection).InnerResources[step - 1]).GetOutParams(_param, step); + else + OutParams = this.InnerResources[step - 1].GetOutParams(_param, step); + + foreach (Param p in OutParams) + { + p.Value = (this.Result as Param).Value; + } + return _param; + } + public override string GetDesignHtml() + { + return @"
+
+
Transaction Start
+
+
+
+
Transaction End
+
+
".RemoveCR().DoubleQuoted(); + } + } + + public interface IApiCtrlCollection + { + [EnableInBuilder(BuilderType.ApiBuilder)] + OrderedList InnerResources { get; set; } + } + + [EnableInBuilder(BuilderType.ApiBuilder)] + public class OrderedList : List + { + public OrderedList() + { + this.Sort((x, y) => x.RouteIndex.CompareTo(y.RouteIndex)); + } + } } diff --git a/Objects/SqlJobRelated/EbSqlJob.cs b/Objects/SqlJobRelated/EbSqlJob.cs index 2f724adc..b5cfab7b 100644 --- a/Objects/SqlJobRelated/EbSqlJob.cs +++ b/Objects/SqlJobRelated/EbSqlJob.cs @@ -84,7 +84,7 @@ public class EbSqlJob : EbSqlJobWrapper, IEBRootObject [EnableInBuilder(BuilderType.SqlJob)] [HideInPropertyGrid] - public OrderedList Resources { set; get; } + public OrderedList1 Resources { set; get; } [EnableInBuilder(BuilderType.SqlJob)] [HideInPropertyGrid] @@ -186,15 +186,15 @@ public LoopLocation GetLoop() { if (Resources[i] is ISqlJobCollection) { - if (Resources[i] is EbLoop) - LoopLocation = new LoopLocation { Loop = Resources[i] as EbLoop, Step = i, ParentIndex = i }; + if (Resources[i] is EbLoop1) + LoopLocation = new LoopLocation { Loop = Resources[i] as EbLoop1, Step = i, ParentIndex = i }; else { for (int j = 0; j < (Resources[i] as ISqlJobCollection).InnerResources.Count; j++) { - if ((Resources[i] as ISqlJobCollection).InnerResources[j] is EbLoop) - LoopLocation = new LoopLocation { Loop = (Resources[i] as ISqlJobCollection).InnerResources[j] as EbLoop, Step = j, ParentIndex = i }; + if ((Resources[i] as ISqlJobCollection).InnerResources[j] is EbLoop1) + LoopLocation = new LoopLocation { Loop = (Resources[i] as ISqlJobCollection).InnerResources[j] as EbLoop1, Step = j, ParentIndex = i }; } } } @@ -214,9 +214,9 @@ public override void ReplaceRefid(Dictionary RefidMap) } [EnableInBuilder(BuilderType.SqlJob)] - public class OrderedList : List + public class OrderedList1 : List { - public OrderedList() + public OrderedList1() { this.Sort((x, y) => x.RouteIndex.CompareTo(y.RouteIndex)); } @@ -230,11 +230,11 @@ public enum SqlJobTypes [EnableInBuilder(BuilderType.SqlJob)] - public class EbLoop : SqlJobResource, ISqlJobCollection + public class EbLoop1 : SqlJobResource, ISqlJobCollection { [EnableInBuilder(BuilderType.SqlJob)] [HideInPropertyGrid] - public OrderedList InnerResources { get; set; } + public OrderedList1 InnerResources { get; set; } public override List GetOutParams(List _param, int step) { List OutParams; @@ -261,13 +261,14 @@ public override string GetDesignHtml() [EnableInBuilder(BuilderType.SqlJob)] - public class EbTransaction : SqlJobResource, ISqlJobCollection + public class EbTransaction1 : SqlJobResource, ISqlJobCollection { [EnableInBuilder(BuilderType.SqlJob)] [HideInPropertyGrid] - public OrderedList InnerResources { get; set; } + public OrderedList1 InnerResources { get; set; } - public override List GetOutParams(List _param, int step) + public override List GetOutParams + (List _param, int step) { List OutParams; if (this.InnerResources[0] is ISqlJobCollection) @@ -506,7 +507,7 @@ public override string GetDesignHtml() public interface ISqlJobCollection { [EnableInBuilder(BuilderType.SqlJob)] - OrderedList InnerResources { get; set; } + OrderedList1 InnerResources { get; set; } } [RuntimeSerializable] diff --git a/ServiceStack_Artifacts/SqlJobService_Artifacts.cs b/ServiceStack_Artifacts/SqlJobService_Artifacts.cs index 2d6d0212..ab25b41f 100644 --- a/ServiceStack_Artifacts/SqlJobService_Artifacts.cs +++ b/ServiceStack_Artifacts/SqlJobService_Artifacts.cs @@ -118,7 +118,7 @@ public class LogLine public class LoopLocation { - public EbLoop Loop { get; set; } + public EbLoop1 Loop { get; set; } public int Step { get; set; } From c70950754319120df0dde64c9be67e9ec88f3e61 Mon Sep 17 00:00:00 2001 From: Dona Jose Date: Wed, 5 Jun 2024 11:30:31 +0530 Subject: [PATCH 2/3] Update EbApi .cs --- Objects/ApiBuilderRelated/EbApi .cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/ApiBuilderRelated/EbApi .cs b/Objects/ApiBuilderRelated/EbApi .cs index c8da0e68..c6de4ebf 100644 --- a/Objects/ApiBuilderRelated/EbApi .cs +++ b/Objects/ApiBuilderRelated/EbApi .cs @@ -312,7 +312,7 @@ public List ParameterKeyColumns - public EbApi GetApi(string RefId, IRedisClient Redis, IDatabase ObjectsDB, IDatabase DataDB) + public EbApi GetApi(string RefId, int ObjId, IRedisClient Redis, IDatabase ObjectsDB, IDatabase DataDB) { EbApi Api = null; From 28bd5a6642ebf3c3af67731ae983689ad7c01c03 Mon Sep 17 00:00:00 2001 From: Dona Jose Date: Sun, 8 Jun 2025 14:33:19 +0530 Subject: [PATCH 3/3] loops related --- Helpers/ApiHelpers.cs | 27 ++-- Objects/ApiBuilderRelated/EbApi .cs | 169 +++++++++++++++++++++-- Objects/ApiBuilderRelated/EbProcessor.cs | 6 +- 3 files changed, 174 insertions(+), 28 deletions(-) diff --git a/Helpers/ApiHelpers.cs b/Helpers/ApiHelpers.cs index d7894804..3edf4670 100644 --- a/Helpers/ApiHelpers.cs +++ b/Helpers/ApiHelpers.cs @@ -137,44 +137,47 @@ public static List GetReqJsonParameters(ListOrdered Components, IRedisCli return parameters; } - public static object GetResult(ApiResources resource, EbApi Api, RabbitMqProducer mqp, Service service, EbStaticFileClient FileClient) + public static object GetResult(ApiResources resource, EbApi Api, int index = 0, int parentindex = 0) { ResultWrapper res = new ResultWrapper(); switch (resource) { case EbSqlReader reader: - res.Result = (reader as EbSqlReader).ExecuteDataReader(Api); + res.Result = reader.ExecuteDataReader(Api); break; case EbSqlWriter writer: - res.Result = (writer as EbSqlWriter).ExecuteDataWriter(Api); + res.Result = writer.ExecuteDataWriter(Api); break; case EbSqlFunc func: - res.Result = (func as EbSqlFunc).ExecuteSqlFunction(Api); + res.Result = func.ExecuteSqlFunction(Api); break; case EbEmailNode email: - res.Result = (email as EbEmailNode).ExecuteEmail(Api, mqp); + res.Result = email.ExecuteEmail(Api); break; case EbProcessor processor: - res.Result = (processor as EbProcessor).ExecuteScript(Api, mqp, service, FileClient); + res.Result = processor.ExecuteScript(Api); break; case EbConnectApi ebApi: - res.Result = (ebApi as EbConnectApi).ExecuteConnectApi(Api, service); + res.Result = ebApi.ExecuteConnectApi(Api); break; case EbThirdPartyApi thirdParty: - res.Result = (thirdParty as EbThirdPartyApi).ExecuteThirdPartyApi(thirdParty, Api); + res.Result = thirdParty.ExecuteThirdPartyApi(thirdParty, Api); break; case EbFormResource form: - res.Result = (form as EbFormResource).ExecuteFormResource(Api, service); + res.Result = form.ExecuteFormResource(Api); break; case EbEmailRetriever retriever: - res.Result = (retriever as EbEmailRetriever).ExecuteEmailRetriever(Api, service, true); + res.Result = retriever.ExecuteEmailRetriever(Api, true); break; case EbFtpPuller puller: - res.Result = (puller as EbFtpPuller).ExecuteFtpPuller(); + res.Result = puller.ExecuteFtpPuller(); break; case EbCSVPusher pusher: - res.Result = (pusher as EbCSVPusher).ExecuteCSVPusher(Api, service, FileClient, true); + res.Result = pusher.ExecuteCSVPusher(Api); + break; + case EbLoop loop: + res.Result = loop.DoLoop(Api, index, parentindex); break; default: res.Result = null; diff --git a/Objects/ApiBuilderRelated/EbApi .cs b/Objects/ApiBuilderRelated/EbApi .cs index 10dad4e8..817476e4 100644 --- a/Objects/ApiBuilderRelated/EbApi .cs +++ b/Objects/ApiBuilderRelated/EbApi .cs @@ -130,6 +130,12 @@ public class EbApi : EbApiWrapper, IEBRootObject public new IRedisClient Redis { get; set; } + public EbStaticFileClient FileClient { get; set; } + + public RabbitMqProducer MessageProducer { get; set; } + + public Service Service { get; set; } + public int Step = 0; public override List DiscoverRelatedRefids() @@ -394,6 +400,43 @@ public void UpdateLog() } + private Dictionary _keyValuePairs = null; + + public Dictionary GetKeyvalueDict + { + get + { + if (_keyValuePairs == null) + { + _keyValuePairs = new Dictionary(); + foreach (string key in this.FirstReaderKeyColumns) + { + if (!_keyValuePairs.ContainsKey(key)) + _keyValuePairs.Add(key, new TV { }); + } + foreach (string key in this.ParameterKeyColumns) + { + if (!_keyValuePairs.ContainsKey(key)) + _keyValuePairs.Add(key, new TV { }); + } + } + return _keyValuePairs; + } + } + + public string FillKeys(EbDataRow dataRow) + { + foreach (var item in this.GlobalParams) + if (GetKeyvalueDict.ContainsKey(item.Key)) + this.GetKeyvalueDict[item.Key] = null;// this.Api.GlobalParams[item.Key]; + for (int i = 0; i < dataRow.Count; i++) + { + if (GetKeyvalueDict.ContainsKey(dataRow.Table.Columns[i].ColumnName)) + this.GetKeyvalueDict[dataRow.Table.Columns[i].ColumnName] = new TV { Value = dataRow[i].ToString(), Type = ((int)dataRow.Table.Columns[i].Type).ToString() }; + } + return JsonConvert.SerializeObject(GetKeyvalueDict); ; + } + public EbApi() { ParameterKeyColumnsColl = new List(); @@ -663,7 +706,7 @@ public override string GetDesignHtml() ".RemoveCR().DoubleQuoted(); } - public bool ExecuteEmail(EbApi Api, RabbitMqProducer MessageProducer3) + public bool ExecuteEmail(EbApi Api) { bool status; @@ -675,7 +718,7 @@ public bool ExecuteEmail(EbApi Api, RabbitMqProducer MessageProducer3) Api.FillParams(InputParams); - MessageProducer3.Publish(new EmailAttachmentRequest() + Api.MessageProducer.Publish(new EmailAttachmentRequest() { ObjId = Convert.ToInt32(this.Reference.Split(CharConstants.DASH)[3]), Params = InputParams, @@ -768,7 +811,7 @@ public override object GetResult() return (this.Result as ApiResponse).Result; } - public object ExecuteConnectApi(EbApi Api, Service Service) + public object ExecuteConnectApi(EbApi Api) { ApiResponse resp = null; @@ -794,7 +837,7 @@ public object ExecuteConnectApi(EbApi Api, Service Service) string version = this.Version.Replace(".w", ""); - resp = Service.Gateway.Send(new ApiMqRequest + resp = Api.Service.Gateway.Send(new ApiMqRequest { Name = this.RefName, Version = version, @@ -858,7 +901,7 @@ public override string GetDesignHtml() ".RemoveCR().DoubleQuoted(); } - public object ExecuteFormResource(EbApi Api, Service Service) + public object ExecuteFormResource(EbApi Api) { try { @@ -893,7 +936,7 @@ public object ExecuteFormResource(EbApi Api, Service Service) }; EbConnectionFactory ebConnection = new EbConnectionFactory(Api.SolutionId, Api.Redis); - InsertOrUpdateFormDataResp resp = EbFormHelper.InsertOrUpdateFormData(request, Api.DataDB, Service, Api.Redis, ebConnection); + InsertOrUpdateFormDataResp resp = EbFormHelper.InsertOrUpdateFormData(request, Api.DataDB, Api.Service, Api.Redis, ebConnection); if (resp.Status == (int)HttpStatusCode.OK) return resp.RecordId; @@ -968,14 +1011,14 @@ public override string GetDesignHtml() ".RemoveCR().DoubleQuoted(); } - public object ExecuteEmailRetriever(EbApi Api, Service Service, bool isMq) + public object ExecuteEmailRetriever(EbApi Api, bool isMq) { try { EbConnectionFactory EbConnectionFactory = new EbConnectionFactory(Api.SolutionId, Api.Redis); if (EbConnectionFactory.EmailRetrieveConnection[this.MailConnection] != null) { - RetrieverResponse retrieverResponse = EbConnectionFactory.EmailRetrieveConnection[this.MailConnection].Retrieve(Service, this.DefaultSyncDate, Api.SolutionId, isMq, SubmitAttachmentAsMultipleForm); + RetrieverResponse retrieverResponse = EbConnectionFactory.EmailRetrieveConnection[this.MailConnection].Retrieve(Api.Service, this.DefaultSyncDate, Api.SolutionId, isMq, SubmitAttachmentAsMultipleForm); EbWebForm _form = Api.Redis.Get(this.Reference); SchemaHelper.GetWebFormSchema(_form); @@ -985,7 +1028,7 @@ public object ExecuteEmailRetriever(EbApi Api, Service Service, bool isMq) foreach (RetrieverMessage _m in retrieverResponse?.RetrieverMessages) { - InsertFormData(_form, data, _m, this.Reference, Api.SolutionId, Api.UserObject, Api.Redis, Service, EbConnectionFactory); + InsertFormData(_form, data, _m, this.Reference, Api.SolutionId, Api.UserObject, Api.Redis, Api.Service, EbConnectionFactory); } } else @@ -1145,7 +1188,7 @@ public override string GetDesignHtml() ".RemoveCR().DoubleQuoted(); } - public object ExecuteCSVPusher(EbApi Api, Service Service, EbStaticFileClient FileClient, bool isMq) + public object ExecuteCSVPusher(EbApi Api) { try { @@ -1153,7 +1196,7 @@ public object ExecuteCSVPusher(EbApi Api, Service Service, EbStaticFileClient Fi object data = (Api.Resources[Api.Step - 1])?.Result; if (data != null && (data as Stream).Length > 0) { - UploadCSVByLoopHoc(data as Stream, Service, Api); + UploadCSVByLoopHoc(data as Stream, Api.Service, Api); } else { @@ -1396,18 +1439,118 @@ public override List GetOutParams(List _param, int step) return OutParams; } + public override string GetDesignHtml() { return @"
Loop Start
-
+
Loop End
".RemoveCR().DoubleQuoted(); } + + public const string EB_LOC_ID = "eb_loc_id"; + + public bool DoLoop( EbApi Api, int step, int parentindex) + { + EbDataTable _table; + try + { + if (parentindex == 0 && step == 1) + _table = (Api.Resources[step - 1].Result as EbDataSet).Tables[0]; + else + _table = (Api.Resources[parentindex - 1].Result as EbDataSet).Tables[0]; + + int _rowcount = _table.Rows.Count; + for (int i = 0; i < _rowcount; i++) + { + try + { + EbDataColumn cl = _table.Columns[0]; + Param _outparam = new Param + { + Name = cl.ColumnName, + Type = cl.Type.ToString(), + Value = _table.Rows[i][cl.ColumnIndex].ToString() + }; + Api.Resources[step].Result = _outparam; + if (Api.GlobalParams.ContainsKey(_outparam.Name)) + Api.GlobalParams[_outparam.Name] = new TV { Type = _outparam.Type, Value = _outparam.Value }; + else + Api.GlobalParams.Add(_outparam.Name, new TV { Type = _outparam.Type, Value = _outparam.Value }); + + + if (!Api.GlobalParams.ContainsKey(EB_LOC_ID)) + { + if (_table.Columns[EB_LOC_ID] != null) + { + Api.GlobalParams.Add(EB_LOC_ID, new TV { Type = EbDbTypes.Int32.ToString(), Value = _table.Rows[i][EB_LOC_ID].ToString() }); + } + } + + ExecuteLoop(Api, 0, step, parentindex, _table.Rows[i], null); + // message = "Loop Execution Success. counter " + i + " of " + _rowcount; + } + catch (Exception e) + { + // message = "Loop Failed to execute. counter " + i + " of " + _rowcount; + Console.WriteLine(e.Message + e.StackTrace); + } + } + // MasterResult.Add(new SqlJobResult { Message = "Loop execution Success with " + _rowcount + " iterations.", Type = ResourceType.Loop }); + } + catch (Exception e) + { + // MasterResult.Add(new SqlJobResult { Message = "Loop execution Failed" + e.Message, Type = ResourceType.Loop }); + Console.WriteLine(e.Message + e.StackTrace); + } + return true; + } + + + + + + public void ExecuteLoop(EbApi Api, int retryof, int step, int parentindex, EbDataRow dataRow, Dictionary keyvals) + { + try + { + int counter; + string _keyvalues = (dataRow is null) ? JsonConvert.SerializeObject(keyvals) : Api.FillKeys(dataRow); + try + { + for (counter = 0; counter < this.InnerResources.Count; counter++) + { + if (this.InnerResources[counter] is EbProcessor) + { + if (this.InnerResources[counter - 1] is EbSqlReader) + if (((this.InnerResources[counter - 1] as EbSqlReader).Result as EbDataSet).Tables[0].Rows.Count > 0) + this.InnerResources[counter].Result = EbApiHelper.GetResult(this.InnerResources[counter],Api, counter, step); + else + { + Console.WriteLine("Datareader returned 0 rows : " + (this.InnerResources[counter - 1] as EbSqlReader).RefId + "\n" + + JsonConvert.SerializeObject(dataRow)); + return; + } + } + this.InnerResources[counter].Result = EbApiHelper.GetResult(this.InnerResources[counter],Api, counter, step); + } + } + catch (Exception e) + { + throw e; + } + } + catch (Exception e) + { + Console.WriteLine("Error at LoopExecution"); + throw e; + } + } } [EnableInBuilder(BuilderType.ApiBuilder)] @@ -1438,7 +1581,7 @@ public override string GetDesignHtml()
Transaction Start
-
+
Transaction End
diff --git a/Objects/ApiBuilderRelated/EbProcessor.cs b/Objects/ApiBuilderRelated/EbProcessor.cs index e54a4a24..29fff3d0 100644 --- a/Objects/ApiBuilderRelated/EbProcessor.cs +++ b/Objects/ApiBuilderRelated/EbProcessor.cs @@ -68,7 +68,7 @@ private Script GetScriptEvaluatorV1() return evaluator; } - public object ExecuteScript(EbApi Api, RabbitMqProducer mqp, Service service, EbStaticFileClient Fileclient) + public object ExecuteScript(EbApi Api) { ApiGlobalParent global; @@ -112,14 +112,14 @@ public object ExecuteScript(EbApi Api, RabbitMqProducer mqp, Service service, Eb global.GoToByIndexHandler += (index) => { Api.Step = index; - Api.Resources[index].Result = EbApiHelper.GetResult(Api.Resources[index], Api, mqp, service, Fileclient); + Api.Resources[index].Result = EbApiHelper.GetResult(Api.Resources[index], Api); }; global.GoToByNameHandler += (name) => { int index = Api.Resources.GetIndex(name); Api.Step = index; - Api.Resources[index].Result = EbApiHelper.GetResult(Api.Resources[index], Api, mqp, service, Fileclient); + Api.Resources[index].Result = EbApiHelper.GetResult(Api.Resources[index], Api); }; global.ExitResultHandler += (obj) =>