Dashboard > Avoka Public > ... > Business Process Techniques and Patterns > Inserting XML data into a form variable
Inserting XML data into a form variable Log In   View a printable version of the current page.
Added by Yuri Ventsov , last edited by Kendy Yus on Oct 02, 2007  (view change)
Labels: 
(None)

Please click here for full reference on Form Utilities DSC.

Using the Avoka XMLUtil DSC

You can insert data retrieved from a database as repeating XML fragments into a PDF form. Suppose you created a form using the following XML schema.
The following process sample demonstrates how to retrieve data from a database and insert the data into the form. You can import this archive file using archive manager and open it in the process designer.

First, we create a variable, called 'form_variable' of type 'xfaForm' and specify its properties as shown on the following picture.


Second, create an XML variable, called 'xml_variable', using the same schema as before as shown on the following picture.



The process workflow looks similar to the following.


In the first step of the process we retrieve data from the database and insert into the XML variable. The following picture shows settings to retrieve the data.



Optionally, you can check the 'Use Parameterized Query' box to create a prepared SQL statement and specify query parameters. To test your statement, click 'Test' button. This will display the first row of the result set retrieved from the database.
The following picture shows settings to insert data from database into the XML variable.



The second step in the process is to use the data we saved in the XML variable to populate the form variable. The following picture shows settings for XMLUtil component used in the process.



Note that you can specify the starting row index, 0 by default, and the number of rows to read, -1 means all rows. If you select to copy everything, no mapping is necessary. Finally, you can specify whether you want to append the rows to the existing rows in the form data or to overwrite existing rows.

After we run the process and open 'To Do' list in the workspace, we can see that the form has been populated with the data from the database.



Similarly, you can populate any XML process variable with data read from an XML variable.

Powered by Atlassian Confluence 2.7.2, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators