Constants in Project Tree
To assist in the creation of workflows, Clario supports the use of project-level constants. Defined constants may be referenced in any workflow in the project.
Constants dialog
In the Project Tree, click a project to bring up the popup menu and then click the constants item. A constants dialog will pop up, and will list constants (if any) currently in the project. To create a new constant, click the New Constant button in the upper right corner and fill in the Name, Type, and Value in the New Constant dialog.
New Constant popup
As an example, I could create a constant called Today, of the Date Type, with value 2011-08-04.
Example: Today constant
After you are finished entering the value and have clicked Save, you must click Save in the constants dialog to save this new constant. Clicking Cancel at this point will result in you losing any constant(s) you have just entered.
Click Save to finalize
To edit an existing constant, open the constants dialog in the Project Tree, and double-click a constant whose value you’d like to change. An Edit Constant popup will appear, allowing you to modify the Value and click Save, or to click Cancel to exit the editing process. Just as in the creation of constants, you must then click Save in the Constants dialog for the changes to go into effect. Clicking Cancel at this point will discard any change(s) made.
Edit Constant dialog
To delete an existing constant, open the Constants dialog in the Project Tree, and click once on the constant you’d like to delete, then click Delete or Backspace. To finalize this process, click Save. If you do not wish to save your changes, click Cancel.
Constants can be used in a variety of ways. For example, you can use constants to put a month identifier, e.g. ‘AUG’, on all Read File nodes / Write File nodes in a series of workflows that are run every month. In addition to Read File nodes and Write File nodes, you can also use constants in this fashion in all of the terminal nodes that have a Write File tab within the node configuration. These nodes include Factor, Create Indicators, and Reduce.
Constants can also be used inside the Transform and Filter nodes. One common use is to specify a constant value (such as an ‘As-Of’ date) that will be used in multiple calculations, across multiple attributes, and possibly across multiple workflows.
Constant in Read File
In this example, we add the month as a suffix for a readfile name using a constant. When the mouse is placed over a constant in this text field, the filename resolves to include the value of the constant.
Filename resolved
Constant in Write File
Just as with the Read File node, it can be extremely valuable to put a date or a month label on output files. Holding the mouse directly over the filename resolves the constants, and displays the full output filename.
Filename resolved
In the Transform node, project-level constants are available under the ‘cons’ tab. You can drag and drop them into the main work area just as you would any attribute, funcion, etc.
Constants in ‘cons’ tab
A user may have multiple attributes that are some transformation of a single constant value. Project-level constants are designed to make this process easier.
Constants in an Attribute Calculation
Just as in the Transform node, project-level constants are available under the ‘cons’ tab. You may use them just as you would any other attribute, function, etc.
Constants in the Filter logic
The Terminal nodes include the Reduce node, Create Indicators node, and the Factor node. Each of these terminal nodes contains an optional Write File tab in the node configuration, and Project-level constants can be used to fill out the filename.
Constants in the Reduce node config, Write File tab
Constants in Reduce node, Filename resolved