Question

Passing multiple file to workspaceRunner

  • 2 September 2016
  • 4 replies
  • 1 view

Badge +1

Hi, I am passing multiple files seperated by comma (e.g. D:\\Projects\\\\ELECBAU1_PROD_127-1.dgn,D:\\Projects\\ELECBAU1_PROD_127-2.dgn) to workspacerunner but it does not pick the second file which is *-2.dgn

However the same input is working in the underlying standalone workspace, but not through workspacerunner.

Cant use directory (existing) parameter type either.

Suggestion please

Zubair


4 replies

Badge +3

Does it need to proces the files one by one or do they need processed in one run?

If first then it is better to use call the WS for each one. U can do this by creating a list using a attributesplitter, explode the list and pass to the WS_runner.

If latter, pass the string as u do, but then use for instance a feature reader to read the files within the WS-runner. U split and explode the string as before, but now u have the dataset option of the feature reader use the resulting attribute(holding the filename)

In at least up to fme2015 you can't actually pass a file to a WS-runner. U pass its name/location so the WS- reads it. U can pass strings.

I understand tath in the future this would be made possible?

Userlevel 2
Badge +17

Hi @zubairsm, try: surround each path by double quotations, concatenate them separating by a white space, then surround entire string by double quotations again. i.e. 

""D:\Projects\\ELECBAU1_PROD_127-1.dgn" "D:\Projects\ELECBAU1_PROD_127-2.dgn""
Badge +16

Did you try using the directory and file pathnames reader to get the files location?

Badge +1

Hi @zubairsm, try: surround each path by double quotations, concatenate them separating by a white space, then surround entire string by double quotations again. i.e. 

""D:\Projects\\ELECBAU1_PROD_127-1.dgn" "D:\Projects\ELECBAU1_PROD_127-2.dgn""
Thanks takashi, That worked perfectly.

 

 

Regards

 

Zuabir

Reply