Skip to main content

Using User Functions in Integration Rules

The following steps provide the details on how to insert and connect a script to an Integration Rule.

  1. Open the Integration Rule to which you want to add the script.

    Ensure that there is an existing Dataset . It can be any kind of Dataset except for an SAO-PublisherDataset.

  2. Click on the Tree icon to expand the tree of selectable components.

  3. Select Tools and then Code.

  4. Drag & drop the Code component inside the graphical display area.

    Upon dropping the Code component, a code-box is added to the display area. Depending on the type of code, you can connect the code-box to other boxes inside the display area. Available code types are:

  5. Clone-Output: This code type supports both inbound and outbound connections, where the input and the output Dataset structure are exactly the same. Meaning, it receives input from a source Dataset and outputs the same Dataset structure.

  6. Custom-Output: This code type is basically the same as the Clone-Out, but usually the input and output Dataset structures are different.

  7. Input-Only: This code type only supports inbound connections; it has no output connection.

  8. Make the appropriate connections to/from the "code" box based on the code type.

    ClosedTo create an Inbound connection

  9. From the source Dataset with an output table, select a valid output column (it can be any other Dataset type, even another code-box with output).

  10. Drag & drop the output column over the center of the code-box.

    A new connection arrow from the source dataset to the code-box selected will be drawn.

    ClosedTo create an Outbound connection

    Note: This connection is only for those code-boxes with a valid output table.

  11. Select a valid output column.

  12. Drag & drop it over the destination Dataset.

    A new connection arrow from the code-box to the destination dataset where the drop action has been fired.

  13. When finished with the connection(s), click the Save icon.

ClosedEXAMPLE: Creating a "Clone-Output" Script

The following is the procedure you would use to create or edit a Clone-Output script.

  1. Open the Integration Rule to which you want to add the script.

  2. Connect the source Dataset to the graphical "code" box by dragging any column to the center of the "code" box.

  3. Move your mouse over the"code" box until the mouse pointer changes to a moving cross.

  4. Double click on the object.

    This action loads the script definition window.

  5. Click on the Tree icon.

  6. Select Tools and then Code.

  7. Drag & drop the Code item inside the graphical display area. Upon dropping, a code-box is added to the display area.

    Depending on the type of code, you can connect the code-box to other boxes inside the display area. Since this is a "Clone-Output" script, it support both inbound and outbound connections. Therefore, you would want to connect it to and inbound, outbound or both items in the display.

  8. Connect the code box to the inbound and outbound items.

  9. When finished, click the Save icon.