In this section:
When you connect one object to another, DataMigrator draws an arrow between them. These arrows, or connector objects, specify the logic that governs what is executed next in a process flow. The connection logic may be unconditional or conditional, represented graphically by colored arrows. Conditional logic is set by default. However, you can edit the connection to change the nature of the condition or to make it unconditional.
Note: When multiple conditional arrows are used, the first object where the condition is met is run.
The connections between the following objects are conditional by default. You can change the conditions or make them unconditional:
Follow these steps to edit a connection condition between a flow or a procedure and one of the following object types: a flow, a Parallel Group, a Procedure, or an Email.
For a single connection, OK is the default. For a second connection, FAILED is the default.
Type the code for the condition you want to apply. Typically, you use a global (&&) variable, DataMigrator variable, or statistical variable in your custom conditions to test specific conditions, return codes, or values based upon which branching will occur.
You can set a custom condition for a connection between objects in a process flow. In this case, a connection will become active if duplicate rows are rejected while a data flow is run. The number of duplicates will be included in an email that is sent if the condition is met.
Note: Your DataMigrator Server must be configured for email notification to complete this example. For details, see Configuring DataMigrator Server Operations.
The workspace should appear, as shown in the following image:
Right-click the connection arrow and click Edit Condition.
The Condition window opens.
The Edit Custom Focus Condition field becomes active.
(&DUPLS GT 0)
Note: Ensure the Data Flow that was added to the Process Flow has the Run as Stored Procedure properties setting enabled. This will maintain the continuous connection, and will enable the reference to the variables at run time.
The Properties pane opens.
&DUPLS rows rejected
This connection will become active if duplicate rows are rejected while a data flow is run, and an email notification will be sent with the number of duplicate rows.
To access the Condition dialog box shown in the following image, from the process flow workspace, double-click a connection arrow between objects, or right-click a connection arrow and click Edit Condition.
The Condition dialog box has the following fields and options:
Provides access to the following condition options:
Executes the connection if the prior object executed successfully.
Executes the connection if the prior object failed to execute.
Executes the connection regardless of the success or failure of the prior object. This option is only available when there is only one connection.
Allows you to set a custom condition for the connector.
The code for a custom condition. Enter a condition using FOCUS dialog manager that evaluates to true or false.
The ability to set connection logic enables you to create branches within a process flow. You simply connect multiple objects to the object from which you want the branching to begin.
The branching process flow shown in the following image is built in Exercise 2: Creating the Process Flow. It is strongly suggested that you complete these exercises in order to create the branches shown here. As you do so, you will become familiar with many aspects of data and process flow design in the DMC.
Note: You can also create branches using custom conditions. Note, however, that while you can use multiple custom conditions to specify different branches, you should not use custom conditions with OK and FAILED conditions.
When multiple conditional arrows are used, the first object where the condition is met is run.