In this blog, we will see how to read a file using Disk Connector.
CREATED BY: K Prathyusha
What is Disk Connector?
The Disk connector gets files from or send files to directories on the disk to which the Atom has access. The Disk connector can use a local path, Windows UNC path, or an NFS share on Unix. If you extend your network with a VPN (Virtual Private Network), you can directly access files on your trading partner’s network.
What can we do with this?
Use the Disk connector to read and write from the underlying file system of the host machine where the Atom is running.
In this use case
- We will learn how to get the file from local directory.
Now let’s see the steps to get the file.
Step 1: Log on to the Boomi platform (https://platform.boomi.com)with required credentials i.e. Email Address and Password.
Step 2: Once logged into the Boomi platform, we will be able to view the Home page.
Step 3: Now, click on Services followed by Integration.
We will see the Build page. Click on New.
Step 4: Once, click on New, we will be able to see three fields i.e. Type, Component Name, and Folder.
- Select Type as a process as we are building a process. Component Name and Folder can be given based on your choice ( i.e which name to be given and where do we want to create the process). Click on create.
Step 5: We see that the process gets created with a start shape which is configured with AS2 Shared Server by default. Select the No Data type and click on OK.
Step 6: Drag and drop Try/Catch shape onto the process canvas and configure it.
• There are 2 fields to configure i.e. Retry Count and Failure Trigger. Give display name
anything as it won’t make any impact on the process.
• Retry Count: It is a numeric value that defines the maximum number of times a failed document
will be retried through the main series of shapes AFTER the Try/Catch shape.
The Retry Count option pauses between retries.
▪ 0 = The document will not be retried.
▪ 1 = For the first time retry will occur immediately as soon as a document fails.
▪ 2 = For the second time, the system will for 10 seconds and then retry the document.
▪ 3 = For the third time, system will for 30 seconds and then retry the document
▪ 4 = For the fourth time, the system will for 60 seconds and then retry the document.
▪ 5 = For the fifth time, the system will for 120 seconds and then retry the document for one last
• Failure Trigger: Used to specify types of error.
There are two types of errors
▪ Document Error
▪ All Errors: Documents and Process error
Step 7: Drag and drop a Disk Connector on to the process canvas and configure it.
• 3 fields in connector i.e. Action, Connector and Operation.
• There are 2 actions i.e. Get and Send in Actions.
Get – To get the data from disk location.
Send – To send to the disk location.
• Here, choose action as GET for reading the file.
• Click + on connection to create a new one.
- The data of the input file is as given below .It is saved in local directory with .xml extension.
• Name the file and give the directory where the file is placed. Here, the xml file is placed in E
drive and in DellBoomi folder and within that AccountRevenueDetails folder as shown in the screenshot.
• Click save and close
• Now, configure the operation. Click + on operation to create a new one.
• Name the operation and configure the following.
File Filter: Give the name of the file which you have saved in your local directory . Here, it will be
File Matching Type:
• Wildcards uses simple file filters like * and ?. * represents multiple characters and ?
represents a single character.
• Regular Expressions can include complex regular expressions.
• Exact Match includes the filename which we are reading.
• Here, file matching type would be Exact Match as we are giving the file name.
- Click on save and close.
Step 8: Drag and drop 2 stop shapes on to the Process Canvas.
- Connect the stop shape after the disk shape and in the catch .
Step 9: Arrange all the shapes .
Step 10: Now Test the process by clicking on the Test button on the right side.
• Choose the suitable Atom for running the test from the dropdown.
• Click on Run Test.
- Click on the Stop shape and go to Shape Source Data.
- In Shape Source Data,Click on document to open it and see the output.