4.2.2. Working with Links




A Link and its components

Figure 4.66. A Link and its components

The purpose of a link is to connect two nodes, representing a (potential) transfer from the origin node to the recipient node. The nature of the transfer depends upon the nodes being connected. In general, we can divide link into three categories:

Node connectors are similarly diveded into Process Flow connectors, Data Flow connectors, and Expression Components connectors. Process Flow links must originate and terminate in Process Flow connectors; Data Flow links must originate and terminate in Data Flow connectors; Expression Components links must originate in Data Flow connectors and must terminate in Expression Components connectors.

To add a Process Flow or a Data Flow link, you can proceed in two ways. First, you can do it graphically. For this you need to first move the mouse over the origin connector; the pointer should now be a single slanted arrow, and not the two double arrows that allow you to move a node. Then, you simply click the left mouse button. The origin connector should now change color to indicate that it has become active (yellow by default, but you can impose a different color in the Work Flow default properties (see Section 4.2.5, "Links properties")), and all the potential recipient connectors (i.e., all the connectors that can currently be connected to the origin node) will become green (again, you can change the color if you wish (see Section 4.2.5, "Links properties")). To create a link, you now need to simply move the mouse pointer over the desired recipient connector (which must be green) and click the left mouse button. The new link will now appear, and all the connectors will go back to their normal color.

If you wish to create links between one origin connector and several recipient connectors, you can accomplish this more quickly by keeping the Ctrl key pressed while selecting the recipient connectors. Also note that you are not forced to start from the origin connector: you can select the recipient connector first, and then all the potential origin connectors will be highlighted.

Note: If you click on a connector and it does not change color it means that that connector currently cannot support any link.

This technique for adding links is fast, but it has one important limit: if you insert a conditional link, you cannot provide the condition. This problem is solved by using the other technique for adding links: open the properties editor for either the origin or the recipient node. This is done by either double-clicking on one of the nodes, or by bringing up the node contextual menu, and selecting the Edit Node Properties item. Once the dialog appear, you can add, remove and configure links inside the Possible input nodes and Possible output nodes panels. The Possible input nodes panel contains a list of all the nodes that can act as origin nodes for links with the node. Conversely, the possible output nodes panel contains a list of the nodes that can act as recipient nodes for links with the node. When the properties dialog is closed with the OK button, links will exist with, and only with, all the possible input/output nodes for which the corresponding radio button or checkbox is selected. Possible nodes connecting to which requires further configuration, will display the text fields necessary to provide such additional information.

What we have said so far holds only for Process Flow or Data Flow links. Expression Component links cannot be added manually; they are added automatically by the system when the expression is provided.

Changing the appearance of links

The appearance of a link can be affected in several ways. You can change width, color, line style, and the algorithm used to determine the route between the origin and the recipient connector. All of these operations can be performed through the link graphic properties panel. To display this panel you need to select the link you wish to customize, and then select the Show/Hide Properties icon (the right-most icon on the Work Flow toolbar). If only the panel title is visible, just click on the triangle that precedes it, and the panel will appear.

The Link Graphic Properties Panel

Figure 4.67. The Link Graphic Properties Panel

The first control in the graphic properties panel allows you to select a color for the link. To select a color you need to click on the color preview button, and you can then use the color chooser to select the desired color (see Section C.1, "Color Chooser"). Besides the normal colors, you can also choose to pick the default color. If you pick the default color, the color actually used will depend on the default properties for the Work Flow (see Section 4.2.5, "Links properties"), where different default colors are assigned to the three types of links (process, data, and expression).

With the second control you can impose the width of the line, measured in pixels. The default value for the project is specified in Section 4.2.5, "Links properties".

Besides color and thickness, you can also decide whether the line should be solid or dashed (four different patterns can be used).

The final parameter you can change to affect the appearance of the link is the routing algorithm that is used to compute the route from the origin connector to the recipient connector. Here you can decide either to use direct connections (i.e., the shortest path), or you can select an algorithm that allows only horizontal and vertical route segments. There are actually three such algorithms you can choose from, depending on the level of sophistication you are interested in.

So far we have described how to change the appearance of a single link. Acting on a set of links is very similar. All you need to do is select the links you want to act on, and display the Link Graphic Properties panel. When multiple links are selected, each control for which the link values differ presents the text <Different values>. Every action on the controls will affect all the involved links.

