Expand my Community achievements bar.

XML storing XDP data - namespaces

Avatar

Level 7

We have a problem from one environment to another.

We have a process that is using an XDP form and submitting as XDP.

The data is submitted to an XML variable and the setting "Store as xdp data" is checked and it refers to our XDP asset.

In our development environment, we are able to refer to form elements using the XPath as expected:

/process_data/inXML/xdp/datasets/data/form/fname

But, in our test environment, it fails with location doesn't exist.  If we use fully qualified XPath, it works.

/process_data/inXML/xdp:xdp/xfa:datasets/xfa:data/form/fname

We do not use Workbench in our Test environment but, we hooked it up to validate the settings.

Typically, we just import a new archive or patch the existing archive to implement changes.

We have also validated that the submit function is submitting as XDP.

These processes were migrated from 7.2 but, we have removed all references to 7.x components, settings, etc.

We have noticed that in the LCA, opening the .process file, there is still an init-form setting but, seems to be inocuous.

Lastly, the development environment is using turnkey JBoss, MySQL.  The Test environment is using JBoss/SQLServer.

We can't find any rhyme or reason for the difference.

Does anybody have any ideas?

2 Replies

Avatar

Former Community Member

The expressions that work in your test environment suggest that the "Store form data as xdp" setting has been removed in the XML variable. When this setting is ON the data within the XML variable will always execute XPath expressions as namespace unaware (as in your development environment). This setting was done so that valid XPath expressions for the data will always be generated regardless if there are namespace aliases specified in the process properties.

Verify that setting is on in the XML variable. You could also try removing any namespace aliases specified on your process. Right-click on the process in Workbench and select Configure. Navigate to the Advanced tab, remove any "Registered Prefixes for Namespaces used in XPaths". Save and re-deploy the process.

Avatar

Level 7

Yes, we verified that the "Store as XDP" was set in both environments.

We also "registered" the jav, xdp, and xfa namespaces in the advanced tab of the process configuration.

We solved the problem by reverse engineering an XSD from the data and "importing" that asset in the variable declaration instead of refering to the XDP asset.