Dynamic parameter in STEP CONDITION

Hi

I want to provide the dynamic value in my STEP condition where i want to check if apikey (custom) starts with "internal_{request.queryparam.tenantId}" where {request.queryparam.tenantId} should be replaced by actual tenantId which is passed in query param.

 <Step>
     <Name>PrepareRequestToAuthenticateSystemUser</Name>
     <Condition>request.queryparam.username != null AND request.queryparam.password != null AND request.queryparam.apikey =| "internal_{request.queryparam.tenantId}"</Condition>
  </Step>

Above is not working. Please suggest

0 2 521
2 REPLIES 2

@GAURAV ,

It's by design.

You cannot do any computation inside the conditional statement. That means you cannot concatenate using flow variable notation of curly brackets.

If you would like to do same, Please use javascript before conditional policy execution & set a variable. Use same in conditional statement to compare. Please use sample proxy below. Hope it helps.

dynamiccondition-rev1-2016-07-03.zip

Not applicable

Hi,

Agree to Anil.

I have the similar requrimentt based on the different content type and Request parameter i have to validate and generate error message.

I use the java script to so do so as i am not sure the exact parameter value at run time.