Processing Elements

A Processing Element comprises a Processing Group, which is the container for one or more Code Snippets listed under a Processing Tasks node.

If Library Snippets have been attached as a part of the settings of the data flow, a Library node list the functions that are accessible to the processing tasks.

To define a process, right-click on the Processing element in the Elements pane and select Add | New Processing Group.

Right-click on the New Group and select Add | New Code Snippet.

You can right-click on an element and select Rename to change the default name. A name that reflects the nature or purpose of the processing tasks in the group should be chosen.

Since we are inputting units, processing those units and then outputting them, all code snippets that you create will have the following end line:

return units;

In the example below, a FOR loop is used to iterate over the units. For each unit, its record needs to be retrieved from the underlying table. A good practice is to make sure that every unit has an Input Node.

If the input node is NULL (there are examples where units are created from scratch) then that unit is skipped. Otherwise, for the units that are processed, the code snippet continues to look up the parameters that will be used to write the Unit size.

The code snippet can be tested by hitting the Recalculate button at the top the Preview pane.

Preview

When a Process element is selected, the Preview pane shows the Before and After of any processing of the input source data.

In this example, when Alpha\Strip 1 or a sub-range of Alpha\Strip 1 is selected as the Group, we can see that the number 2 has been written to the Size attribute since this is part of a range that was defined as having an alternative size:

The preview for the other units (those that aren't in Alpha\Strip1) are assigned a Size value of 1.