Custom Interface Modules
All supported interface modules and processing modules have an expression of the type Custom. The path of the relevant class library file and the name of the class must be specified in the configuration of these modules. Depending on the type of module, the class must follow a specific interface definition that specifies which methods are to be implemented.
The interface definitions are available in the CustomModules.dll file in the XSuite.Interface.CustomModules.Interfaces namespace. The constructors of the classes are not part of these interface definitions. The constructors have certain parameters and a predefined signature, which are described in the following sections.
Notice
The customParams parameter corresponds to the .CustomParams[] property of the same name in the configuration of the respective module of type Custom. This parameter is used to define specific configuration values for the custom module in the configuration data of xSuite Interface. Technically, the parameter is a key/value pair, whereby only pure text values are supported. In order to interpret these text values as a different data type, a corresponding conversion must take place within your own module. Depending on the context, the parameters are passed either in the constructor or only in a document-related method call (e.g., if the parameters are generated dynamically from the field variables of the relevant document).
If a batch or document has already been read in, the object is usually passed to the methods as a parameter. The object is not always required for processing within the method, but redundant information is sometimes available in parameters such as outputFields and filteredAttachments. This information is filtered specifically to the fields or file attachments that are relevant for an output step according to the configuration. It should be noted that the binary data of file attachments is only contained in the specifically filtered, i.e. the actually relevant file attachments, but not in the other attachments of the document object. The ProcessDocument() method of an input format is an exception. This method usually creates completely new document objects and requires access to all file attachments.
Method | Description |
|---|---|
Konstruktor( IDictionary<string, string> customParams, ICustomLogger logger) | Transfers custom configuration parameters and a logging component. |
IList<string> GetNewBatchIds() | Returns a list of the external IDs of batches that are to be read in. The batches are then read in by successive calls of |
Batch ReadBatch( string externalId) | Using the external ID, reads in a batch object completely, including all documents and file attachments. |
void DeleteBatch( Batch batch) | Deletes the transferred batch in the input system during the backup. |
void BeforeReadBatch( string externalId) | Handler for executing actions before reading in the batch (e.g., setting the processing status in the input system) |
void AfterReadBatchSuccess( Batch batch) | Handler for executing actions directly after reading the batch (before further processing) |
void AfterProcessBatchFinished( Batch batch) | Handler for executing actions after complete and successful processing of the batch (e.g., setting the processing status in the input system) |
void AfterProcessBatchError( Batch batch) | Handler for executing actions after a processing error occurs in the batch (e.g., setting its processing status in the input system) |
Method | Description |
|---|---|
Konstruktor( IDictionary<string, string> customParams, ICustomLogger logger) | Transfers custom configuration parameters and a logging component. |
IList<Document> ProcessDocument( Document document, IList<Attachment> filteredAttachments) | Splits a document into document parts and/or reads/extracts additional file attachments of a document. The document that was originally transferred is replaced in the batch by the documents that the method returns as the return value. The file attachments that correspond to the |
Method | Description |
|---|---|
Konstruktor( IDictionary<string, string> customParams, ICustomLogger logger) | Transfers custom configuration parameters and a logging component. |
IList<Field> ReadIndex( Attachment attachment, IList<InputFieldDef> inputFieldDefs) | Reads in all index fields from the transferred file attachment that are defined as input fields The returned field values must correspond to the supported .NET data types or be convertible to them:
The configuration properties |
Method | Description |
|---|---|
Konstruktor( ICustomLogger logger) | Transfers a logging component. The custom configuration parameters are part of the |
StreamProcessDocument( IDictionary<string, string> customParams, Document document, IList<OutputField> outputFields, IList<Attachment> filteredAttachments) | Creates a new file attachment from the output fields defined in The program already evaluates the configuration properties |
Method | Description |
|---|---|
Konstruktor( ICustomLogger logger) | Transfers a logging component. The custom configuration parameters are part of the |
void ProcessDocument( IDictionary<string, string> customParams, Document document, IList<OutputField> outputFields, IList<Attachment> filteredAttachments) | Transfers the output fields defined in The program already evaluates the configuration properties |