Manually imposing the route for links: working with knots

The route traveled by a link on its way from the origin connector to the recipient connector is automatically determined by the routing algorithm applied to the link. However, you might find that in some situations none of the available algorithms generates a route you like. To solve this problem you can define some intermediate points that the route must go through. These intermediate points are called "knots", and show up as little squares along the link. The routing algorithm will then do the rest.

Adding and moving a knot

Figure 4.68. Adding and moving a knot

Moving a link segment

Figure 4.69. Moving a link segment

There are several ways for adding knots to a link. The simplest way consists in placing the mouse cursor over the link, clicking on the left mouse button, and start dragging the link around. If you placed the mouse close to a corner in the link, one knot will be automatically added at the corner point, and you'll move that knot around. If instead you placed the mouse in the middle of a link straight segment, two knots will be added at the segment ends, and you'll move the segment around. The minimum distance by which you can move a knot is determined by the coarseness of the grid, which is part of the settings for the Work Flow default properties (see Section 4.2.5, "General properties").

Tools for adding and removing knots from links

Figure 4.70. Tools for adding and removing knots from links

Alternatively, you can select the Add Knot tool from the toolbar, and then simply move the mouse pointer to the position along the link route where you want to add a knot; now press the left mouse button and the new knot will appear. If you want to add several knots, just keep the Ctrl key pressed while pressing the left mouse button. Then you can just move the mouse pointer over the new knot, click on it and drag it around.

Finally, you might decide that it is simpler to add knots at all corners currently made along the link route (i.e., you want to freeze the current route). You have two means of accomplishing this. First, you can select the Add Knots tool from the toolbar, and then simply move the mouse pointer over the link on which you want to add the knot; now press the left mouse button and the knots will appear. If you want to do this to several links, just keep the Ctrl key pressed while pressing the left mouse button. You can accomplish the same result by selecting the link(s) whose route you want to freeze, and clicking on the Add Knots to Selected Links button on the toolbar.

We have now seen how you can add knots to a link, thereby controlling its route. Quite naturally, when you'll start using this feature you'll find out that often you want to get rid of some of the knots you created. Again, you can use three different tools for accomplishing this. First, you can remove a single knot at a time by selecting the Remove Knot tool from the toolbar, moving the mouse pointer over the knot you want to remove, and clicking the left mouse button. If you want to do this to several knots, just keep the Ctrl key pressed while pressing the left mouse button. If instead you want to remove all the knots from a given link, select instead the the Remove Knots tool from the toolbar, move the mouse pointer over the link you want to clear, and click the left mouse button. If you want to do this to multiple links, just keep the Ctrl key pressed while pressing the left mouse button. Alternatively, select the link(s) you want to clear, and click on the Remove Knots from Selected Links button on the toolbar.

Note: You can decide whether to have knots visible at all times or only on selected links. You can set your preference through the general properties dialog (see Section 4.2.5, "Links properties").

Working with conditional links

Changing the condition label position from the toolbar

Figure 4.71. Changing the condition label position from the toolbar

We described above how some links, notably those that exit from application (i.e., Script, Matlab Script, or Excel Workbook) nodes or from a Switch Condition node, are said to be conditional. This is because they will be transversed if, and only if, the condition associated to them will hold true at run-time. Tipically, this condition is displayed alongside the link, and by default it is positioned half way between the origin and the recipient connector. If you do not like the position of the condition, you can change it. Just select the link(s) whose condition you want to move, and click on the Set Condition Label Position for Selected Links button on the toolbar. Then move the slider until you find the desired position. The checkbox next to the slider can be used to move the condition to the other side of the link.

Note: You can decide whether to have link conditions visible. You can set your preference through the Work Flow default properties dialog (see Section 4.2.5, "General properties").

Operations on Links

Canvas contestual menu

Figure 4.72. Canvas contestual menu

For removing a link or a set of selected links from the Work Flow, first you must select the interested links, then you can:

Finally, you can also remove a link by opening the properties dialog for either the origin or the recipient node, and by unselecting the checkbox associated with the link you want to remove. If you want to remove all the links connected to a given node, just invoke the contextual menu for the node, and select the Remove Links item.

Note: Expression links cannot be removed in this way. Only removing their origin or recipient node, or changing the expression to which they refer, will cause their removal.


Return to modeFRONTIER Index