Skip to main content

I have an existing workspace that uses 2 feature writers to create a single excel output file. The first feature writer creates the file and writes data, the second feature writer adds additional data to the same file. [Yes, I needed to use 2 feature writers because data is written to the same sheet but in different locations on the sheets.]

The target spreadhseet uses a template.

I also have a parameter(s) to set the file name- $(tgtFileLoc)\\$(tgtFileName).xlsx

 

If I run the workspace from a server App as a 'job submitter' it works as expected. A single file is created with all the data and the file is renamed.

 

If I run the workspace from a server App as 'data download' I receive a single file with only the information from the second feature writer, the file is not renamed, and the template information is missing.

 

  1. Why was the file not renamed?
  2. Why is the template info missing?
  3. Why is info from only the second feature writer showing?

 

Thanks.

Hi @robotix​ , if you have included only FeatureWriter 2 in download when you register the workspace to FME Server, FME Server automatically determines the destination location for FeatureWriter 2, but FeatureWriter 1 writes its result into the location specified by a user parameter. That is, since the destination file path for FeatureWriter 2 is different from the path for FeatureWriter 1, FeatureWriter 2 cannot overwrite the target file written by FeatureWriter 1.

 

If you have included both FeatureWriter 1 and FeatureWriter 2 in download, FME Server will archive resulting two files from the two FeatureWriters separately. In this case, the target file written by FeatureWriter 1 has been already archived when FeatureWriter 2 started, so FME Server cannot overwrite the target file from FeatureWriter 1, it can only writes the result from FeatureWriter 2.

 

I don't think you can get your desired result in any case, unless modifying the workspace,.

 

A possible workaround I can think of is to add a File Copy writer to the workspace so that the file written by the FeatureWriter 2 will be copied (or moved) to some location, then include only the File Copy writer in download. If you do that, I think FME Server will include the copied file in download. 

add-file-copy-writerdata-download-propertiesHope this helps.


@Takashi

That solution worked. Thanks!

I appreciate the simple solutions. 😀


Reply