Skip to main content
I want to create a workflow which daisy chains a number of workspaces using workspace runners but there may be a complication.

 

 

Workspace 1

 

Reads a list of files and passes only the first file (Survey01) from directory A to Workspace 2

 

(Wait for job to complete is set to Yes)

 

 

 

Workspace 2

 

The first file comes into Workspace 2, the name of the file is used to find a matching pair from directory B (Survey01Attribution).

 

 

Then temporary versions are created of both files and placed in a TempDirectory, specfici names are given (this is required for Workspace 3)

 

 

Survey01 will be TempA

 

Survey01Attribution will be TempB

 

 

Then another WorkspaceRunner is used to invoke Workspace 3

 

 

Workspace 3

 

When Workspace 3 starts

 

The TempA and TempB files are opened and an InlineQuerier is used to perform a join, the resultant table is then output (an attribute is used to name the file Survey01Joined)

 

 

Then and only then when Workspace 3 is completed do I want workspace 1 to send the next file to workspace 2 and overwrite the Temp files, etc, etc.

 

 

 

Question

 

If I chain the workspaces and set wait to job to complete to yes, will Workspace1 wait until Workspace 2 OR Workspace 3 has completed before sending the next file?

 

 

As I need to do the latter is there a way that I can control this if it does not do this by default (i.e. Send the next file after workspace 2 has completed.

 

 

Essentially, I am trying to use the InlineQuerier dynamically (on tables where the name changes but not the schema), and the creation of the temp tables seemed like a potential workaround, albeit that it raises a different set of challenges.

 

 

I am using Desktop 2013 sp1 build 13348.

 

 

 

 

 

Regards,

 

 

Rob
If i read it correctly it seems to me that 1 and 2 can be combined.

 

 

1

 

I would make 1 workspace that reads the filenames directory A and B. You can use a "Directory and File Pathnames" reader form the reader gallery. Use the names to create the matching pairs.

 

 

2

 

Create the workspace where u do the join.

 

In this workspace both directory A and B are read but only the matching pairs are chosen for the proces.

 

When you are satisfied with its function and have saved it, you create a copy and rename it. Change the relevant attributes of the pairs to parameters.

 

 

3

 

Insert a workspacecaller in the first workspace(1), the matching pairs now must be inserted in the relevant workspacecaller fields.

 

 

Basically the actual reading of the files is done in the main workspace, not in the space where u put the caller.

 

 

Here is a example, but working on attributes rather then files.

 

(this make waterlevel shapefiles for 5 years of monthly sampledata. The bench is called 60 times.)

 

The schema reader in 1 reades the schema of the excel in 2.

 

( You would be readingthe directory/filepaths in 1and  the files in 2)

 

 

 


Hi Rob,

 

 

I would say yes, if you specified "Yes" to "Wait for Job Complete" parameter of WorkspaceRunners in both the workspace 1 and 2.

 

 

Takashi@Vancouver
Hi Gio/Takashi,

 

 

Thanks for examples I hoping to build the benches later in the week so i wil let you know how i get on.

 

 

Best wishes,

 

 

Rob

Reply