Skip to main content
Solved

Hold features until trigger

  • September 17, 2014
  • 3 replies
  • 93 views

Forum|alt.badge.img
Hi All,

 

I want to hold one set of features from one connection, until a feature comes through another connection to trigger their release. If no such feature comes they should never be released.

 

So similar to the FeatureHolder, but with a trigger for release.

 

 

I could probably create something with a merger/inlinejoiner or something, but I was wondering if there was a more elegant method/transformer?

 

Any thoughts?

 

Thanks,

 

Jonathan

Best answer by owen

Hi Jonathan, 

 

 

It depends on the flow of features in your workspace, and whether the trigger is global (for all features) or unique to a feature.

 

 

You could use a variablesetter and variableretriever, which usefully do not need to be connected on the canvas. If coming from different readers, then the order in which features are read is important here, and you may also need a featureholder.

 

 

So, one feature could be set to value = Y, and routed into the variablesetter. Then connect the variableretriever onto the the held features and test against that value (trigger).

Owen

 

 

 
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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.

3 replies

owen
Forum|alt.badge.img+1
  • Best Answer
  • September 17, 2014

Hi Jonathan, 

 

 

It depends on the flow of features in your workspace, and whether the trigger is global (for all features) or unique to a feature.

 

 

You could use a variablesetter and variableretriever, which usefully do not need to be connected on the canvas. If coming from different readers, then the order in which features are read is important here, and you may also need a featureholder.

 

 

So, one feature could be set to value = Y, and routed into the variablesetter. Then connect the variableretriever onto the the held features and test against that value (trigger).

Owen

 

 

 

Forum|alt.badge.img
  • Author
  • September 17, 2014

Hi Owen,

 

It's been a while; seems like you're still in the FME world. :-)

 

 

 

Your answer provided the way; I ended up doing something like this in a custom transformer:

 

 

Input Port - Count number of holdees; put into Variable

 

Input Port - Count number of triggers + Holdees. Put into Variable

 

FeatureHolder

 

Variable fetchers

 

Tester - If number of triggers+ Holdees > Number of holdees, then we must have received a trigger, so release.

 

 

Your solution per-se wouldn't work because no combination of featureHolders or moving things around would hold the features for long enough for the variables to be set elsewhere, so I had to join the features together in the workspace.

 

 

Thanks!

Jonathan (of WCC but now not.)


owen
Forum|alt.badge.img+1
  • September 17, 2014
Glad it helped! I thought it might be you, there cant be too many Jonathans that use FME? Hope all is well

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings