Skip to main content
I have a workbench that I am trying to run in command line.  When I run it directly from workbench, it runs fine.  When I try to run it from a .bat file I get the following error message:

 

 

"The clause 'TEST @EvaluateExpression(STRING_ENCODED,<at>Value<openparen>Sort<closeparen>,TestFilter) = 1 ENCODED' within 'FACTORY_DEF * TestFactory FACTORY_NAME TestFilter_TestFactory_0 INPUT FEATURE_TYPE TestFilter_TESTFILTERINPUTLINE_0 TEST @EvaluateExpression(STRING_ENCODED,<at>Value<openparen>Sort<closeparen>,TestFilter) = 1 ENCODED BOOLEAN_OPERATOR OR COMPOSITE_TEST_EXPR <Unused> OUTPUT PASSED FEATURE_TYPE TestFilter_attribute OUTPUT FAILED FEATURE_TYPE TestFilter_TESTFILTERINPUTLINE_1' is incorrect.  TEST must look like: TEST <value> <operator> <value>"

 

 

I can't quite tell where this error is coming from.  From the log file, it looks like it is reading the first sub directory for the Source_Dataset but fails before it examines the next sub directory.

 

 

Here are some of the lines from my .bat file

 

 

set /p DNC=   Please keyin 'region' and press ENTER.

 

 set PAR=%1

 

 set ORG=%PAR%\\old_data\\%DNC%

 

 set NEW=%PAR%\\%DNC%

 

 set DIF=%PAR%\\differences

 

 set WB=\\\\server\\Additional_tools\\change\\chg.fmw

 

 

    fme.exe %WB% --SourceDataset_VPF %ORG%\\**\\*.* --DestDataset_CSV %DIF% --PROJECT_DIR %PAR% --ADD_gmp_FM0 %DIF%\\changes.mdb --DNC_REG %DNC% --SourceDataset_VPF_3 %NEW%\\**\\*.* --FANOUT_DIRECTORY %DIF%

 

 

I'm not quite sure where to start looking, any tips would be appriciated.

 

 

Hi,

 

 

It looks to me like a test  (TestFilter) is failing since no value is found, any TestFilters in the ws?

 

Itay
There are a few.  However, they all run without problem when run directly from the workbench.  It only fails when run from the batch file.  It seems to be acting like it has problems fully accepting the "**\\*.*" directly from the variables that were set up.

 

 

I created a second workbench that just pulls in the PAR and DNC variables from the .bat file and then feeds them into the main workbench and it seems to work ok.  I just can't get to to run without that intermediate workbench. 

 


Hi,

 

 

is it possible that there are spaces or other 'special' characters in the values given for the published parameters?

 

 

Try using double quotation marks around all parameter values, e.g.

 

 

fme.exe "%WB%" --SourceDataset_VPF "%ORG%\\**\\*.*" --DestDataset_CSV "%DIF%" --PROJECT_DIR "%PAR%" --ADD_gmp_FM0 "%DIF%\\changes.mdb" --DNC_REG "%DNC%" --SourceDataset_VPF_3 "%NEW%\\**\\*.*" --FANOUT_DIRECTORY "%DIF%"

 

 

David
Hi, Do you have more than 1 version of fme installed on your computer, the command line can be running a previous version and the errors may be transformer differences between versions, if so, use full path to correct fme.exe. David
Hi, Do you have more than 1 version of fme installed on your computer, the command line can be running a previous version and the errors may be transformer differences between versions, if so, use full path to correct fme.exe. David

Something like this happened to me. Very similar problem. It runs on Desktop but not from command line. But it was giving me error only when I had to insert lines into a table on SQL Server. If I try only to update lines, the transformation would end successfully.

 

Solution:

I was executing the command line by calling fme.exe <filename.fmw> . But in realitity, the FME Server was being called. I adjusted the my PATH and now it calls from my FME 2018, instead of the Server.

Before adjusting my command line, I also updated my mssql-jdbc in the folder <plugins>.

 

Btw, it runs much faster now.


Reply