Skip to main content
Skip table of contents

Usage of Write-Trigger

Write trippers are used to tell the mapping runtime that a data record is complete and can be either written or closed. Depending on the module structure, it offers no or several write triggers.

Here is a special feature of the task framework: modules can register their own tasks: Module specific tasks are offered in a group within the task dialog. Under this group, the tasks are displayed in a sub-group under the module name.

In this example a source element that displays the end of an EDIFACT segment group is dragged into the source area. This end specifies that the data is complete and complete a data record within DB. The goal is to write the data record into the corresponding table. Here the end of a posi-tion segment group is selected that prompts that writing of a position data record into the database.

The target module must receive a corresponding command so that the data record is written into DB.
As seen in, it is possible to assign a source field without a corresponding target field.

The trigger of the DB write module was selected in the task dialog and added to the list of tasks for this mapping. Selecting the task dis-plays the parameters that must be configured.
In the table's ID is selected that the trigger applies to. These table ID's are automatically assigned during the mapping. ID's can be viewed in the view that displays module specific information (header view).

The finished mapping with a write trigger looks as follows:

Implicit write trigger instead of tasks in the DB module

Along with task based write triggers there are also implied write triggers. In this case no task is used, but the target element represents the data record's end in the table of the DB module. If the mapping is called up, the target module (e.g. DB2) knows that the buffered data for the table can now be written.
 

Write Triggers of Modules other than DB (Close-Trigger)

Other module can also have a form of Write-Triggers. Because write triggers characterize the end of complete data record, they can be used with the EDIFACT and FLATFILE modules.

Here they are used to complete a defined information unit, e.g. represented in EDIFACT by a segment or segment group. A corresponding write trigger or Close-trigger is provided by the special element (e.g. for EDIFACT and FLATFILE by S-END, SG-END) that corresponds to an implied write trigger of the DB module.

Close-Trigger prevents these information units (e.g. segment groups or segment) from being filled. This way it can be determined when an information unit is complete and a new one should be opened.

Example:

One EDIFACT ORDERS should be created from header and position records of two database tables. Within ORDERS a position is represented by a group of segments.
Depending on how the data is present, it is possible that an empty data element of the EDIFACT group be filled with data of a new position, because the fields within the database of the previous position were empty (see auto occurrence).
To tell the EDIFACT module that no further data is available for this position, the source side's special field ROW-END in the position table is combined with the EDIFACT position group's special field SG-END. This way the EDIFACT module is told that the group should be closed. In-coming data in a new position will be placed in a new group.

General Visualization:

SEGEMENT4 (occurrence 1) was finished before the new data caused the creation of the new SEGMENT4 (occurrence 2). Not closing SEG-MENT4 (occurrence 1) would cause the value would be written into the empty field DE3 of SEGMENT4 (occurrence 1) because of the auto occur-rence mechanism (see AUTO-OCCURRENCE) for more information).
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.