Can't you just replace the Terminator with a Logger, or any other random transformer?
The translation won't fail, because the Rejected port is handled, and the loop will end, because 'Loop to Input' isn't called anymore.
You can also adjust one of following Translation settings of the workspace:
- Rejected Feature Handling: Continue Translation. The Translation will continue on the Rejected port, so you don't need the Terminator. But this will also impact other transformers with a Rejected output.
- Terminator Redirect: Redirect to Data Inspector. The workspace won't fail on the terminator.
It's a good question (and a good answer by @koen). In case it is of use, we do have an upcoming webinar on custom transformers. See this URL for more information: https://www.safe.com/webinars/how-to-simplify-your-workflow-with-fme-custom-transformers
Thanks @koen and @mark2atsafe, appreciate your help (and have signed up for that webinar).
I'm sure I'm doing something wrong when it comes to blocking looping, because I've managed to achieve three (equally unhelpful) outcomes:
(1) The custom transformer only ever does one single iteration, so it only returns 1,000 features (I need 6,000+). But it outputs these 1,000 and routes them through the rest of my workspace successfully.
This happens with "Enable Blocked Looping: Yes" and with "Max Iterations: 15"
(2) The custom transformer iterates as many times as it needs to to get those 6,000+ features, but doesn't get the signal to stop when it fails the relevant Tester in my workspace. So it always iterates (and calls the HTTPCaller) one more time than it needs to, which causes it to fail completely, and the features don't process through the rest of my flow.
I can't remember how I replicated this, but this is the behaviour that occurs if I put a Terminator in the transformer as per my original question.
(3) The custom transformer loops (and fails) infinitely when "Enabled Blocked Looping" is disabled. So I'm always getting an error with my HTTPCaller - which is what the Tester should be checking and picking up on - and my features just get stuck at that point.
Not sure if this will solve your issue, but wat I notice now is that you keep calling your loop 1510 times with the output of the jsonfragmenter. So now it keeps trying to call the HttpCaller, which already rejected multiple times.
I think it's better to connect Tester.Passed directly to 'Loop to Input'.
Thanks @koen and @mark2atsafe, appreciate your help (and have signed up for that webinar).
I'm sure I'm doing something wrong when it comes to blocking looping, because I've managed to achieve three (equally unhelpful) outcomes:
(1) The custom transformer only ever does one single iteration, so it only returns 1,000 features (I need 6,000+). But it outputs these 1,000 and routes them through the rest of my workspace successfully.
This happens with "Enable Blocked Looping: Yes" and with "Max Iterations: 15"
(2) The custom transformer iterates as many times as it needs to to get those 6,000+ features, but doesn't get the signal to stop when it fails the relevant Tester in my workspace. So it always iterates (and calls the HTTPCaller) one more time than it needs to, which causes it to fail completely, and the features don't process through the rest of my flow.
I can't remember how I replicated this, but this is the behaviour that occurs if I put a Terminator in the transformer as per my original question.
(3) The custom transformer loops (and fails) infinitely when "Enabled Blocked Looping" is disabled. So I'm always getting an error with my HTTPCaller - which is what the Tester should be checking and picking up on - and my features just get stuck at that point.
You should have your Loop To after the the tester. You also need some logic that changes the url/body in the HTTPCaller each time the process loops. Are you able to share the url/api you're calling against?