I’d suggest a Java Service that stores a list of key-value pairs in a static variable.
The way that the java services work within webMethods is that all java services in a given folder belong to the same underlying java class with each java service in the folder being a method in the class.
A static variable (I don’t want to use the word global would be defined in the shared section of the java service and would be accessable by all java services (methods) in the folder.
You could then develop an init service to initialise the list from the db and maybe getter and setter services that allow you to access the key-value pair list from flow services. (e.g. A service called getKeyValue that has input of “key” and output of “value”) The service would be invoked in flow when you need to get a key value from the list.
From your first question, this is not global variable - it a class variable that would be accessable by calling the appropriate service (method) through flow but we don’t need to go into the debate around global varibles do we You don’t really want to expose the list to every service in webMethods, you should try to limit the interface to the list using a java service such as getKeyValue as suggested above… but these are all design decissions that you will need to consider.
If you havn’t used java services before, I would recommend a bit reading first… The webMethods doco has some coverage for this. Developed and tested properly, java services can be very effective.
#Integration-Server-and-ESB#webMethods#Flow-and-Java-services