Skip to main content

I am trying to create a data download service in FME Server 2016 (single engine), but have run into some problems.

I have a master workspace that is created as a Data Download Service in FME Server.

The master workspace is structured as follows:

 

The data order is chopped into sub-orders and passed into an FMEServerJobSubmitter. The workspace called by the FMEServerJobSubmitter stores the exported data into a folder (the folder name is specified as a parameter in the FMEServerJobSubmitter). When all the sub-orders are completed, a FeatureWriter (FileCopy) moves the folder and its contents into the FME_SERVER_DEST_DIR, and the data is then zipped and shipped.

Most of the writers in the sub-workspace have fanout, and this is where my problems begin:

  • The writers that only have fanout on the feature type level work fine. For instance, a shapefile writer that simply produces shapefiles with different names works perfectly.
  • The writers that have fanout on the dataset level produce junk files. For instance, for AutoCAD, this should produce something like:

     

    WindPower.dxf with the layers Turbine (points), Park (polygon), Powerline (line), etc.

     

    HydroPower.dxf with layers Dam (line), Reservoir (polygon), Tunnel (line), etc.

     

    Instead, I get one single dxf with all the features crammed into one layer and the geometry defined by the first feature that enters the writer. This happens regardless of there being one or more dxf files to output, and regardless of the sub-workspace being called one or several times during a translation.

What baffles me is that this unwanted behavour only occurs when the sub-workspace is called from the master workspace. I can run the uploaded sub-workspace in FME Server and get a nice, fanned-out result. But the instance it is called from the master workspace, the end product is a junk file.

Any ideas what I am doing wrong or how to solve this? Is there some trick I do not know about when calling sub-jobs within FME Server?

Is there any other way I can set up my Data Download Service? Should I define my sub-workspace as something other than a Job Submitter Service?

Hi @tale - Are there any Published Parameters on this "sub-" or child workspace? This could be a clue for difference of behaviour...

 


Hi @RylandAtSafe,


Yes, both the master and the sub have published
parameters.


Master:


The usual data download parameters like a list of
layers, format, coordinate system, clipping information, email, etc.


Sub:


Most of the published parameters from the Master are
passed on to the Sub. In addition, the Master defines a folder where the
extracted data is to be stored, typically D:\\temp\\Order_<JobID>\\, where
JobID is taken from FME_JOB_ID. The output folder information is passed along
to a published parameter in the Sub. This OutputFolder parameter and the
CoordSys parameter inherited from the Master’s published parameters are the
only two of the Sub’s published parameters to be involved in the actual writing
process. The fanouts are based on information (filename, subfolder, layer name,
etc.) extracted from a database table read by the Sub at runtime.


Hi @RylandAtSafe,


Yes, both the master and the sub have published
parameters.


Master:


The usual data download parameters like a list of
layers, format, coordinate system, clipping information, email, etc.


Sub:


Most of the published parameters from the Master are
passed on to the Sub. In addition, the Master defines a folder where the
extracted data is to be stored, typically D:\\temp\\Order_<JobID>\\, where
JobID is taken from FME_JOB_ID. The output folder information is passed along
to a published parameter in the Sub. This OutputFolder parameter and the
CoordSys parameter inherited from the Master’s published parameters are the
only two of the Sub’s published parameters to be involved in the actual writing
process. The fanouts are based on information (filename, subfolder, layer name,
etc.) extracted from a database table read by the Sub at runtime.

@tale - Try throwing some Logger transformers at the Child or Sub-Workspace... particularly after any value related to the dataset fanout or layer/output file name. I wonder if an undefined, null, or blank value is used – causing this issue.

 

This won't resolve the issue but should (hopefully) give us another bread crumb..

Reply