EBIFour.com > Training > Clarify QRGs > Capturing Inbound EDI Filenames

Capturing Inbound EDI Filenames

20th February 2020

Background

In Cleo Clarify preserving the source filename can be easy and can be challenging at times.  With Non-EDI files it is simply done with an Event and File Monitor.  However, inbound EDI files are much more complicated.  

In the steps below we will walk the Cleo Clarify user thru the set-up to capture/preserve the source filename for inbound EDI files.

Setup – Create Postgre DataSource

In Cleo Clarify create a Data Source.

The Data Source will attach to the SQL Access Object we will create (below).

Once the Data Source Object is created, you will need to browse for the JDBC Driver. If you don`t have one already you can download one from the internet (“postgresql-42.2.1.jar” is a working one. Make sure the driver is compatible with Java 7)


Note: Replace localhost with the IP or Server name of the Cleo Clarify Server.

Cleo Clarify Data Source set-up for Postgre

Setup – SQL Access

Once the Clarify Data Source is created, we will create the Clarify SQL Access (below).

One input and one output parameter will be needed.

SQL STATEMENT

SELECT “VALUE” FROM “EBI”.“LOG_PROPERTY_VALUE” V

WHERE V.“NAME” = ‘filename’ AND V.“LOG_ID” = (SELECT “LOG_ID” FROM “EBI”.“RELATED_LOG” R WHERE (R.“RELATED_LOG_ID” = ${input} AND R.“RELATED_LOG_TYPE” = 50331651 AND R.“LOG_TYPE” = 50331653))

cleo Clarify SQL Access for LOG PROPERTY GROUP

Setup – File Write Adapter

In this example/scenario, the filename will be passed to a File Write Adapter, from the BPS, and used as the filename.

Cleo Clarify Write Adapter Editor

Setup – Business Process (¼): Execute Transformation

Next in Clarify, we will add the (below) tasks. This task will added when we want to capture the filename . This instance it will be the InboundEdiRouteTemplate Business Process.

On the ExecuteTransformation/Ruleset task, we will add a StorageNode variable to the Target Context parameter (below).

Cleo Clarify Business Process for Write Transformation

Setup – Business Process (2/4): Get Context Point Value

We will apply the task GetContextPointValue to retrieve the env.var.Log_of_Interchange_Id value from the Target Context (StorageNode) of the ruleset (below).

Cleo Clarify Business Process for Get Context Point value

Setup – Business Process (¾): SQL Access

Next, add the SQL Access object created earlier. The input will be the env.var.Log_of_Interchange_Id and the result will be the filename (below).

Cleo Clarify Business Process for SQL Access task

Setup – Business Process (4/4): File Adapter

Lastly, the File Write Adapter is added.  This task will take the target ruleset data and write it out with the source data’s filename (below).

Cleo Clarify Business Process with File Adapter


By: on