Comments and answers for "Make the HTTPCaller stops when I have what I need" https://knowledge.亚搏在线safe.com/questions/84478/make-the-httpcaller-stops-when-i-have-what-i-need.html The latest comments and answers for the question "Make the HTTPCaller stops when I have what I need" Answer by mark2at亚搏在线safe https://knowledge.亚搏在线safe.com/answers/84592/view.html

It did occur to me that there is a quicker solution,depending on what happens to the feature that passes the test.If it just goes on to transformers that are feature-based (i.e.it can be processed by itself) then you could simply end that stream with a Terminator transformer.

So the passing feature would get processed and then shut down the workspace,before other features get to the HTTPCaller.

Other than that,yes,I think variables or loops are the way forward (as much as it pains me to have to suggest variables - but at least this is a valid use of them!)

The only other way I can think of is to cause the HTTPCaller to reject features.For example if the response body is saved to a file,and the first passed feature could somehow set that file to read-only,then the rest of the HTTP calls would fail (they would still happen,but they would probably be output as Rejected,if that helps).

Fri,21 Dec 2018 19:19:02 GMT mark2at亚搏在线safe
Comment by philippeb on philippeb's comment https://knowledge.亚搏在线safe.com/comments/84583/view.html

WoW!Thanks a lot!I'll check this out early 2019 :D

Fri,21 Dec 2018 16:33:14 GMT philippeb
Comment by jdh on jdh's comment https://knowledge.亚搏在线safe.com/comments/84581/view.html

Here is a basic workspace illustrating the idea.


kb_HTTPCallerStop.fmw

Fri,21 Dec 2018 16:16:06 GMT jdh
Comment by philippeb on philippeb's answer https://knowledge.亚搏在线safe.com/comments/84574/view.html

I have to be honest with you,I've never used those variable transformers.

I've read the help documentation about them but I'm still confused how to use it.

I will try to find some examples here.

Happy Christmas!

Fri,21 Dec 2018 14:03:21 GMT philippeb
Answer by david_r https://knowledge.亚搏在线safe.com/answers/84492/view.html
If your http endpoint supports paging,you could wrap the HTTPCaller into a looping custom transformer that asks for e.g.successive blocks of 10 features,until you've found what you needed.
Thu,20 Dec 2018 08:12:08 GMT david_r
Answer by jdh https://knowledge.亚搏在线safe.com/answers/84479/view.html

How about using a variableRetriever,tester on the value of the variable,httpCaller,tester on the results of the call,variableSetter if you have what you need.

Wed,19 Dec 2018 22:20:00 GMT jdh