Jump to: navigation, search

XML File Capture Point

The XML File Capture Point provides the ability to capture and update tasks from XML files that are found in a specified inbound directory on a local or network file system. Additional directories on the file system are used for the capture point to place unsolicited notification messages about the task as it moves through its lifecycle in iWD and changes status, as well as when some updates are made to the task in iWD.

XMLCP.png

The XML File Capture Point scans the inbound directory based on a configurable time period, which can be as frequently as every 5 seconds.

It is possible to configure the XML File Capture Point to filter out specific types of unsolicited notifications, to reduce the number of messages being produced by the capture point that may not have value to the source system.

An inbound XML file may contain multiple operations—for example, Create Task and Complete Task messages for different Capture IDs, or multiple Create Task messages to create more than one task with a single XML file).

The XML File Capture Point may also be used to process tasks that originate as spreadsheet data. In this case, a script would need to be created to put the spreadsheet data into an XML format to then move it to the appropriate directory on the file system to be consumed by the capture point. Alternatively, an XML data map can be created directly in Excel, using the iWD message schema (xsd), after which the data from the Excel file can be exported as an XML file and put directly into the file system directory.

Supported Directories

The XML File Capture Point uses the following directories on the local or network file system, to process messages:

  • Inbound—The directory from which the tasks are captured. This directory is also used to process messages coming from the source system such as Complete Task and Update Task.
  • Error—If a file from the inbound directory is impossible to parse or otherwise process, and no corresponding task has been created, the original file is copied to this directory.
  • Processed—If a file from the inbound directory has been successfully processed and its corresponding task has been created, the original file is copied into this directory.
  • Notification—All solicited and unsolicited notifications, resulting from processing of task captured by this capture point will be written in the form of .xml files into this directory, subject to the notification filtering settings.
  • Completed—If a task is completed in the iWD system, an iWD Task Info notification will be saved in the form of an .xml file into this directory..
  • Rejected—If a task is put into a rejected state in the iWD system (which is based on the business logic configured in the iWD business process), an iWD Task Info notification will be saved in the form of an .xml file into this directory.
  • ErrorHeld—If a task is put into an error state in the iWD system (which is based on the business logic configured in the iWD business process), an iWD Task Info notification will be saved in the form of an .xml file into this directory.
  • Canceled—If a task is canceled in the iWD system, an iWD Task Info notification will be saved in the form of an .xml file into this directory.

Message Transformation

The XML File Capture Point supports optional message transformation. This is provided via the Groovy scripting language. That is, Groovy scripts may be written that describe to iWD how the source system’s native XML message format should be converted into a message format that can be understood by iWD, and vice-versa for message responses and notifications coming from iWD back to the source system.

For more details about message transformation, please read the Transformation topics in the eServices Integrated Capture Points Guide.

Example XML File Capture Point Request

Here is an example of a simple request using the iWD XML File Capture Point, which instructs iWD to create a new task. This request includes examples of iWD core, extended, and custom attributes. The core attributes are those such as captureId, which can be seen near the top of the request. The extended attributes are those that are enclosed within the <ext></ext> elements, and the custom attributes are the key-value pairs that are enclosed within the elements.

<?xml version="1."? encoding="UTF-8"?>
<interaction operation="submit">
<properties>
<ExternalId>SomeExternalId</ExternalId>
<CustomerSegment>Gold</CustomerSegment>
<CustomerInfo>
<FirstName>William</FirstName>
<LastName>Bell</LastName>
</CustomerInfo>
</properties>
</interaction>

Simple XML File Capture Point Message Flow

XMLFlow.png

Integration

To use the XML File Capture Point, the source system must be able to generate XML files and write/export them to a local or network file system. The XML files must contain messages that are in an iWD-compatible (or Interaction Server-native) XML format. If not, then Groovy transformation scripts (inbound and outbound) must be created to transform the inbound XML message into the Interaction Server message format, and to transform the outbound reply or notification XML message from Interaction Server into the source system’s XML format. There are sample Groovy scripts provided with Interaction Server that can serve as starting points, if message transformation is required.

It is easy to test the XML File Capture Point by putting a new message in the inbound directory, seeing if it gets picked up by the capture point, and observing how it is processed. It is possible to include multiple messages in a single XML file (for example, several Create Task messages), allowing you to test multiple use cases with one file.

Further Reading

There is more detailed technical reference information for this capture point in the XML File Capture Point section of the eServices Integrated Capture Point Reference Guide.

This page was last edited on September 14, 2018, at 15:40.
Comments or questions about this documentation? Contact us for support!