Multiple levels of functional maps

Functional maps can have multiple levels of subsequent functional maps.

For example, you can use two levels of functional maps with an input of multiple purchase orders that must output multiple invoices. In this case, there is a one-to-one relationship between an input purchase order (PO) and an output invoice, which indicates the need for a functional map that can generate one output invoice for each input PO.

  • The BatchMap executable map maps the entire input of multiple POs to the output set of invoices.
  • BatchMap calls the POToInvoice map, which maps each PO to one invoice.

    The POToInvoice map can be used as a functional map.

  • POToInvoice calls the functional map ItemMap.
  • The ItemMap functional map maps each specified item of data.

    The type trees used in POToInvoice must be the same trees used in BatchMap.

In BatchMap, the map rule on the Invoice(s) output data object references the map POToInvoice. The input argument of POToInvoice is PO:POBatch. This ensures that one invoice is generated for each PO.

Although this example only uses two levels, the number of levels of functional maps you can use within a functional map is unlimited.