Skip to main content

Dear All,

 

I am facing the following very weird issue. I want to test for several attributes if, for each of them, there are some features that contain a specific value.

To do that, I have created a Custom Transformer that takes as input 2 user parameters (defined exactly in the same way, published and required) : 1) colname = the name of the attribute ; 2) progname = the value to test if the feature is equals to.

 

When I go back in the Main, right-click on the custom transformer > Properties, in the prompt I can see well the 2 user parameters (colname, progname). But when I click on "Run to this" custom transformer, the prompt only asks for 1 of the 2 parameters (always 'progname', even if I switch the order of the parameters in the parameter manager of the custom transformer). In the Translation log, I see that the following command line is run :

fme.exe myscript.fmw

This results in translation failure with the error message :

Undefined macro `progname' dereferenced in file e...]

When I run from the command line 

fme.exe myscript.fmw --colname "Test1" --progname "valueA"

it works like a charm...

 

Does anyone know what is happening ? why running my custom transformer from the Main does not ask / recognize the second parameter ?

 

Should I set something about the parameter of the custom transformer in the parameter managers in the Main ?

 

I have tried thousands of things (re-writing the customer in a new file from scratch, re-starting FME, and so on). I am getting crazy... If anyone could help, I would be VERY VERY grateful !

 

Thanks in advance

Hi @mzuer​ this is a strange one! Could I ask a couple additional questions, I've run into something similar but can't seem to reproduce the issue.

  • Are you able to share your workspace?
  • What transformers are inside your custom transformer?
  • What version and build number of FME are you using?
  • Are you using the HTTPCaller?
  • Have you tried performing the same process without the custom transformer aspect?

Hi @Evie Lapalme​ 

 

While I was preparing a reproducible example to share with you, I realize that I have more fundamental issues with the way I pass parameters to custom transformers (CT) - and I think this might cause the issue I described in my first post. And despite carefully reading the chapter "Custom Transformers" of the advanced course, I am not able to understand what is going on.

 

See for example in the attached workbench (toy example) : I would like that the output of my CT "MySC" to be exactly the same as the output of the TestFilter in "Main".

However, when calling the CT either with "hard-coded" CT parameter values (MySC) or with user parameter passed as CT parameters, the output does not like at what I would like (and is different in both cases).

 

I've spent almost the full day to try to understand what is going on... Could you tell me what I am doing wrong ? Is it the way I am calling the CT that is not correct ? Or is the way I use the parameters inside the CT that is wrong ?

 

Should I set something in the "External Attributes To Expose" pane of the CT ?

 

I would be very grateful if you could help ;-)

 

Thanksimageimage


sorry I forgot the fmw file


Hi again @EvieAtSafe (Safer)​ 

 

Crazier : I get again a "undefined macro" deferenced e...] translation failure, when trying to use a workspace runner. Even when the workspace called is almost empty, it fails ! I am totally despaired...

 

Here attached the 2 files (the workspace "called_workspace.fmw" is called from the script "main_workspace.fmw). Can you reproduce the issue ?

Is there an ''hidden'' parameter somewhere in my script that causes all the troubles ?

(NB : these are ''toy example'' files based on my ''true'' scripts, I let all the settings/parameters that I am currently using in reality - hoping that you could understand what is the issue)

 

thanks again if you could help - I am really getting crazy !


and the main_workspace.fmw file (sorry I am not able to upload 2 files ?! - I am really a newbie...)


Reply