Input Data Extension
Input extensions can be used to extend context on a method. An input extension is always configured on a method and executed before the main method. The input extension returns output which can be used as input on the main method and/or the next input/output extensions (if any). Input extensions are mainly used when you want to read extra context from another system.
E.g. when we know the user account, but the external application uses a verification code that exists in the Active Directory, we can create a method to get the user from the Active Directory and fetch the verification code to enrich the data the Business Connector sends to the external application.
Extensions can be configured not only to run in sequence but also parallel. This can help to speed up execution or run one extension before another to avoid conflicts.
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.
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 'transaction'. 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 input extensions is as follows:
- The context records are passed to the input extension method. If the main method is executed with 5 context records, so is the input extension(s).
- The records retrieved from the input extension for one context record, is only 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 input are only the NameID
and Amount
for each context record. Using an input extension, the FirstName
and LastName
are fetched before executing the main method.
Because there is no field relation defined for NameID
on the extension, the first record retrieved from each input extension respectively is used and appended to the context record input. Fields that aren't returned by the input extension (Amount
in this example) are kept without change. All data from the matching record in the input extension, will override the input on the main method for that context record.