FORM_DATA) can be constructed in many ways. For this reason, XPaths are used to map the database fields to the XML fields.
TRANSACTIONparameter (TEXT type data) must be defined for every XMLTODATABASE activity/action. The text entered in the parameter must match the transaction name attribute in order to use the right transaction for the right activity.
ConnectionStringto connect to the database
System.Data.Odbc) ✏️ Note: This attribute can only be used with the
xpathattribute of the
commandnode (possible values:
loopattribute is set to
yes, and the XPath returns 10 results, the XPath contained in the command query will be executed 10 times (once for each result). If the
loopattribute is set to
no, the command will be executed only once with the first node returned by the XPath contained in the query.
Transactions.xmlfile to find a node with your transaction’s name.
\wfgen\App_Data\Files\XmlToDatabasefolder, and named
Transactions.xml. The XMLTODATABASE application parses this file to find your transaction.
TRANSACTION: IN direction text type data
XML: IN direction file type data
Transactions.xmlfile, the XMLTODATABASE application looks for an
.xmlfile with the same name as your transaction. The transaction document should be created in the
\App_Datafolder, or if you want to include your transaction in your process definition (to be exported and shared by an XPDL file), you can upload your transaction file in a process file data type. To do this:
TRANSACTIONS_FILE, and send the value of your process data.
\App_Datafolder of the web server, or if you want to include your transaction in your process definition (to be exported and shared by an XPDL file), you can write your transaction within a process text data type.
TRANSACTIONS_TEXT, and send the value of your process data:
REQUEST_DATEand the specific node situated at
/MyData/MyExample/Date_Fieldwill be formatted as date
XML_FIELDS_DATE = //*/REQUEST_DATE, /MyData/MyExample/Date_Field
XmlToDatabaseTestModein the configuration file must be set to
XmlToDatabaseEnableTraceparameter in the configuration file of the web service is set to
Y, a log file will be created in the
Date; [Database name;] Transaction name; SQL query; Execution result
Execution resultvalues are:
OKif the query was run successfully, or
ERROR: Error code - Error descriptionif an error occurred.
TRANSACTIONparameter has a null value or is not completed.
transactions.xmlfile has no transaction with the name attribute corresponding to the value of the
connectionstringattribute has not been specified in the database node.
XML_FIELDS_DATEthat was passed refers to a field that is not a date field.
XML_FIELDS_NUMERICthat was passed refers to a field that is not a numeric field.
XML_FIELDS_NUMERICparameters is not a valid XPath expression.
commandnode could look like this:
XPATH:tags in the query will be replaced with
/data/, which is the XPath attribute value.
PARAM:tag is used to identify a WorkflowGen parameter instead of using an XML field.
commandnodes could look like this: