Skip to main content
Question

How make loop with blocking transformers in fmx?

  • August 24, 2020
  • 10 replies
  • 292 views

Main workspace:loop1LoopingAndBlocking.fmxloop2This gives me error:

 

> Custom transformer 'LoopingAndBlocking' does not have a port named 'PrivateInput' which is suitable for parameter 'LOOPBACK_INPUT_TAG'

 

Settings:

Enable blocked looping: Yes

Max iterations: 100

Attribute to hold iteration count: FME_LOOP_ITERATION_COUNT

 

Using ALWAYS LINKED

 

Publishing the PrivateInput Port does solves the LOOPBACK_INPUT_TAG problem, but then my feature are outputed through the Incomplete port. That suggests they could not be looped at all?

 

Any thoughts appreciated. Attaching fmw + fmx

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

10 replies

david_r
Celebrity
  • August 24, 2020

What are you trying to accomplish? I'm having difficulties understanding the logic.


  • Author
  • August 24, 2020

What are you trying to accomplish? I'm having difficulties understanding the logic.

I have a more complex workspace where I need to loop over a custom transformer containing blocking transformer(s). Having errors with that I reproduced as small as I could here, so it does not really have a purpose :)


david_r
Celebrity
  • August 24, 2020

I have a more complex workspace where I need to loop over a custom transformer containing blocking transformer(s). Having errors with that I reproduced as small as I could here, so it does not really have a purpose :)

Did you go through this tutorial first: https://community.safe.com/s/article/looping-with-blocking-transformers

As well as this: https://s3.amazonaws.com/gitbook/Desktop-Advanced-2019/DesktopAdvanced5CustomTransformers/5.11.CustomTransformerLoops.html


  • Author
  • August 24, 2020

I have a more complex workspace where I need to loop over a custom transformer containing blocking transformer(s). Having errors with that I reproduced as small as I could here, so it does not really have a purpose :)

I tried the first tutorial in 2020.1 and experiencing similar errors. Sometimes it seems there is some erratic caching on the port definitions.

Example:

  • In the fmx, create a new output port X
  • Save
  • In host script, delete custom transformer
  • Re add custom transformer
  • Ensure see linked symbol/color
  • The X output is not there!

 

Other updates do work:

  • In fmx, add a Terminator on an existing input port
  • Save fmx
  • Readd custom transformer
  • Run - it terminates proving it has been updated

 


jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • August 24, 2020

I have found that blocked looping doesn't work with private input ports. It's annoying as there is no good reason for the loop input to be visible on the custom transformer. I usually name it some variation of DoNotUse.


dbaldacchino1
Enthusiast
Forum|alt.badge.img+14

I have found that blocked looping doesn't work with private input ports. It's annoying as there is no good reason for the loop input to be visible on the custom transformer. I usually name it some variation of DoNotUse.

I am observing the same thing. Wasted a lot of time this afternoon chasing this issue :(


bo
Contributor
Forum|alt.badge.img+10
  • Contributor
  • February 1, 2022

I have found that blocked looping doesn't work with private input ports. It's annoying as there is no good reason for the loop input to be visible on the custom transformer. I usually name it some variation of DoNotUse.

Thanks! Wish this can be fixed soon.


caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • February 1, 2022

I usually put the looping part in a custom transformer inside the custom transformer when I have to deal with blocking. This spares me of the looping input not being private and editing the transformer in a different instance of FME.

Try it as a workaround if it suits your workflow.


barrett_h
Contributor
Forum|alt.badge.img+1
  • Contributor
  • March 18, 2022

I usually put the looping part in a custom transformer inside the custom transformer when I have to deal with blocking. This spares me of the looping input not being private and editing the transformer in a different instance of FME.

Try it as a workaround if it suits your workflow.

Hi @caracadrian​, I was just wondering if you might be able to provide an example of nested custom transformers being used to work around blocking with looping? I'm trying to build something similar myself but am not having much success. Thanks in advance.


caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • March 18, 2022

Hi @caracadrian​, I was just wondering if you might be able to provide an example of nested custom transformers being used to work around blocking with looping? I'm trying to build something similar myself but am not having much success. Thanks in advance.

@barrett_h​ take a loop at this one that I uploaded to the fme hub https://hub.safe.com/publishers/caracadrian/transformers/eterra3-ancpi-rogeometryfetcher