Since the "series of transformers" remains the same I'm wondering whether you could achieve this by using a Group By. If you expose that parameter as a parameter of your custom transformer it'll most likely be sorted out without having to resort to python.
Any chance you can share your workspace? That'll make it easier to give some specific advice.
I'm with @redgeographics on this one. I don't think you need to use a loop. You can use a group-by and then FME is responsible for handling any 'loops' that occur. In the custom transformer look in the transformer parameters (Navigator window). Set Parallel Processing to Minimal and then you get a Parallel Process By parameter. Select your attribute in there and you should be good to go. You'll get parallel processes you don't perhaps need, but the important thing is that each attribute value is handled separately.
It depends on the process that's needed repeated. That is what type of transformers are used etc..
It is not clear if a Group By strategy is an option.
(like can you somehow Tile or spatialy relate all requirements, or do all requiremenst share some common attribute(value) etc.)
If not then you could do following.
Use statisticscalculator to count total number of values of the relevant attribute.
Set a counter on it", like "attrValue_count".
Clone sets of data to process by the amount of attrValue_count, wich you can do by unconditionaly relating the "Total_attrValue_count" to required data for processing and then using value in Cloner.
Create index.
Then feed to a custom loop where u have a counter, tester and index incrementer to check wheter it reaches the number of attribute values counted.
Test index = "attrValue_count", if yes send passed trough the process.
Send failed to tester.
Test for index <
"Total_attrValue_count". Failed: no output needed.
Passed: to loop.
(If u wanted to create a multi-spatialrelator or multi-clipper for instance , you would need to do so. Where a object is clipped by different clippers independently.
something fme even in version 2015 has qualms with btw...lol)
Have not tested them in 2016 version yet.
I'm with @redgeographics on this one. I don't think you need to use a loop. You can use a group-by and then FME is responsible for handling any 'loops' that occur. In the custom transformer look in the transformer parameters (Navigator window). Set Parallel Processing to Minimal and then you get a Parallel Process By parameter. Select your attribute in there and you should be good to go. You'll get parallel processes you don't perhaps need, but the important thing is that each attribute value is handled separately.
Thank you @Mark2AtSafe. This was my first custom transfomer and your advice was a good eye opener. That worked perfect for me ! Thanks.
Since the "series of transformers" remains the same I'm wondering whether you could achieve this by using a Group By. If you expose that parameter as a parameter of your custom transformer it'll most likely be sorted out without having to resort to python.
Any chance you can share your workspace? That'll make it easier to give some specific advice.
Thank you @redgeographics :)