There are a various options available to specify conditions for whether a method should be executed or not :
This may be used to call a procedure only once during an execution.
The OUT-parameters from this procedure may be parsed to methods on the list.
Look here>> for info about parsing
variables.
You may also preset procedures to be executed only when key-values on the selected
data change.
For all SELECT-lists, Data Migration adds a virtual column named NEW_MASTER.
This column holds the value TRUE or FALSE depending on the values of the KEY-columns.
This is useful if your dataset is a Master/Detail selection, f.ex. Customer Order
and Customer Order Line,
or as shown here, when we use a procedure to lookup multiple data-items.
Set up the job as follows :
From the method list, you may also define conditions based on values of mapped columns under Source Mapping.
Column Value | Condition |
---|---|
specific value (as below) | mapped column = Column Value |
wildcard combinations (A%, B%100) | mapped column LIKE Column Value |
wildcard % | mapped column IS NOT NULL |
no Column Value | mapped column IS NULL |
Under Source Mapping, you may also add your own columns, giving them values from
a SQL expression.
In the example below we want the method to be executed when Prime Commodity has
certain values.
Sometimes, we want to insert new rows only, and not modify existing rows, or visa versa; only perform updates but no inserts.
To check whether a record exists or not, we may include a GET-function on a
mandatory column in the selection. The result will be NULL if the record does
not exist.
Below you see the mapping + the 2 alternatives we can have in Method List
As we save return-values for each method (attr-strings, OUT-parameters or function-results), we can also use these values to decide if a method should be executed or not. We use same notation as when mapping Fixed Values in Method List Attributes :
The result from the function executed in Seq 20 is stored in memory. We can use the @-notation to address this variable and check its value.
In this case, we have a situation were we try to release a Customer Order by using standard functionality from the Order Flow Process. Method 10 does not raise an error even if the release action fails. We have to check the status of the order in method 20, and call Error_SYS in method 30 to make our own error-message.