You can add as many functions as you want to a graph function.
The example in this section shows adding only a single function.
If you already have graph functions defined, you can treat them just like any other function in the cleanse libraries. This means that you can add a graph function inside another graph function. This approach allows you to reuse functions.
To add functions to a graph function:
Start the Cleanse Functions tool.
Acquire a write lock.
Click your graph function, and then click the Details tab to see the function represented in graphical format.
The area in this tab is referred to as the workspace. You might need to resize the window to see both the input and output on the workspace.
By default, graph functions have one input and one output that are of type string (gray circle). The function that you are defining might require more inputs and/or outputs and different data types.
Right-click on the workspace and choose
Add Function
from the pop-up menu.
For more on the other commands on this pop-up menu, see Workspace Commands. You can also add or delete these functions using the toolbar buttons.
The Cleanse Functions tool displays the Choose Function to Add dialog.
Expand the folder containing the function you want to add, select the function to add, and then click
OK
.
The functions that are available for you to add depend on your cleanse engine and its configuration. Therefore, the functions that you see might differ from the cleanse functions shown in the previous figure.
The Cleanse Functions tool displays the added function in your workspace.
Although this example shows a single graph function on the workspace, you can add multiple functions to a cleanse function.
To move a function, click it and drag it wherever you need it on the workspace.
Right-click on the function and choose
Expanded Mode
.
The expanded mode shows the labels for all available inputs and outputs for this function.
The color of the circle indicates the data type of the input or output. The data types must match. In the following example, for the Round function, the input is a Float value and the output is an Integer. Therefore, the Inputs and Outputs have been changed to reflect the corresponding data types.
Mouse-over the input connector, which is the little circle on the right side of the input box. It turns red when ready for use.
Click the node and draw a line to one of the function input nodes.
Draw a line from one of the function output nodes to the output box node.
Click the
Save
button to save your changes. To learn about testing your new function, see Testing Functions.