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:
- 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.
- 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:
- 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.
- 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.
Allen