Function Collections
A function collection is a library of reusable subroutines for mapping data. A function collection contains one or more SubFunctions. SubFunctions execute a mapping that you can reuse as a subroutine. You can add and connect SubFunctions in mappings just like other mapper functions.
You can reference SubFunctions from multiple projects and share function collections across a team. Function collections are defined in .xmp files under your home folder.
This chapter contains procedures to manage function collections in the tree pane and design SubFunctions in a mapping window. Start with the basic procedure below to create a SubFunction and use the SubFunction in a mapping.
Creating a SubFunction in a New Function Collection
You can create a new SubFunction when you create a new function collection by clicking
from the toolbar in the tree pane.
Creating a SubFunction
To create a SubFunction, you define the SubFunction's inputs and outputs and design the mapping that the SubFunction executes. See Creating a SubFunction for a guide.
Adding a SubFunction
To add a SubFunction to a mapping, you can drag and drop a SubFunction from the tree pane into the mapping area. You can then link the SubFunction's inputs and outputs. See Connecting SubFunctions for graphical workflows.
Other Tasks
You can also simulate the mapping that a SubFunction executes and use the backup functionality to compare or revert to a previous version. See below to get started and find links to procedures.
Simulating SubFunctions
You can use the mapping simulator in a mapping window to simulate the execution of a SubFunction. In the mapping simulator, you can provide test values and inspect the results. You can open the simulator from the mapping window's toolbar. See Simulating Mappings for guides to using the mapping simulator.
Creating and Using Backups
You can create backups for function collections, just like with project backups. You can compare the current version to an old version and check for changes. Or, revert to an earlier version.