Mapping with conditions and tasks
The following combines the conditions test with tasks and it expands the example to mapping of date fields from EDIFATCT DTM to DB. A possible problem could be that the date value of the DTM segment is not in the correct format for the database field. The goal is to convert the incoming value into the correct format before it is written into the target field. The task framework caries this kind and many other kinds of tasks.
EDIFACT has qualifiers that specify the existing date format. In this example the qualifier is transferred to data element 2379.
Step 1:
To guarantee correct conversion, we add a test to the condition by dragging the qualifier for date format over the existing condition field. Select New condition.
Step 2:
Double clicking on the field opens the condition dialog once again.
Step 3:
Selecting a new condition allows edition of the condition. Adjust the condition with the comparison value at 102:
Step 4:
Make sure that you link the conditions after you have saved and accept the conditions (without linking the unlinked condition is displayed in red). To link please click on the red value and select the link type.
Step 5:
The second condition indicates that the value of the data element 2379 must = "102", which means that the date value has the format: "CCYYMMDD" (ISO0).
Step 6:
Next, a new task is added for the connection. For this purpose please click with right click on the task pane and select new task.
Selecting this menu entry opens the task dialog.In this example a date conversion is created by using the convertDate-task from the group base and it's sub-group date. Double clicking with the mouse carries the task into the list of selected tasks for this connection.
Step 7:
Selecting, the convertDate-task from this list, displays the required parameters in the area edit parameters.
The default value of input as $CURRENT remains, because the source value (date) will be edited. Select the format of the input value (*ISO0) from the drop-down list. Then select the conversion's target format (*ISO). After that please click on OK. The task has now been taken over: