Skip to main content
Hi folks,

 

 

I have a main workspace that calls a bunch of data validation workspace, my 'child' workspaces. All child workspaces have exactly the same published parameters (values may be different of course). In the main workspace each feature has a parameter WsName with the full name of the child workspace that needs to be called.

 

 

When I use a WorkspaceRunner and set the parameter 'FME Workspace' to the WsName (rather than actually selecting a workspace), I cannot specify any parameters to pass on to the workspace. Is there any way to overwrite this and specify them anyway programmatically?

 

 

I am aware that I could use a PythonCaller to run the child workspaces and pass whatever parameters, as explained on

 

https://knowledge.safe.com/articles/Samples_and_Demos/Run-an-FME-Workspace-from-Python-using-FMEWorkspaceRunner

 

however, for reasons of controlling the flow of workspaces that are called I prefer to use a WorkspaceRunner, not a PythonCaller.

 

 

 Thanks,

 

Joep
Hi

 

 

The easiest and most transparent way might be to use a TestFilter to branch to different WorkspaceRunners, depending on your attribute "WsName".

 

 

David

 

 
An alternative (to use with caution!) is to pick one of your child workspace and set all of the WorkspaceRunner parameters to the variables or parameters you want via the transformer dialogue box.  Once that is done, in the navigator panel you can edit the FME Workspace parameter and point it to the WsName attribute.

 

 

 

 

 

Note that if you open the WorkspaceRunner again in the main canvas, all of the parameters will be erased
An alternative (to use with caution!) is to pick one of your child workspace and set all of the WorkspaceRunner parameters to the variables or parameters you want via the transformer dialogue box.  Once that is done, in the navigator panel you can edit the FME Workspace parameter and point it to the WsName attribute.

 

 

 

 

 

Note that if you open the WorkspaceRunner again in the main canvas, all of the parameters will be erased
I was able to use this bypass in FME 2015.1 . Anyone an idea how you could do this in FME 2017? because FME 2017 always uses the main parameter window, clicking OK wipes all the variables clean.

 

 


Hi @ddecoene, Thanks for bringing this to our attention. We created PR81325 to fix this issue. In the meantime, we have created a workaround that will hopefully work for you in FME 2017.

Parent Workspace Overview:

\\

1. In your parent workspace with the Workspace Runner, in the Workspace Runner parameters, set the FME workspace to point to a real .fmw and set the parameters as desired. Then close the dialog

2. In the Navigator, browse to Transformers > WorkspaceRunner > FME Workspace, then right click and create a User Parameter. Just click OK to accept the default values.

3. Once the User Parameter is created [WORKSPACE_FILE], double click on it to edit the value. Change the value from your original workspace path to @Value(AttributeName), for the screenshot example, it would be @Value(WsName). Click OK.

4. The @Value(AttributeName)/@Value(WsName), should appear next to Transformers > WorkspaceRunnner > FMEWorkspace.

Delete the User Parameter [WORKSPACE_FILE] under User Parameters > Published Parameters.

5. Once the User Parameter is deleted, the @Value(AttributeName)/@Value(WsName) should still be next to the FME Workspace for the Workspace Runner. You can then run your translation normally.

Hopefully, that works for you,

Please let us know if you were successful, and we will post on this question once the PR81325 has been resolved.

 

-Liz


Thanks, this workaround is working.


Thanks, this workaround is working.

Hi @ddecoene

I'm glad you got the workaround working. Just wanted to let you know that this issue has been fixed for FME 2019. You can download a beta and try it out.

 

-Liz


Reply