Skip to main content
Question

Can a reader be disabled programmatically?


Forum|alt.badge.img

Can a reader be enabled or disabled in run-time based on certain conditions? Or a more general case: can a set of bookmarked transformers/components in a workspace be enabled or disabled in run-time based on some conditions?

Thanks in advance,

George

5 replies

mygis
Supporter
Forum|alt.badge.img+13
  • Supporter
  • June 5, 2017

Hi @george

I would use a Tester transformer or any filter transformer to do so based on a certain criteria.

 

Cheers.

Lyes


Forum|alt.badge.img+2
  • June 5, 2017

@george

Example here using a Published Parameter to specify which of three Readers to use. Choose Run with Prompt to execute the Workspace. A multiple choice of three values is displayed using a Published Parameter.

This Published Parameter is used in the Workspace and split into 1, 2 or 3 features depending on the number of values chosen. These values are then processed by AttributeFilter to trigger the reading of any combination of the three FeatureReaders.

choosereaders.fmw


david_r
Celebrity
  • June 6, 2017
mark_f wrote:

@george

Example here using a Published Parameter to specify which of three Readers to use. Choose Run with Prompt to execute the Workspace. A multiple choice of three values is displayed using a Published Parameter.

This Published Parameter is used in the Workspace and split into 1, 2 or 3 features depending on the number of values chosen. These values are then processed by AttributeFilter to trigger the reading of any combination of the three FeatureReaders.

choosereaders.fmw

Yes, definitely this is much preferred to using a Tester after the input feature type.

lars_de_vries
Forum|alt.badge.img+10

In addition to @gisinnovationsb and @mark_1spatial you can consider to use FeatureReaders instead of a regular reader. When you start your workspace with e.g. a creator and let it pass a filter based on a Published Parameter, you can choose which FeatureReader should be used.


mygis
Supporter
Forum|alt.badge.img+13
  • Supporter
  • June 13, 2017
lars_de_vries wrote:

In addition to @gisinnovationsb and @mark_1spatial you can consider to use FeatureReaders instead of a regular reader. When you start your workspace with e.g. a creator and let it pass a filter based on a Published Parameter, you can choose which FeatureReader should be used.

Yes @lars_de_vries

 

 

That could be an option too. I will +1 it ;)

 


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