Skip to main content
Question

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

  • November 20, 2019
  • 2 replies
  • 56 views

nielsgerrits
VIP
Forum|alt.badge.img+60

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 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.

2 replies

erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • 2179 replies
  • 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+35
  • 424 replies
  • 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.