Skip to main content
Skip table of contents

Document Comparison

This adapter compares a repository file with an input file and outputs a status value as process result.

Properties

Operation

Defines the operation executed by the function adapter

Possible values: Compare: Compare files with each other

Parameters

Adapter

Main adapter class (do not change!)

Possible values: de.softproject.integration.adapter.comparison.X4ComparisonAdapter: Main class (default)

comparisonMethod

Comparison method

Possible values:

  • BYTE: Compare files byte by byte (default)
  • ZIP: Compare ZIP files by their content
  • XML: Compare XML files by their content
  • TEXT:  Compare text files by their content
  • EMPTY: Compare input files with empty arrays of bytes
expectedResult

Path to the file to be compared with the adapter input; Relates to the comparison methods BYTEZIPXML and TEXT

Possible values: Repository path, e. g. X4Experience/BPM/1-Examples/InvoiceReceipt/BPM/Data/Invoice.xml (mandatory field)

ignoreWhitespace

Determines whether whitespaces will be considered while comparing file contents; Relates to the comparison methods XML and TEXT

Possible values:

  • true: Ignore whitespaces
  • false: Consider whitespaces (default)
normalizeWhitespace

Determines whether whitespaces in TEXT or XML document will be normalized; Relates to the comparison methods XML and TEXT 

Possible values:

  • true: Normalize whitespaces (default)
  • false: Do not normalize whitespaces
ignoreComments

Determines whether comments within the XML document are considered while comparing file contents; Relates to the comparison method XML

Possible values:

  • true: Ignore comments
  • false: Consider comments (default)
compareSimilar

Determines whether the order of tags within the XML document is considered while comparing file contents, e. g. if the XML document's content is the same but in another order; Relates to the comparison method XML

Possible values:

  • true: Ignore order
  • false: Consider order (default)
ignoreCDataAndTextDiff

Determines whether the content within the CDATA element will be interpreted as plain text content; Relates to the comparison method XML

Possible values:

  • true: Interpret the content of CDATA as plain text (default)
  • false: Do not interpret the content of CDATA as plain text

Input

The adapter expects as input any file, which is compared with a specified Repository file.

Output

The adapter outputs one of the following status values as process result:

1The compared documents are identical
0The compared documents are different
-1The documents could not be compared with each other, since the input was either empty, not well formed or false.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.