Is there any way that a Boomi process can carry a file e.g. .jpg or .pdf files?
You can retrieve any kind of file and store them wherever you want, either as a binary (e.g. to store them on an FTP server --- just make sure to set the correct file extension via a Set Property step at the end of the process since Boomi will by default produce .DAT files), or as a string Base 64-encoded string.
If you however need to do some processing on the files (eg: filling in a PDF, resizing a picture), it's a bit more complicated as you will need extra JAVA libraries and do some scripting.
Thanks for your reply, however, is it possible that I can attach an image or say a .txt file from my local file system and this file will carry through the process, and as you suggested for processing I will need JAVA libraries, what would be the option to read from this file?
Many Thanks in Advance
You can indeed extract a file from your local systems (Disk or FTP connectors depending on the exact needs). As a result, Boomi will carry the document until you extract data from another connector in your process. The file is not per se "attached" to the process, it's just being extracted and carried along as any XML or JSON records would do.
For example, after extracting a .txt file, you could see this. That document/record will follow the path of your process and at the end you could send it to another folder of your FTP/disk/system.
Reading from that TXT file would be quite straight forward as this is plain-text. You could use a basic Data Process shape and custom script to parse the data and then either extract parts of it or edit it on the fly. This wouldn't need anything extra.
As for the processing of pictures, I am myself not too familiar with that, but for sure the idea is always the same: you add a library in your atom setup folder, then use a Data Process shape/Custom Script. This way, you can read the input stream (your file content), transform it, then return it to the document queue where the file will keep flowing down your process.
If that does not answer your question yet, can you maybe provide an example of a process you have in mind? (ie. what you are actually trying to achieve from the start to the end of the process)
Thanks a lot Manu, I will try the above to check.
Sorry for coming back late on this.
My use case would be something like following, a person enters his information in an UI, as name, date of birth, place, company. Along with this they submit their Resume/Photo. Now while fetching this info how would I map this Resume and Photo in a profile (XML or json) so that these files will be part of message. And at this point it is not significant to process or read these files.
Please let me know if I am not able to explain it thoroughly.
How are the attachments handled when they are submitted? Are they 1) physically stored on a server as pdf/jpg/.. files or 2) are they sent along with the user details to a DataBase?
- In the second case, it's pretty straightforward to do the mapping since your source profile will already have the pictures embedded. If they are stored as Binary/BLOBs, you just have to encode them to base 64 using a Data Process shape. Potentially, the attachments will already be stored as b64 so you would just map directly.
Say your DB data looks like this:
When you get the resume/photo "fields", you basically extract a binary, so you need to convert it to b64.
Else it could already look like so:
Here, you can plainly get the base-64-encoded value and map it to the XML.
- In the first case, you need to know what and where is the link between each attachment and the users: could be an extra field populated with the file name for example. In any case you would need a second connector to retrieve the attachments (FTP), and then again you would have to encode the documents to base 64, so that you can map them to any field in the XML/JSON structure.
=> Are you in a position where you can tell how exactly the data is submitted/stored? Does any of the scenarios above match your case?
As Manu said we can process pdf file or image files easily in Boomi, I have done it multiple times. Using dis connector and after that converting the dat file format to the specific image or pdf file format, one can process the file accordingly and use it in the process.
Retrieving data ...