You can create published parameters that are not initially (or at all) related to a particular transformer setting. This allows you to create workspaces customized to your particular translation needs. Unlike published parameters that are applied to just one part of a workspace and require individual editing, standalone published parameters can be applied to any (or all) parts of a workspace, all at once.
Right-click on the Published Parameters node in the Navigator pane and choose Add Published Parameter.
Choice: Creates a parameter that allows you to choose one of two values.
Choice - Multiple: Creates a parameter that allows you to choose from multiple values.
Choice or Text: Enter a text string or select one from a pick-list
Color Picker: Creates a parameter that allows you to change the FME color value.
Coordinate System Name: Creates a parameter that allows you to choose a coordinate system.
Directory: Creates a parameter that allows you to choose the name (and path) of a directory.
Filename: Creates a parameter that allows you to choose the name (and path) of a file.
Float: Creates a parameter that allows you to choose a floating point number
Integer: Creates a parameter that allows you to choose an integer number.
Password: Creates a parameter that allows you to enter a password.
Text: Creates a parameter that allows you to enter a text string.
The parameters required in this field are dependent on the Parameter Type you choose. For example, you can populate a list and the contents will be displayed in a pull-down menu when the parameter is published, or point to a file or directory.
Enter a name. This will appear under the Published Parameters node in the Navigator pane.
Enter the prompt that will appear when you run the workspace.
Choose the default value that will be used.
Once created, you can use the parameter by
Right-clicking on the parameter and choosing "Apply To" to apply that parameter to another setting
Right-clicking any setting in the Navigator, choosing Set to Published Parameter and selecting the newly created parameter
Using the ParameterFetcher transformer with the parameter name specified
Here is an example of a workspace including a standalone published parameter. The initial Add Published Parameter dialog is created to generate a database password prompt on a workspace.
It is used by both Joiners, shown below and could be used by a reader or writer too.
In this example, the published parameter is an createed to switch options. The workspace filters the data according to the option chosen.
When you prompt and run the translation, you will be asked which option you want to use:
Existing Published Parameters will work as they always did, but now have unrestricted sharing abilities.
In other words, there was a previous restriction that published parameters could only be shared with parameters (for example, transformer settings) of the exact same type. This limitation has been removed.
This allows greater scope by allowing, for example, an integer type parameter to be shared with a float type setting.