Expand my Community achievements bar.

External Configuration File

Avatar

Level 4

Hello folks,

Can I use some external configuration file with my PDF form like the Web.Config in the ASP.NET?

I have strings like: "URL to Submit" and so on... that I want to change from time to time in the form(Producation ENV, Test ENV, Development ENV).

Thank you,

YaIr

3 Replies

Avatar

Level 10

One option:

You can use form level variables which can be changed easily.

File -> Form Properties -> Variables tab

I have configured four variables:

PROD_URL point to a PROD webservice definition (WSDL location), while TEST & DEV points to other locations.

Changing the CurrentServer variable value to (DEV/TEST/PROD) will invoke the web service from appropriate server.

variables.png

You can access the variables directly within javascript: 

textField1.rawValue = PROD_URL.value;

Hope that may help you!

Nith

Avatar

Level 4

Hi Nith,

Using your solution, I steel need to re-edit my form.

I need more flexible solution. such extra-file or something...

Avatar

Level 10

Other options:

-> Writing a configuration file (like Java properties file) and reading values from it using web service. This might again need editing of WSDL URL unless you keep a single webservice for all environments.

-> You can set values through Process Configuration (via adminui) by creating configuration variables. However, these values must be transfered from process to form through either PrepareData process (if you need the configuration from initial draft task) or within your main process using SetValue activity.

Both of these options have some additional works other than what I've mentioned earlier.

Please let me know if you find a better solution.

Nith