Need Detail descrition on timeLimit tag in JavaScript policy

plvndinesh
Participant II

<Javascriptname="Javascript-1"enabled="true"continueOnError="false"async="false"timeLimit="200">

In this tag timeLimit="200"

1.Can it is possible to set time 2minutes(120000) in time limit.

2.Supose my code in javascript takes 1min.54sec to execute so always I will get positive results (or) there may be chance of time out error.

3.About serviceCallout policy is there any time configuration in it( when Http request done it should wait untill success fetching the result,it can be achieve by using policies but I don't need that way).

4.suppose I have a conditional flow in a proxy which included first.js,I have made two parallel request so first request flow instance is independent of second request flow instance or not the code execution of first.js in first request will effect second request (it's blind question but please give valuable comments).

5.Is there any configuration time to set for a proxy execution(if so can we make specific to conditional flow also).

0 2 424
2 REPLIES 2

1. yes

2. ah, no. There is no way Apigee Edge can guarantee a "positive result". It depends on what your JS is doing. if the code is buggy then there will not be a "positive result". If you use the httpClient within JS, then there is a distinct timeout that applies, and I beleive it is set to 60s, and it cannot be changed. Therefore a remote call performed within a JS callout using httpClient may timeout. Your code needs to accommodate this.

3. Yes, check the HTTPTargetConnection documentation. you can set the io timeouts.

4. I don't understand the question it all runs together maybe use a few more periods, commas, and other punctuation

5. no

I have a conditional flow consist of javaScript Policy(first.js) has timeLimit="120000" and i had made two request to the flow in " 20ms".

Q1. The first request takes "200ms" to execute code in first.js,In the mean while the second request hit the proxy to the same conditional flow,so every request has it own instance of execution and they are independent of execution to each request or not.