Search

Send CSV File to Infor & Convert to BOD

Overview

You have an on-premise system that generates data, and you need to periodically interface that data with an Infor CloudSuite. The challenge is that the on-premise system only outputs data in CSV (comma-separated value) format.

It is a simple CSV file with 5 fields that represent (ID, FirstName, SecondName, Age, and City) as described below.

There are network security rules that prevent the on-premise system from exposing its data to the public internet.


Requirements

  • Access to an Infor Cloudsuite
  • User privileges to ION
    • Security role: IONDeskAdmin
  • Access to install Enterprise Connector locally
  • Optional classes on Infor U:
    • Infor OS: Foundation for Multi-Tenant – Part 1
    • Infor OS: Foundation for Multi-Tenant – Part 2
    • Infor OS: Configuring ION Connect

Tutorial

Difficulty: Medium
Estimated completion time: 45 Minutes

Review the following video to familiarize yourself with BODs or Business Object Documents in Infor OS.

Because the on-premise system cannot be exposed to the internet we need to solve this first. We will use the Enterprise Connector to build a secure bridge from on-premise to the Infor Cloud.

1. Install Enterprise Connector

Proceed to install and configure the Enterprise Connector as documented in the Infor ION User Guide (Cloud) guide.

NOTE: Since the Enterprise Connector is installed on-premise it can access the CSV file.

2. Configure ION to understand the CSV file layout

Login to Infor OS Portal. After you have logged in, click the ION tab or select the ION security card located on the main page.

Click the Menu icon then expand the Connect option, click the File Templates item, and click the (+) Add option.

NOTE: This page is composed of the configuration part on the left and 2 tabs on the right (Settings, Fields).

In the configuration section, you’ll need to specify a Name for the file template and have the option to include a Description. You also need to define the File Type (text or binary), File Encoding (such as UTF-8 or ISO8859-1), and the Format Type (Delimited, Fixed-Length, Fixed-Length & Delimited, Full BOD, or XML).

For further information on the meaning of these settings, please consult the File Template properties documentation.

In the Settings tab, you have to provide the BOD name in the Document field, the field separator, and the line separator of your file. There is another property named Generated document that can be (single, or multiple).

In this example we are using the following Settings values:

  • Document – CSV_Person
  • Field Separator – Comma
  • Line Separator – \r\n
  • Generated document – Single

NOTE: Single means that you have one BOD for each line, and Multiple means that you have one BOD for each line of the file.

In the Fields tab, Click the (+) button to define the structure of the BOD giving the name for the XML TAG. Notice that the FieldName can be optional, this means that in the file you can skip the value for the fields you have selected as optional. Click Save.

After saving the configuration the GENERATED METADATA option will be available and will click on that to create the custom BOD.

Create a CSV document file with the Field information you configured above, supply Header and Detailed information.

Save the file in a CSV format (DocumentID.csv).

Click the GENERATE METDATA button.

Click the UPLOAD button.

Click on the browse folder icon, select the DocumentID.csv file you just created. Click Ok.

Sample File Content will be displayed, click Ok.

Expand the CVS_Person folder and change the Field Names to the correct values, click on the ID field and click Ok.

You should get a “Document metadata generation is successful” message, click Ok.

At this stage, we have generated the custom BOD that can receive the CSV file using the File template.

Let’s test, reading a CSV file and checking the BOD.

To do this we need to create 2 Connection Points of type File Connection Point and one Document Flow that uses them for the integration.

3. Create Connection Points

Let’s start with the creation of the file connector connection point.

From the ION page, expand Connect and click on the Connection Points option. Click the (+) Add dotted box.

From the drop down list, select the File option.

On the File Connection Point (through Enterprise Connector) page, we have the left side where we have to provide the Name and Description of the connection point, plus we have to select the Location we want to use to read the file.

NOTE: The location is the name that identifies the Enterprise Connector you have installed locally on your server.

On the right side of the page, we have 2 tabs, one for the Connection details and one for the Document details.

Again for a complete list of details and meaning, please refer to the Infor ION Technology Connectors Administration Guide (Cloud) documentation.

For our goal, we use a Shared Folder and we enter the Host Name where we have installed the Enterprise Connector, plus the User Name and Password.

Click the TEST button to check the connectivity and if everything is okay, we get back Test Succeeded. Click Ok.

In the Documents tab, we have to create 2 scenarios.

  1. read CSV file
  2. write BOD

Let’s start creating the Read Scenario.

Clicked the (+) button the Read Scenario is selected by default. 

From the File Format Template dropbox, select the file template you created in the previous steps (CSV2BOD).

The Document Noun value is filled automatically, from the dropbox select the Document Verb as Sync.

Flag the Create non-existing folder(s) option.

Let’s create now the Write Scenario.

Click the (+) button again, this time select the Write Scenario.

Instead of selecting the File Format template, we now select the Document option, click on the lens, and select Sync.CSV_Person.

Click the TEST button to confirm the details and then click the Save button. The file connection point has been created.

4. Create Document Flow

Now let’s create the Document Flow that will use this connection point.

From ION now select the Data Flows option on the left.

Click the (+ Add) option in the main window and select Document Flow.

Drag and drop 2 File connectors into the canvas.

Select each File Connector and in the Name field, rename the File Connector (as shown below). In the File Activity Properties section, from the File Connector dropbox select the connection point created above (CSV2BOD).

read csv File Connector:

write BOD File Connector:

Click the Page icon between the two connectors and add the CSV_Person document, click Ok.

Give the Document Flow a name in the Name field, click Save.

5. Prepare the file to be used

Before activating the Document Flow, let’s put the file in the folder that the file connection point has to read from.

Check on OneView, we don’t have any files being sent yet. 

Once we activate the document flow. The CSV file will be read and moved to the archive folder. In the write folder, we should receive the XML file that is the BOD.

Also in the OneView, we should see one BOD arrived.

6. Activate the document flow

Let’s Activate the Document Flow and check the folders and OneView.

In OneView we can see the timeline of the document flow.

Double-click on the Document icon on the timeline and you can see the BOD content that is the same as the file written in the local folder.

NOTE: If you pay attention to the BOD structure you can realize that the BOD contains the 3 lines of the file in one BOD. This is because we have defined in the file template the generated document as Single.

If we change this setting from Single to Multiple and re-run the document flow, we have now 3 separate BODs, each one for each line.

and each BOD has only one line of the file.

So far we have seen how to convert a CSV file into a custom BOD, but what about if we want to use it in a real scenario? To do that we need to map the custom BOD to a standard BOD and use it in an Infor application or 3rd party application.

7. Map the custom BOD to a standard BOD

From the ION page select Connect –> Mappings, click the (+) Add tile, and select Graphical Mapping.

Give it a Name (csv_2_person). Select the source and target text box :

  • Source: Sync.CSV_Person
  • Target: Process.Person

Drag and drop from the Custom BOD (on the left) the tags corresponding to the Standard BOD (on the right).

Test and Preview format.

Let’s use it in a Document Flow. Open the Document Flow you created (CSV2BOD), remove the second File Connector (write BOD) and add a Mapping Component after the first File Connector (read csv). In the Mapping field of the the Mapping Connector select the script we created (csv_2_person). Add an Application Connector and for the Application Connector select one Application that has the Process.Person BOD in the list of documents. Click Save on the document flow and Activate.

Downloads

Resources