Skip to main content
Worspace runner reads a feature type (SDE feature class) and I'd like to pass the line feature and its attribute - one feature at a time - as part of my translation on the worker workspace using a Workspace Runner transformer. I know the features will enter and exit the workspace through the workspace runner from within the runner workspace but how can I use it inside the worker WS?  There is another reader with multiple related feature classes with the feature type, from the runner WS, in the worker WS that is translated with each feature from runner workspace. On each feature from the runner, an attribute named featureID is needed for the where clause parameter of the reader feature types inside the worker workspace, how do I implement this in the Main workspaces? On the Workspace Runner tranformer that paramater looks  like this Parameter column:  "FEATUREID_TO_PROCESS" ; Value column: @VALUE(featureID). I tried creating a User parameter in the runner WS and used Apply to Workspace Runner but without any success. Any suggestions?
Hi

 

 

if I understand it correctly, you want to pass a feature into a child workspace that is started using the WorkspaceRunner transformer.

 

 

There is no super-easy solution to this, but I can think of at least two workarounds:
  1. The master workspace sends the OBJECTID (or equivalent) to the child workspace, which then re-reads the feature using a WHERE-clause on the reader, e.g. 'WHERE OBJECTID=$(MY_PUBLISHED_OBJECTID_PARAM)'. Just be aware that if the child workspace modifies the feature in any way you would have to save it back to the geodatabase and then re-read it yet again in the master workspace.
  2. A bit more complicated, but more efficient, would be to use the Python fmeobjects API function FMEFeature().serialize()  to transform your feature into a string buffer that you could pass into the child workspace and decode using FMEFeature().deserialize(). Again, if the child workspace modifies the feature you will have to find a workaround to propagate them back into the master workspace.
David

 

 
Thanks for the quick response David.

 

 

1. I get the logic but I can't visualize the how. As I said I tried to create User Parameter but I can't apply it to the WorkspaceRunner. Should I use a variablesetter but how is this variable added to the list or parameters in the workspacerunner? 

 

 

2. The feature being passed inside the runner workspace is not as important as passing the where clause parameter on the reader feeature types. Perhaps I can use your suggestion on this topic if I develop this tool as a custom transformer in the future.
I figured out the answer to my own question in this post: https://knowledge.safe.com/CommunityAnswers?id=906a0000000cg4JAAQ

 

 

The parameter is created in the worker WS and after the runner WS is saved, the paramter shows up on the WorkspaceRunner of the runner WS. 

Reply