Skip to main content
Question

Tester $(FME_ENGINE) Attribute Has a Value fails on FME Server 2019.1.2

  • November 20, 2019
  • 2 replies
  • 38 views

nielsgerrits
VIP
Forum|alt.badge.img+54

I have some strange behaviour with a Tester on a FME Server Parameter.

In a workspace designed to run on server I test if $(FME_ENGINE) has a value. When this passes it initiates a subsection which I don't want to run when I develop the workspace locally.

This worked fine in server 2016 but it fails in server 2019. Could reproduce this in a fresh 2019 workbench.

0684Q00000ArC47QAF.png

0684Q00000ArC6HQAV.png

FME server log returns:

Tester (TestFactory): Tested 1 input feature(s) -- 0 feature(s) passed and 1 feature(s) failed

Is this ment to work this way?

2 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • November 20, 2019

This is probably caused by the fact that $(FME_ENGINE) is not an attribute, but the value of a published parameter.

Use the AttributeCreator to create an attribute (FME_ENGINE) with the value of the parameter.

Then use the Tester on the attribute instead of the parameter.

Hope this helps.


jkr_wrk
Influencer
Forum|alt.badge.img+29
  • August 23, 2021

To clearify. FME is actualy doing this:

 

@Value($(FME_ENGINE)) HasValue

 

So if $(FME_ENGINE) = FME01_Engine1 it checks if there is an attribute with the name FME01_Engine1 and if that has a value.

 

To me it seems like the @Evaluate(). It is a somewhat hidden step FME takes.

 

You could for instance do @Evaluate(1+1)-@Evaluate(1+1), which results in the string 2-2. In the AttributeCreator it shows up as 1+1)-Evaluate(1+1.

 

So if you test if $(Prefix) = pre_ then it is true but if $(Prefix) HasValue it is false.

 

 

 

 

 

 

 


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