1.1 Using Enrichers in File Uploads

(For custom defined templates only, not required for out of box templates)

  • Enrichers are used to enrich or fetch a value for a given field. Let’s say the field is Debit Account Id and enricher is Account Currency, so it means that the currency for that debit account Id needs to be fetched or enriched.
  • Enricher can have enricher arguments. These arguments are passed when the enricher is invoked.
  • Enrichers are of 2 types
    • Upload File Enrichers
    • Static arguments (enricherArgs) – Value is passed directly from template to enricher as label string
    • Dynamic arguments (enricherDynArgs) – Value is derived from a previous field of the record
  • Extract (Response) File Enrichers

How Enrichers are used in File Upload ?

  • In File Upload XML template, the field which will enrich other fields must have ‘enricher’ attribute. This attribute must not be specified for the fields which would be enriched.
  • The value of this enricher attribute is the ENRICHMENT_ID. To configure a new enricher we have to add an entry of the fully-qualified name of the new enricher in METAINF\services\ com.ofss.digx.framework.fileupload.enrichment.IEnrichment file. Currently OBDX support only Java enrichers.
  • Enrichers can be in any package but must implement the IEnrichment’ interface and should be annotated with @Enricher(value = " {ENRICHMENT_ID}"), where ENRICHMENT_ID is the id of the enricher used in template. Custom enrichers should also be annotated with @Custom. Custom enricher with the same ENRICHMENT_ID as of base will override the base enricher.

    Example

  • Refer to the following figure of File Template : InternalFT.xml .

Static Enrichers

  • In above template, the field name debitAccountId has a enricher ACCTCURR with no enricherArgs. ACCTCURR’ enrichment id would be looked for and AccountCurrencyEnricher class is invoked.

    This enricher derives the debitAccountCurr. Hence this attribute must be present in the record DTO with its setters defined.





  • The field name valueDate has static enricherArgs dd-MM-yyyy meaning that the date has to be specifically in dd-MM-yyyy format. This value is simply available to the enricher for processing purpose. This enricher does not add any new field but simply modifies the value of the current field.

Dynamic Enrichers

If enricherDynArgs is specified,

Example. enricherDynArgs=”beneId~beneName” on beneficiary address field, the parser simply invokes getters on beneId and beneName fields and passes the values to the enricher in a map. It should be noted that these fields must be defined previously/above the beneficiary address field, so that parser has already completed the setter operation.

<Field name="beneId"/>           
<Field name=" beneName"/>         
<Field name="beneAddr" enricher="ADDRESSENRICHER" enricherDynArgs=" beneId~beneName "/>

Eg. Extract (Response) File Enrichers



Enrichers can be added to response file templates. The enricher class is invoked in the same way as upload templates. Example, in above case, localized error message need to be added to extracts from errCode. Extract enrichers do not support dynamic arguments

File Copy Configuration

In case of OBPM as host, for file level uploads in OBDX, the files are generated in PAIN001001/PAIN001001 formats after approval at OBDX end is complete. These files are stored in a directory on OBDX server. For record level, service is used same as of single screen transactions.

Configs

  1. Copying the file to host system

    File is copied via REST service to OBPM

  2. Debtor BIC FI Configuration
    1. Provision to set Debtor BIC has been provided at entity level.
    2. The same can be configured in the following path by System Administrator user:
      1. Toggle menu → Configuration → System Configuration → Click on Continue → Select Entity → Dynamic Module Tab → File Upload