Output Data Extension
When a method is executed, it generates output. This output can be enriched automatically with an Output Data Extension. E.g. when we have a list of orders in our application, but the customer information can be found in a different source, we can fetch the customer information from that source and merge it to the output from the first source.
Use the following steps to configure an Input Data Extension on a method:
- Go to the method you want to create the extension on.
- Click the Execution tab.
In case no extension is present, just click on the Add New Extension Sequence and a new extension is added alongside a new sequence group.
To add a new extension to a list of existing extensions, clicking on Add New Extension Sequence will add to extension in a new sequence group, clicking on Create Data Extension will add the data extension to the sequence group selected.
The first output extension sequence has an extra option Run Parallel With Main Method. When enabled, the main method execution is started in parallel with the first output extension sequence. This is beneficial in total method duration if the output extension is not reliant on the action of the main method. This option is enabled by default for new methods, methods created in older framework versions (< v5.0.0) will have it turned off.
Configuring The Data Extension
Settings
In this section you configure the general settings of the selected data extension.
Choose the object and method you want to use for the selected data extension.
Execution Context
This section is used to configure how the context is forwarded to the extension method.
Enable this to only forward context data contained in the fields you configure here. Other context set on other fields on the main method will be ignored and cannot be used in the extension method.
Extension Output Handling
In this section you configure what must be done with the output of the extension method.
Define which handling type you want to use when processing the data of the extension method.
Handling Type | Description |
---|---|
Extend Global Context | Extend the current global context of the main method which will then be used for the next data extension(s). Field relations cannot be used and only the first extension record will be used for extending the global context. |
Main Join | All main (context) records will be kept. Will match and extend the main (context) records with the extension records based on the defined field relations and mappings. Extension records without a match will be discarded. |
Inner Join | Only main & extension (context) records which have a match based on the relations will be kept and extended based on the mappings. Main (context) records & extension records without a match will be discarded. |
Extension Join | All extension records will be kept (can result in the creation of extra (context) records). Will match and extend the extension records with the main (context) records based on the defined field relations and mappings. Main (context) records without a match will be discarded. |
Outer Join | All main (context) records and extension records will be kept (can result in the creation of extra (context) records). Those records which match based on the relations will be extended based on the mappings. |
Important
When using the extension or outer join, you'll possibly return extension records without main record data. This could result in records without unique key values. Using such records in views and other parts of the framework can lead to unwanted behavior.
Handling Type Examples
In this section you get a visual representation of each handling type. Suppose you have the following result set where the relation is defined on the Class Id of both tables.
Main Join
Inner Join
Extension Join
Outer Join
Behavior with Context Records
Context records within the Ometa Framework allows a method to be executed multiple times in one 'request'. This can save processing time because there is no need to connect additional framework clients, or start additional interface processes. However, keep in mind that context records, including possible extensions, are currently executed sequentially on the target interface.
Currently context records are only used in:
- Synchronizations
- Sequential item functions
- Custom DLL's
The behavior when using context records with output extensions is as follows:
- The context records are passed to the output extension method. If the interface script of the main method is executed with 5 context records, so is/are the output extension(s).
- The records retrieved from the output extension for one context record, can only be used for that same context record in the main method.
Examples
See the table below for a few examples on how the data is mapped when using context records.
In this example the main method is called with 2 context records. The original output are only the NameID
and Amount
fields for each context record. No field relation is configured.
Output extensions do not map any data if there is no field relation. Configure a field relation to retrieve and map the output of the extension.