How to Use a Config File in Your Process

Document created by dprostko on Jun 13, 2011Last modified by ruchika_yadav on Mar 1, 2016
Version 2Show Document
  • View in full screen mode
You would like the ability for a non-Boomi user to be able to configure some of the parameters used in a process.


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:

  1. Grab a config file from an FTP site.
  2. Use the info in the file to set Process Properties.
  3. Demonstrate the use of those properties in a Message Shape.
User-added image

 

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>
    <name>Doug</name>
    <id>28</id>
    <status>awesome</status>
  </config>

After saving that to a local file called 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.

User-added image

 


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.

 

User-added image

 


User-added image

 

User-added image

 


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.

 

User-added image

 

Attachments

    Outcomes