Skip to main content
I need to collect fme_feature_type for all features read by workbench1 Reader and concanate them and pass them to workbench2 publish parameter in shutdown script.

 

I think any attribute created within workbench will not be available in shutdown script. So, i choose publish parameter to be my carrier. After reader, inside a python caller i fetch fme_feature_type and append it to publish parameter. When i print it, i can see all names.

 

But when i try to access it inside shutdown script, it only retains initial values.

 

 

Is there any way to solve this problem?

 

 

Subrat.
Hi Subrat,

 

 

Published parameters are static, cannot be added, modified or removed at run-time anyway. Consider using the VariableSetter / VariableRetriever transformer or global variables in the Python script, see this article: Python Shutdown Best Practise - Global Variables + Published Parameters

 

 

Takashi
Hi Takashi,

 

       I tried the solution you suggested i.e. declaring a global variable in start up script and it was working fine for a string length of 232. But when i tried with 950 character string, it is not calling second workbench.

 

 

Is there any limitation on size of parameter value while fme work bench calling from shutdown script?

 

 

Following is my syntax (featureNames is global variable):

 

os.system("fme.exe D:\\\\Subrat\\\\WORKBENCH2.fmw --FEATURE_TYPES_TO_READ %s " % featureNames)

 

 

Subrat. 
Hi,

 

 

rather than using os.system to execute a workbench, consider using the relevant parts of the fmeobjects API. See my example posted here.

 

 

David

Reply