There are a couple design questions to figure out before you can begin. Firstly, how will the user edit this config file? An easy way to set this up would be to store the config file in a place that both the atom and the user can reach. This could be on a local disk or even an FTP server. The next thing to figure out is what format this config will take. XML should be a good choice for most situations and has the added benefit of easily integrating into your process.
So, now we have a scenario where the user grabs the config file, from say an FTP site, edits it, then re-uploads it back for the atom to read.
The following example shows how this technique may be used in an actual process. Figure 1 shows an overview of a process that does the following:
- Grab a config file from an FTP site.
- Use the info in the file to set Process Properties.
- Demonstrate the use of those properties in a Message Shape.
Now, in order for this to work, you must create a profile for your config file. I chose to use XML for this since the format most naturally lends itself to this sort of task. I know what variables I want to allow the user of this process to set, so I create a sample file and import it. Here is what my sample file looks like:
config.xml, I create a new XML profile in Atomsphere and import the file using the Import button. After importing, you will see the file's fields on the left hand side of the screen. See Figure 2.
Figures 3, 4 and 5 show how the Set Properties shape was set up. In the left hand column, I chose a Process Property and on the right, I chose the corresponding XML profile element.
Figure 6 shows how then these Process Properties can be used in other shapes. This is a message shape, but this could have been an SQL query and the Process Properties could have been used as parameters.