Skip to main content

Has anyone encountered a situation whereby a FeatureReader in one workspace tries to read an XLSX file that is (still open) in a FeatureWriter in a different workspace? What would be the expected behavior? Asking because I've set up an Automation with two (time) overlapping workspaces, in which the second workspace will attempt to read files created by the first workspace.

Not sure what could happen, but you could be reading incomplete data if the Writer has not finished yet.

 

As a workaround, the final step of the workspace that writes the XLSX files could be copying the file to another folder. The second workspace would read the data from that second folder. That way you know you are not reading files that are still being written,


This sounds like bad idea as you're potentially still writing the file in Workspace 1 while Workspace 2 is reading from it. Incomplete data is likely to happen like @oscard​ says.

 

Could you set things up so that the automations are not time overlapping but rather triggered in sequence?


Thanks for the feedback guys. I agree it is a bad idea, but am hoping that the reader in the second workspace would be able to detect that the first workspace still has the file open, and would NOT read the file. A better approach would be to use data from an "fme automations" writer to work against the output of the first workspace, but I've not figure out the right way to do that for my situation.

 


I like the workaround idea posted by oscard. The automation already has a system call to move "seed" files from one folder to another when complete, and so it should be straightforward to use something similar to move the files written from the first workspace to a "final" folder for the second workspace to read from. I'll give that a shot, and will post back here with the results.


Reply