cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Error in expression

amit_saroha
New Contributor III

Hi All,

Can you please help me understand why I am getting the below errors while using the below expression?

Expression -
eval(โ€œlib.environment.getAppConf(โ€˜OracleEBSโ€™).โ€ + lib.parameters.getAppConf(โ€˜parametersโ€™).EBS_Instance + โ€œ.srcDBโ€)

Error -

failure:

โ€œUnexpected error occurred while evaluating expression: lib.environment.getAppConf(โ€˜OracleEBSโ€™).FNDV.srcDBโ€

value:

โ€œPlease check your expressionโ€

reason:

โ€œPlease check your expressionโ€

5 REPLIES 5

viktor_n
Contributor II

Hi @amit.saroha,

Try instead of eval function to do it with square brackets.
I think that will work.

Like this:
lib.environment.getAppConf(โ€˜OracleEBSโ€™)[lib.parameters.getAppConf(โ€˜parametersโ€™).EBS_Instance]['srcDB']

Regards,
Viktor

amit_saroha
New Contributor III

@viktor_n - Thank you, it worked but what I should do if I have to fetch value for any specific DB?

Can you explain it a little bit more what you want to achieve

amit_saroha
New Contributor III

Hi Victor,

Enclosed are the expression files. What I want is to retrieve 4 values (say to pass in child pipelines or in some mapper) and I am trying to do it as below but my expressions are failing. You already helped me to correct one of them.

What I want is that if I am in Dev then the expression must return dev configuration values and when in prod then prod values.

I would truly appreciate if you can help me doing so.

  1. Database_Account

  2. Oracle_Cloud_Soap_Account

  3. HCM_Flow_Service_WSDL

  4. Generic_Soap_WSDL

  5. eval(โ€œlib.environment.getAppConf(โ€˜OracleEBSโ€™).โ€ + lib.parameters.getAppConf(โ€˜parametersโ€™).EBS_Instance + โ€œ.srcDBโ€)

  6. eval(โ€œlib.environment.getAppConf(โ€˜HCMCloudโ€™).โ€ + (lib.parameters.getAppConf(โ€˜parametersโ€™).HCM_Cloud_Instance) + โ€œ.Soap_Accountโ€)

  7. eval(โ€œlib.environment.getAppConf(โ€˜HCMCloudโ€™).โ€+ (lib.parameters.getAppConf(โ€˜parametersโ€™).HCM_Cloud_Instance) +โ€œ.URLโ€) + lib.parameters.getAppConf(โ€˜parametersโ€™).HCM_Flow_Service_WSDL_URL

  8. eval(โ€œlib.environment.getAppConf(โ€˜HCMCloudโ€™).โ€+ (lib.parameters.getAppConf(โ€˜parametersโ€™).HCM_Cloud_Instance) +โ€œ.URLโ€) + lib.parameters.getAppConf(โ€˜parametersโ€™).Generic_Soap_WSDL_URL

HCM_Interface_config.expr (1.3 KB)
HCM_Interface_Processes.expr (695 Bytes)
config.expr (3.6 KB)