Sat Dec 07, 2019 3:53 am
Login Register Lost Password? Contact Us


Conditional issue with MAP & IF

Questions around writing code and queries

Tue Nov 19, 2019 6:28 am Change Time Zone

Hi ALL,
Facing issue with Map and If/Iff it always call SOAP Function irrespective it falls in condition or not.I have to update DOPS(Params) on basis of Env which i pass but it initiates soapcall always so ideally soap calls fails with connection error, Tried with NoFold too it .

SOAP call should run only for PROD env but MAP and IF not giving enough levarage to use it .


IMPORT india_ecl_common.dops;
demoFunction := MODULE
Boolean IsEnvProd := india_ecl_common.LoadConfig.CI.Constants.isPROD;;

updateBuildVersionKeys := Dops.UpdateVersion('LifePolicyKeys', trim('20191117',left,right), 'DataEngineering.India@lexisnexis.com,indiaroxiepackageteam@lexisnexis.com','Y','R',,'N',,,,, IsEnvProd);
updateBuildVersionKeys := NOFOLD(MAP(~IsEnvProd => OUTPUT('Non-prod environment'),
IsEnvProd => Dops.UpdateVersion('LifePolicyKeys', trim('20191117',left,right), 'DataEngineering.India@lexisnexis.com,indiaroxiepackageteam@lexisnexis.com','Y','R',,'N',,,,, IsEnvProd),

OUTPUT('Undefined environment')));

// action1 := MAP(IsEnvProd = TRUE => updateBuildVersionKeys,
// IsEnvProd = FALSE => OUTPUT('Non-prod environment'), OUTPUT('Undefined environment'));

// EXPORT action := MAP(IsEnvProd = TRUE => updateBuildVersionKeys, IsEnvProd = FALSE => OUTPUT('Non-prod environment'), OUTPUT('Undefined environment'));
// EXPORT action := nofold(iff(IsEnvProd, updateBuildVersionKeys));
EXPORT action := updateBuildVersionKeys;
END;

demoFunction.action;
harshdesai
 
Posts: 18
Joined: Fri Feb 23, 2018 8:30 am

Tue Nov 19, 2019 12:30 pm Change Time Zone

Please can you open a jira.

I am likely to need an archive of the query, and some details of which soapcall is being called incorrectly to be able to provide any help.
ghalliday
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 185
Joined: Wed May 18, 2011 9:48 am

Wed Nov 20, 2019 5:20 am Change Time Zone

harshdesai
 
Posts: 18
Joined: Fri Feb 23, 2018 8:30 am


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron