Skip to main content

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?

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.


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.

 

 

 

 

 

 

 


Reply