Skip to main content

I have a workspace that has several WorkspaceRunners running in sequence. If the workspace in the first WorkspaceRunner writes nothing, no need to run the remaining WorkspaceRunners. But how I can pass the number of the writes of the first workspace to the parent workspace?

Hi @ag, a possible way I can think of is:

  1. With the first child workspace, determine if one or more features were written and save the result into a temporary file. Some transformers including the FeatureWriter and the NoFeatureTester (from Hub) could help you to do that.
  2. Then, set "Yes" to the "Wait for Job Complete" parameter in the first WorkspaceRunner, read the temporary file after the translation completed, and determine if features have been written.

If you added a published user parameter to the child workspace in order to receive the temporary file path, you can create a path string in the parent workspace with a TempPathnameCreator, pass it to the child workspace via the parameter through the WorkspaceRunner, and commonly use it as the temporary file path in the parent and the child .

Hope this helps.


Hi @ag, a possible way I can think of is:

  1. With the first child workspace, determine if one or more features were written and save the result into a temporary file. Some transformers including the FeatureWriter and the NoFeatureTester (from Hub) could help you to do that.
  2. Then, set "Yes" to the "Wait for Job Complete" parameter in the first WorkspaceRunner, read the temporary file after the translation completed, and determine if features have been written.

If you added a published user parameter to the child workspace in order to receive the temporary file path, you can create a path string in the parent workspace with a TempPathnameCreator, pass it to the child workspace via the parameter through the WorkspaceRunner, and commonly use it as the temporary file path in the parent and the child .

Hope this helps.

@takashi. Excellent. The NoFeatureTester and FeatureWriter together do the trick. I have to set Write Last Line Terminator to "No" in the FeatureWriter which connects to the NoFeatureTester as the extra space and blank line from NoFeatureTester's NoInput port causes problem. Many thanks and regards!

 

 

Allen

 


Reply