You have an on-premise system that produces data and you need to periodically interface that data to an Infor Cloudsuite. The on-premise system only outputs CSV (comma-separated value) data files.
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.
- Access to an Infor Cloudsuite
- User privileges to ION Desk
- Security role: IONDeskAdmin
- Access to install Enterprise Connector locally
- Optional classes on Campus.infor.com:
- Infor OS: Foundation for Multi-Tenant – Part 1
- Infor OS: Foundation for Multi-Tenant – Part 2
- Infor OS: Configuring ION Connect
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 this guide.
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 your Infor Cloudsuite. After you have logged in, click the ION DESK icon.
Click the menu icon then expand the Connect option and click the file template item, in the main page click the Add option
This page is composed of the configuration part on the left and 2 tabs on the right (settings, field).
In the configuration part, we need to provide a name for the file template, we can add also a description, and most important part we have to define the file type (text, binary), file encoding (UTF-8, ISO8859-1), and the format type (Delimited, Fixed-Length, Fixed Length & Delimited, Full BOD and XML). For more details on the meaning of these settings please refer to the official documentation.
In the settings tab, we have to provide the BOD name as Document,
the field separator, and the Line separator of our file. There is another property named Generated document that can be (single, or multiple).
Single means that we have one BOD for each file, and Multiple means that we have one BOD for each line of the file.
In the Fields tab, we have to define the structure of the BOD giving the name for the XML TAG. One thing to notice is that the FieldName could be optional, this means that in the file you can skip the value for the fields you selected as optional.
After saving the configuration the Generated Metadata option will be available and we have to click on that to create the custom BOD, selecting the DocumentID and providing an example template of the actual file.
You should get a “Document metadata generation is successful” message.
At this stage, we have generated the custom BOD that can receive the CSV file using the File template.
Now let’s make a test, reading a CSV file and checking the BOD.
3. Create Connection Points
Let’s start with the creation of the file connector connection point.
From the ION DESK page now we click on the connection point option and then in the +Add dotted box.
From the list, we select the option File
On this 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, 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 official documentation.
For our goal, we use a shared folder and we enter the hostname where we have installed the Enterprise Connector, plus the user and password.
Once done we click the test button to check the connectivity and if everything is okay we get back (OK).
In the document tab, we have to create 2 scenarios
Let’s start creating the read scenario.
After having clicked the ( + ) button the read scenario is selected by default.
From the file format template, dropbox selects the file template you have created in the previous steps (CSV2BOD).
The document nous is filled automatically, select the BOD verb as Sync.
Flag the create non-existing folder(s) option and complete the remaining text boxes as for the image below.
Let’s create now the write scenario.
Click again the ( + ) button and 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.
Complete the remaining text boxes for the image below and click the test button.
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 the ION DESK now select the Data Flow 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 one and from the file connector dropbox of the file activity properties, select the connection point created above (CSV2BOD).
Click now between the 2 connectors and add the document.
Give it a name and save the document flow.
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 in the One View 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 and in the write folder, we should receive the XML file that is the BOD.
Also in the One View, we should see one BOD arrived.
6. Activate the document flow
Let’s activate the flow and let’s check the folders and one view.
In one view 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 IONDesk select Connect –> Mappings, click the Add tile, and give it a name. Select the source and target text box :
- Source: Sync.CSV_Person
- Target: Process.Person
Drag and drop from the Custom BOD the tags corresponding to the standard BOD.
Let’s use it in a document flow. Open the created document flow above, add a mapping component after the first file connector, remove the second file connector and add an application connector. From the mapping connector select the script we created and from the application connector select one connection point that has the Process.Person BOD in the list of documents. Between the mapping and the application connector select Process.Person BOD. save the document flow and activate it.