Restructure limitations

If you use the data directly from the input document, data is read from the input document to memory by the "automatic mapping". This means, you cannot modify the input data before it is restructured, neither apply logic on it in any other way. After the restructuring, you can modify the data in the mapping. But if you need to do modify the input data before it is restructured, use Collector functions.

These are the examples where to use Collector functions:

  • To substring a value so that all values have the same length to enable correct sorting and grouping, or if you need to group on only a part of the values.

    For example, to sort and group on the date part of an element that contains date plus time.

  • To use the instance with a specific attribute value for a repeating data element that is not looped in the restructuring process.

    For example, to always use the main ID, or the English description.

  • To sort the value for either element A, or element B, depending on the value of another element.

    Then, you can create mapping logic that assigns either element A, or element B, to an input parameter for a Collector function.

  • To sort the values from two input elements, that are included within a choice, as one value. That is, only one of the elements can exist at a time.

    Then, you can create mapping logic that assigns the element that is not null to an input parameter for a Collector function.

  • To convert a negative amount to a positive amount for correct summing.

  • To filter out data.

    For example, to skip all transactions with a negative amount.

The current version does not support restructuring of parallel repeating elements or loops in the input document or in the Collector structure. It is not possible to restructure, for example, a repeating element for notes plus a repeating element for payment transactions, both per credit transfer payment, even if you only want to move the notes loop to the output document as it is. Support for this will be added in a future version.

Follow these guidelines:

  • When you use data directly from the input document all loop levels must be given in the input document instance.

    For example, if the complex element PaymentTransaction is not given for a CreditTransferPayment instance, the CreditTransferPayment instance will not be included in the restructured data.

  • When you use data from a nested Collector loop structure the inner loop must always iterate at least once.