Skip to content

Knowledge Base

Business Process Automation Platform

Import XML Document Tool

What is the Import XML Document Tool?

The Import XML Document tool imports an XML document to be used and processed by other task steps. To validate the XML documents at runtime, you can either import an XML schema file (XSD), inferred from an existing XML document, or manually constructed.

Import XML Document Tool Features

  • Browse for and select an XSD file to be used as the XML schema for the step
  • Browse for and select an XML file to be used as the XML schema for the step and then automatically infer the schema from the XML file content
  • Copy and paste valid XML into the step and then automatically infer the schema from the XML content
  • Validate the schema once prepared
  • Manually create a new schema or edit an existing one
  • Specify the source file properties to be extracted at Task run-time and exposed to other steps through the Task Browser
  • Preview the schema structure before saving and running the task
  • Output XML for use by other task steps
  • Output XML as a string for use by other task steps
  • ODBC, OLEDB or Call Stored Procedure memory definitions can be created for the step
White Paper - Import XML Document

White Paper - Import XML Document

The Import XML Document white paper descrbes how to use the tool.

Download White Paper

Import XML Document Tool: Working with other Tools

The Import XML Document tool can directly interact with the following tools:

Consuming from Other Tools

The Import XML Document tool can consume objects directly outputted by the following tools:

IconTool NameTool Category
Import Flat File ToolImport Flat FileInput
Import XML Document ToolImport XML DocumentInput

Video Overview

 

Objects Consumed

The above tools output the following objects with can be directly consumed by the Import XML Document tool:

  • XML — XML data from any BPA Platform tool capable of exposing such data (see above)

Exposing to Other Tools

The following tools can directly consume output from the Import XML Document tool:

IconTool NameTool Category
Import Flat File ToolImport Flat FileInput
Import XML Document ToolImport XML DocumentInput
Import XML Document ToolRetrieve Text MessageInput
Convert XML to Recordset ToolConvert XML to RecordsetFormat
Import XML Document ToolFormat as Flat FileFormat
Run Microsoft Reporting Services ToolRun Microsoft Reporting ServicesFormat
Import XML Document ToolTransform DataFormat
Import XML Document ToolSave FileOutput
File ManagementFile ManagementGeneral
Import XML Document ToolApplications Platform ConnectorData Connectors

Objects Exposed

The following objects are outputted by the Import XML Document tool and can be directly consumed by the above tools:

  • InputData — This object is only available if an XML file is consumed from a previous task step. It contains the imported XML.
  • FileProperties — This object exposes the source file’s Name, Size, Type, DateModified, DateCreated, DateAccessed, and Attributes properties collected at task run-time. You can set which properties are exposed in the File Properties dialog box.
  • OutputXML — This object exposes two sub-objects:
    • Output Schema — This contains the XSD file for the output
    • Output XML — This contains the XML produced by the Import XML Document tool
  • ImportedFileDetails — This object exposes two sub-objects:
    • Path — Whether the XML document was specified or sourced from a previous task step, this is the folder path of the imported XML document
    • FileName — Whether the XML document was specified or sourced from a previous task step, this is the imported XML document

Import XML Document Tool: Setting the Import Time-Out

You can set the time out period for how long the Import XML Document tool attempts to import a file. If the file cannot be imported, after the expiry time, an error is written to the Event Log.

You open the Import XML Document time out dialog box by either:

  • Going to Manage > Tools > Input > Import XML Document
  • From the Task Manager, expanding BPA Platform > System > Tools > Input and double-clicking Import XML Document in the Items List

Import XML Document Tool

Set the import time-out period; the default is 2 seconds.

Import XML Document Tool: Step Configuration

To add a new Import XML Document step to an existing task, you either:

  • Click and drag the Import XML Document icon from the Task Browser to the task Design area.
  • From the task’s Design tab, right-click on empty space and select Add > Input > Import XML Document.

For a detailed description of how to create new tasks, refer to the product help.

About the General Tab

Import XML Document Tool

The General tab is used to enter the following details for the step:

  • Name — Enter a meaningful name for the step
  • Description — If required, enter a description of this step
  • File name and path from a previous step — Enable this option to import an XML document previously imported by another task step
    • Source — Contains all available task steps that have previously imported an XML document
  • Path — The full folder path to the location of the XML document; you must ensure the logged in Windows user has read access to the folder specified here
  • File Name — The XML document to be imported; use wildcards to import multiple documents at task runtime

About the Main Tab

If required, you can define a XML schema in the Main tab to validate the imported XML document. The Import XML Document tool adheres to the industry-standard XSD format.

Import XML Document Tool

Defining the XML Schema

You can define the schema by:

  • Manually entering it into the text box
  • Importing an existing XSD file — click Browse to XSD/XML File

Click Validate Schema to ensure no errors exist in the XSD file prior to run-time.

Inferring the XML Schema

Alternatively, the Import XML Document tool can infer the schema from a sample XML document. If you have an example of the XML document imported at run-time, either:

  • Copy it into the text box
  • Import it into the tool — click Browse to XSD/XML File

Click Infer Schema from XML to define the XSD file, then click Validate Schema to ensure no errors exist in the XSD file prior to run-time.

Viewing the Output XML Structure

Once the XML schema has been defined, you can view the expected XML structure in the OutputXML tab:

Import XML Document Tool

Extracting File Properties

If required, you can specify which of the imported XML document’s file properties are made available in the Task Browser at run-time:

  • Name
  • Size
  • Item type
  • Date modified
  • Date created
  • Date accessed
  • Attributes

Click Extract File Properties.

About the Options Tab

The Options tab allows you to define how errors in this step are handled at task runtime.

Import XML Document Tool

If an XML validation error occurs when processing the current XML document, you can choose to either Abort Step regardless of whether there are unprocessed files remaining or Continue with the next matching file. If there are no more matching files, the step is completed.

If a file cannot be accessed, you can choose to either Abort Step regardless of whether there are unprocessed files remaining or Continue with the next matching file. If there are no more matching files, the step is completed.

If either of the above options are set to Abort Step, you can choose what happens to the whole task itself with the next option set:

  • If the step is aborted, you can choose to Continue processing onto the next step in the task, or terminate the whole task immediately (Abort Task).

If the Import XML Document step has attempted to process all available XML documents and has failed (Continue with next matching file has been selected from the previous option sets), you can choose what happens to the whole task itself with the next option set:

  • If no files could be processed, you can choose to Continue processing onto the next step in the task, or terminate the whole task immediately (Abort Task).
White Paper - Import XML Document

White Paper - Import XML Document

The Import XML Document white paper descrbes how to use the tool.