Please enable JavaScript to view this site.

InterFormNG2 Manual

This advanced converter workflow component can split up an XML in the payload of the current workflow. The subtree of this workflow component is executed for each splitted XML.

 

A similar component, which is also able to transform the splitted files, is the Transform or split component.

 

Any changes to variables within the split definitions are local for the actual split and are forgotten when the next split is processed (and when all processing of the splitted XMLs are done).

 

If you are combining a split in a sub-workflow with an error handler, and you want to have an indication in the main workflow if an error occurred for any of the splitted files, then you should consider to create a temporary unique resource (that is linked with the input file), if an error occurs and then verify if such a resource exists in the main workflow, when processing returns from the sub-workflow. Here the main workflow should then also delete the temporary document. A similar example for spooled files is included here.

 

This video shows how to split XML files in the workflow:

 

 

The Split XML workflow component has these parameters:

 

NG2WorkflowSplitXML001

 

 

Split XPath

This can be used, if you want to split up an XML file per node in the input file. You can click the magnifying glass to refer to the optional sample XML file of the workflow. If you use the path above: /Root/Document on an XML file, that looks like this:

 

NG2WorkflowTransformOrSplit0002

Then you will get 3 output XML files, that contains each the Document subtree - without the common Root and CompanyInfo nodes.

 

If you want to keep any header nodes in the splitted XML files, then you need to copy this into each subtree before splitting the file. This is covered here.

 

 

Collect attachments

This option can be used if you want one attachment in an output email for each document found in the input XML file. For that you might use both the component, Set attachment name and Payload to attachment for each of the splitted XML files. In order to force the workflow to remember and collect all of these attachments you need to enable this function on the Split XML component. If you do not enable this, then each repeat loop starts with an empty list of attachments.