Skip to main content
Question

Can't get workspacerunner to run as expected


raabster
Contributor
Forum|alt.badge.img+4

Hi!

So, I have a workbench that takes a shapefile and an excel file as input, does some magic and outputs an excelfile. The workbench works as expected. So far so good. Se image below.

 

Now, I have a number of shapefiles that I want to process in the same way, so I figured a workspacerunner would be a good solution, instead of replaceing the input shapefile in the image above.

So in a second workbech, I take a PATH as reader, filters out my shapefiles and into the workspacerunner (see img below). Everything seem to be working - but only the shapefile that has the same filename (test.shp in the images) gets treated properly.

So in this example, test.shp get an output excel file that seems fine, but the other two does not.

 

Any ideas of why that is? My guess is that I’m doing something wrong 😅 I can’t share the workbenches I’m afraid.

 

Cheers!

 

3 replies

dustin
Influencer
Forum|alt.badge.img+30
  • Influencer
  • August 30, 2024

You will need to setup a dynamic reader in the child workbench using the Single Merged Feature Type. 

 


thomasmarti
Contributor
Forum|alt.badge.img+8
  • Contributor
  • August 31, 2024

In the sub-workspace you have to define a user parameter for the imput file(s) an then link the reader-source to this user parameter.

Then you have to hand over the path with the shapefile to the workspacerunner as a parameter like this

 

please consider to use a dynamic filename for the exportfile in the sub-workspace. for example with a fanout expression.


raabster
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • September 2, 2024

@thomasmarti and @dustin thank you for your replies! I got it working after doing both of your suggestions 😀

 

Big thanks to both of you!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings