Question

A workspace runner have 100 or more files. Some files have errors. How to save files with errors separately into another folder from workspace runner?


A workspace runner have 100 or more files. Some files have errors. How to save files with errors separately into another folder from workspace runner?

3 replies

Userlevel 2
Badge +10

Hi @malavikavenu96​ I have a couple follow up questions to better understand how your environment is setup.

  • Are you looking to save the .fmw (workspace) files that fail to run from within the WorkspaceRunner?
  • Or, are you looking to save the files that run (and error) within the workspaces you are running with the WorkspaceRunner?

If you're able to share any files, workspaces, or screenshots with us that would be great!

Hi @malavikavenu96​ I have a couple follow up questions to better understand how your environment is setup.

  • Are you looking to save the .fmw (workspace) files that fail to run from within the WorkspaceRunner?
  • Or, are you looking to save the files that run (and error) within the workspaces you are running with the WorkspaceRunner?

If you're able to share any files, workspaces, or screenshots with us that would be great!

The second one. See the files with errors should save in one destination and those files without errors in a different destination from the workspace. Is there a way to solve this?

 

Userlevel 2
Badge +10

The second one. See the files with errors should save in one destination and those files without errors in a different destination from the workspace. Is there a way to solve this?

 

@malavikavenu96​ you can set this up within the workspace you are running with the workspace runner. In the Reader Feature Type parameters, under the Format Attributes tab, you can expose the attribute 'fme_basename' to get the dataset name. For example if we have a dataset called PublicArt.xlsx, it will create an attribute called fme_basename that contains the value PublicArt.

image 

If we know where our workspace might fail depending on the input dataset, we can then connect a Writer of the desired format to the Rejected port. In our Writer, we set it to Dynamic mode and then we will want to setup a Fanout Expression with the value: @Value(fme_basename).xlsx (since we want to write out to Excel).

image 

I believe this is the best way to go around this since the WorkspaceRunner does not produce any additional information about what failed in the workspaces it tried running. I've attached my sample workspace and data for your reference.

 

Hope this helps!

Reply