Skip to main content

To whom this may concern:

With the current workbench I'm trying to execute, I'm trying to sort through the attributes before following through with a loop (e.g. ). With looping (as shown in the screenshot), however, I receive an error message which reads as follows:

"ERROR |Transformer/Factory PolynomialFunction_Sorter_2 is blocking and cannot be used in a loop, but was found between 'Loop to PolynomialFunction_Polynomial_Function_Loop1468337910 Input Splitter' and 'PolynomialFunction_Polynomial_Function_Loop1468337910 Input Splitter'".

May I ask if there are any ways with which I could sort the values (working with an Excel worksheet as the reader and am looking to write to another Excel worksheet) in a loop without receiving the error message?

Best Regards,

JE6THOMA

as the p-sorter is a blocking function, maybe try export the custom bit as transformer first?. Prior to actually adding the loop.


The problem is that a loop processes one feature at a time - so feature 1 runs through the loop until the condition is met, then feature 2, then feature 3, etc. However, you have a Sorter transformer, which relies on being able to access features 1, 2, 3, etc all simultaneously.

So FME is telling you that a "blocking" transformer - that requires all the features - is invalid in a loop that processes one at a time.

I think it would be helpful to know what you are trying to do - as someone might have a way to process the data without a loop, or find a way to avoid sorting data inside the loop.

As @gio says, it is possible to run a loop with a blocking transformer like this. However, you have to export the custom transformer (File > Export as Custom Transformer) to allow this to happen. It's a fairly advanced technique - I avoid it whenever I can - so I think it would be better to first look at if we can resolve the scenario without having to do that.


What is the use of having the Sorter inside the loop?

Could you sort the data only once before it enters the looping transformer, thereby avoiding the Sorter inside the loop?


Do you really need the loop at all? Using the Sorter you can sort on multiple attributes in sequence from top to bottom.


Reply