XML Splitter
XML Splitter action tasks use the XSLT language to split XML data files into multiple XML data files that are passed to subsequent tasks in the process. The XML splitter includes options to add a new root node within the generated files, as well as to change the original file’s encoding to UTF8. Note that the XML Splitter cannot process files larger than 30 megabytes.
Input
A XML Emulation data file.
Processing
The file is separated into multiple chunks according to the rules set in the task's properties.
Output
Multiple data files, sent one after the other to the rest of the tasks in the process. Metadata, job infos and user variables are not modified by this task.
XML Splitter action task properties are as follows:
General Tab
This tab lets you choose the splitter settings for default PlanetPress Workflow XSLT engine. If you want to use your own XSLT engine, click the Alternate XSLT Engine tab.
- Split method: Use this box only if you want to edit the standard XSLT script that will be used to split the XML file. First use the Standard XML splitter option to define the standard settings. Then, to change the standard XSLT script, select Advanced XML splitter and edit the script as required.
- Standard XML splitter options
The following options are only displayed when the Standard XML splitter option is selected in the Split method box.- Condition node path: In the tree view, select the XML node to consider to determine when to split the file. To indicate whether you want the file to be split whenever this node is encountered or whenever the information in this node changes, see the Condition group below.
- Condition group: Use this group to indicate whether you want the file to be split whenever this node is encountered or whenever the information in this node changes.
- When condition node is found: Select if you want the file to be split whenever the node selected in the Condition node path box is encountered.
- When condition node content changes: Select if you want the file to be split whenever the information stored in node selected in the Condition node path box changes. When this option is selected, the split files typically contain more information (all the orders for a given customer, for example).
- New file root structure group: Use this group to tailor the structure of the generated XML files.
- Keep XML structure: Select if you want the generated files to have the exact same structure as the original XML file (all the way to the root node).
- Add new root node: Select this option and enter a root node name in the box to the right, if you want the generated files to have a structure that begins with a new root name and that then goes directly to the node on which the file was split, as indicated in the Split on node box below.
- Encoding group: This group lets you indicate wether you want the splitter to use the file’s own encoding or the universal encoding UTF8 to process the file. Note that if the file contains no indication as to which encoding should be used, the default system encoding will be used. This may result in errors being generated or split files that contain bad data. Using the UTF8 encoding can prevent such errors.
- Use UTF8 encoding: Select if you want to use the UTF8 encoding to process the file.
- Use file’s encoding: Select if you want to use the XML file’s own encoding to process the file.
- Advanced XML splitter options The following options and buttons are only displayed when the Advanced XML splitter option is selected in the Split method box. Note that you should not use this option before you have completed all the required settings using the Standard XML splitter option.
- Refresh XSLT: Once you have made all the required settings using the Standard XML splitter option, click this button to display the XML code generated by the XML splitter. You can then use the box below to edit the code as required.
- {WATCHTEMPFOLDER} file separator: Use this box to edit the default XML file separator (/).
Alternate XSLT Engine tab
This tab lets you choose the splitter settings for your own XSLT engine. If you want to use the default PlanetPress Workflow XSLT engine, click the General tab.
- Use alternate XSLT engine group: Select this option to enable the box and the buttons included in this group.
- Path and parameters for the alternate engine: Enter your XSLT engine’s absolute path (use quotes for non DOS 8.3 compliant paths) followed by its required operators and parameters (you must know exactly which operators and parameters your XSLT engine requires and in which order they must appear in the command prompt used to launch the engine). Note that you should not enter fixed values for the following parameters: the XSLT stylesheet parameter, the source XML data file parameter or the output file parameter. When you click the buttons below, the corresponding parameters are automatically added at the current cursor position. These variables will be replaced by the correct information at runtime.
- XSLT file: Click to add the {XSLTFILE} variable to the command prompt displayed in the box above.
- Data file: Click to add the {DATAFILE} variable to the command prompt displayed in the box above.
- Output file(s): Click to add the {OUTPUTFILE} variable to the command prompt displayed in the box above.
- Browse button: Click this button and browse to select the XSLT engine you want the XML splitter to use.
On Error Tab
By default, any action task, branch, splitter or condition that generates an error will simply be ignored, and the task just under it (not within a branch) will be given control of the job file without any modification. Any initial input task that generates an error will stop the process from running as a whole, and output tasks will not generate output. The On Error tab can be used to overwrite the default behaviors.
- Send to Process: Check this option to send the job file to an error management process.
- Error Process drop-down: Enabled only when the Send to Process option is checked. Lists any process of which the initial input task is the Input Error Bin task.
- Action Group: This group is disabled in the initial input tasks and defaults to Stop Process. In all other tasks where the On Error tab is present, the following options are available:
- Ignore: The task is ignored as if it did not exist, and the job file is passed on to the next task in the process.
- Stop Branch: If the task is in a branch of the process, the branch is stopped and the job file is returned to the process after the branch. The branch will not produce any output.
- Stop Process: The process is stopped and no more processing is done. No further output is produced.
- Log Message: Check this option to enable logging a custom error message in the PlanetPress Suite Workflow Tools' log file.
- Message: Enabled only when the Log Message option is checked. Enter a message that will be logged in the PlanetPress Suite Workflow Tools' log file. You can use any variables available in PlanetPress Workflow to customize the message.
- Store the message in variable: Select in which jobinfo, local or global variable you want to store the message content.
- ID: Enter an error ID. This ID will be visible in the Windows Event Viewer. However, the ID is not visible in the PlanetPress Suite Workflow Tools' log file.
- Store the ID in variable: Select in which jobinfo, local or global variable you want to store the error ID.
- Reset to defaults: Resets all options in this tab to their default values.
If storing the message or ID, if they are store in a jobinfo they will be available in any error handling process where errors are being forwarded. In all cases, if your process continues after the error, the contents of the variables selected in this window will be available for the rest of your process, or whenever they are overwritten.
Common Errors
Though some error messages are specific to a task in particular, others may apply to any and all tasks because they are related more to the system than to PlanetPress itself. Some examples would be W3813, W3830, W3991, W4005. These correspond to issues such as not having any space to write files, permission errors on folders or files, etc.
Comments Tab
The Comments tab, added in PlanetPress Suite 7.5, is common to all tasks. It contains a single text area (Task comments) that lets you write comments about the task. These comments are saved when the dialog is closed with the OK button, and are displayed in The Task Comments Pane.