Skip to main content
Hi all,

 

 

I'm currently working on a project where the customer wants to use an existing configuration xml file, where they can enable / disable custom validations and store some validation properties (such as allowed feature class names).

 

 

I'm struggling to find a proper way to do this, can anyone point me in the right direction?

 

Hi,

 

 

I have solved the same thing using a Python startup script that reads and parses the XML into a global (Python) dictionary. The dictionary items are then referenced by scripted (Python, again) parameters so that they can be easily referenced in the workspace in e.g. Testers, etc.

 

 

To read and parse the XML configuration, I recommend either xml.minidom or ElementTree.

 

 

It is a little bit of work to implement, but it works very well.

 

 

David
Hi Serio,

 

 

Alternatively, using Published Parameters and WorkspaceRunner can be another approach. In the main workspace, fetch and use the values which should be determined based on the configuration through Published Parameters. Then make another workspace which reads the xml document with XML reader, parses the configuration by some transformers, passes the parsed values to the main workspace and runs it by WorkspaceRunner.

 

 

Takashi
Hi Serio,

 

 

If you mean updating by  " ...enable / disable custom validations and store some validation properties..." The XML updater might be what you are looking for.This demo shows some of the possibilities of the transformer.

 

Hope this helps

 

 


thx for your replies.

 

 

I'm currently working on an implementation using python (Using ElemenTree) to create some Published Parameters as triggers that indicate if a validation should be done or not (just a simple true false).

 

For the validation itself I will probably just use additional python scripts in combination with Testers.

 

 

Serio

Reply