Normally on the python caller I would set the expose attribute to myList{}.value
but in this case I thought it would be $(listName){}.value, however that syntax doesn't appear to work.
Any suggestions?
Normally on the python caller I would set the expose attribute to myList{}.value
but in this case I thought it would be $(listName){}.value, however that syntax doesn't appear to work.
Any suggestions?
$(PARAMETER_NAME) will be replaced with the parameter value simply.
What kind of error has occurred?
Takashi
Unfortunately the syntax seems to be invalid in the "Attributes to Expose" parameter of the PythonCaller. As far as I know, only possible way is:
1) In the script, create the list with a temporary name. e.g. _tmplist{}.value
2) Expose the temporary name using the "Attributes to Expose" parameter.
3) Rename it with a ListRenamer.
Type To Rename: List
List/Component Name: _tmplist
Replace With: $(listName)
Note:
In FME Workbench 2014, this method works fine as expected.
However, the ListRenamer will be updated in FME 2015. Much enhancements have been done for the new ListRenamer, but unfortunately user parameter cannot be set to the replacement name, at least in the latest beta.
And, in my testing, existing custom transformers which are using this method with the current ListRenamer do not show the list name properly, when I opened the workspace with FME Workbench 2015. It works fine functionally, but the default list name is always visible in the interface even if I set other name to the parameter. No good...
I've already asked Safe to resolve this issue several weeks ago, but it may not be resolved by first release of FME 2015.
I myself am going not to parameterize a list name until the issue has been resolved.
Yes, my question is indeed how to expose the list name specified in the published parameter. I've adopted your solution and put a note in about incompatibility with 2015.
Thanks.
Transformers in the Bookmark expose list names specified by Published Parameters. ?They does nothing other than the exposing; actural list attributes will be created by the PythonCaller.
The upper stream in the Bookmark exposes a structured list - "$(listName1){}.sub1", "$(listName1){}.sub2"; the lower stream exposes a simple list - "$(listName2){}". The Aggregator is the key.
This method worked fine in both FME 2014 SP4 build 14433 and 2015 Beta build 15210.
See also the implementation of the StringMutliSearcher.