You can use a properties file, which is very much like a Windows ini file.
You’d create Java services and use the java.util.Properties class to access properties. Here’s one way it could be done.
Input: filename (string)
Output: props (object)
- Retrieve filename from pipeline.
- Create new java.util.Properties object.
- Call Properties.load(filename)
- Place the properties object in the pipeline.
Input: props (object), key (string)
Output: value (string)
- Retrieve props from pipeline, casting to Properties type.
- Retrieve key from pipeline.
- Call props.getProperty(key)
- Place returned value in the pipeline.
Another poster said they used a static var to hold the properties object. This is unnecessary (you can pass it around in the pipeline) and may cause multi-tasking issues (e.g. the property file that was last loaded would be used for all flows).
Hope this helps.