Extract Record Processing
For an extract batch process, the Process Records algorithms are responsible for returning the data that should be written to the file in one or more XML instances along with the schema name(s) that describes the XML instance(s). The program will write the data to the file as per the format indicated in the File Format batch parameter. By default the service uses the OUAF format for date and time. To override this and use XSD format, configure the Date Time Format batch parameter to 'XSD''.
If an existing schema satisfies the output requirements, it may be used. Otherwise, you should define a data area to indicate the output format of the records as appropriate.
There are two options for designing and configuring an extract process using a plug-in driven background process:
Create a Process Records algorithm type that encapsulates the extract logic. The product provides a base algorithm type that illustrates the technique to follow. Refer to the algorithm type General Process - Sample Process Record Extract (F1-GENPROCEX) for more information.
Create a file integration type that defines the records to be included in the extract and configure a plug-in driven batch control that references that integration type. The following sections provide more information about implementing this type of functionality.
File Integration Type Configuration
Your organization may have many types of extract file integrations. Some can be simple, containing a single record type and possibly a header or footer record. Others can be more complex, involving multiple record types and parent/child relationships between the records.
The framework supplies two objects that work together to define the processing needed to create a specific type of extract:
The file integration type which describes and classifies the extract configuration.
The file integration record where the sequence, format and logic to extract the data required for a given record type are captured.
File Integration Type
The file integration type defines the integration classification. Currently, only Extract is supported. In addition, the file integration type can be assigned to a category. The category may be used to identify extracts with a common purpose or target such as collection agency referrals. Your edge product may deliver a number of categories or you may define your own.
The system provides a business object for extract file integration types ( F1-ExtractFileIntegrationType ) that is expected to be used for most use cases
File Integration Record
The file integration record is the object that is responsible for defining a record’s format and capturing the record details. A separate integration record must be defined for each record type included in the extract.
The record sequence defines the order that records are processed by the system. The parent sequence defines the record type of which this record is a child. Child records may also be referenced as a parent of lower level child records. The base Process Records algorithm provided by the framework processes all child records of a record type before processing the next record type in sequence.
For extracts that are XML format, the system supports creating a grouping node surrounding all the output that belongs to the same entity. File integration records define a record XML node that will be used as the grouping node. Each record type in the list that belongs within the same group would indicate the same value in the record XML node. Refer to the Grouping by Record XML Node section for more details.
Note:
The system does not support nested record XML nodes. All child records of a record type must define the same record XML node as the parent.
Each file integration record references a data area that defines the extract record’s format, allowing the data to be extended. The Extract Records algorithms are responsible for populating the data area. The file integration record supports multiple extract processing algorithms so that the custom information can also be populated.
The system provides a business object for extract file integration records ( F1-ExtractFileIntegrationRec ) that is expected to be used for most extract record use cases.
Configuring an Extract Process Using File Integration Type
The following points summarize the additional steps needed to implement a new extract background process that uses a file integration type to define the specific functionality:
Choose or create data area objects to define the extract record formats.
Define the logic required to populate each extract record type. Your edge product may deliver suitable plug-ins or you may need to create a plug-in script where the algorithm entity is File Integration Record - Extract Record. Note that the Extract Record plug-in receives most of the information defined in the Batch Control - Process Records plug-in.
Define the algorithm type and algorithm for each newly created script.
Choose or create a category for the file integration type using lookup FILE_​INT_​OBJ_​FLG.
Create the file integration type and configure the file integration records using the defined data areas and algorithms.
Create a batch control by duplicating the appropriate base template for an extract background process. Include the File Integration Type parameter on the batch control and reference the appropriate file integration type.
Plug in a Process Records algorithm that reads the file integration type configuration and processes the record types. The system provides a base file integration record extraction algorithm (F1-FILEX-PR) that is expected to be used for most file integration plug-in extract processes.
Extending a File Integration Extract Process
Your edge product may deliver file integration types and batch controls designed for standard extract processes. However, extending the delivered extracts to add custom data is common practice for most implementations. You can customize the output from a delivered extract by:
Identifying the record types that need additional details
Creating a data area that defines the additional details and using that to extend the data area configured on the record type
Creating a File Integration Record — Extract Record plug-in script, algorithm type and algorithm that populates the extra details
Adding the algorithm to the integration record’s extract algorithms collection
In some cases, you may wish to extend the extract by adding additional record types. To do this, add your custom file integration records to the file integration type, following the steps described in Configuring an Extract Process Using File Integration Type.
Grouping by Record XML Node
When configuring an extract process that should produce the output in XML format, your Process Record plug-in may return multiple schemas with information that is all part of the same overall record. For example, the output could include account information and related service agreement details:
<account type="group"
    <accountId>1234567890</accountId>
    ...
</account>
<sa type="group"
    <saId>123457665</saId>
    ...
</sa>
<sa type="group"
    <saId>1234588913</saId>
    ...
</sa>
In this case, it may be desired to wrap all that information in a grouping XML tag so that all the information for one record is grouped together. Because the Process Record plug-in could be returning header or footer records that are not part of a given selected record's extract information, the batch process doesn't know what schemas returned by the Process Record plug-in belong together logically. The output parameter 'record XML node' in the schema collection should be used to indicate the outer XML node to use to group related information together. For example:
<SchemaInstance>
<recordXMLNode>record</recordXMLNode>
<schemaName>CM-AccountRecord</schemaName>
<schemaType>F1DA</schemaType>
<data><account><accountId>1234567890</accountId>...</data>
</SchemaInstance>
<SchemaInstance>
<recordXMLNode>record</recordXMLNode>
<schemaName>CM-SAInfo</schemaName>
<schemaType>F1DA</schemaType>
<data><sa><saId>123457665</saId>... </data>
</SchemaInstance>
<SchemaInstance>
<recordXMLNode>record</recordXMLNode>
<schemaName>CM-SAInfo</schemaName>
<schemaType>F1DA</schemaType>
<data><sa><saId>1234588913</saId>... </data>
</SchemaInstance>
All schemas returned from a single call to the Process Record plug-in that have the same record XML node will be grouped in the written output within that XML tag, as per the example below:
<root>
<record>
<account>
    <accountId>1234567890</accountId>
    ...
</account>
<sa>
    <saId>123457665</saId>
    ...
</sa>
<sa>
    <saId>1234588913</saId>
    ...
</sa>
</record>
<record>
<account>
    <accountId>987654320</accountId>
    ...
</account>
<sa>
    ...
</sa>
</record>
</root>
Skipping Records
By default, the extract process expects one or more schemas to be returned by each call to the Process Record plug-in. (Ideally when designing any process, the Select Records algorithm only selects records that should be processed and the Process Record algorithm does not need to confirm whether the record should be part of the processing or not.) If however there is a need to check a condition in the Process Record plug-in and it is found that no data needs to be extracted for this record, the process record algorithm should return the 'is skipped' output parameter to true so that the program doesn't write an empty row. This parameter is not applicable to the Adhoc Process batch program. In that case, the Process Record can simply not perform any action. No information needs to be returned to the program.
Note that the base process records algorithm for file integration types (F1-FILEX-PR) will set the ‘is skipped’ parameter to true if the file integration record extract record algorithm returns no data.