I need some help in attaching files that were sent through e-mail to a File Upload widget.
I have a process that starts when a user sends and e-mail to RMP with some files attached (it's an expense approval flow, with photographs of the receipts).
The second step is where the user inputs the details of the expense, and has the File Upload widget (just in case the user forgot to attach a file or sent a file by mistake and needs to delete it).
I want to be able to get the list of files that were attached in the e-mail and put them into the File Upload widget.
Ihave attached a few screenshots, to show what I tried to do:
1. Mapping_Message_To_Variables.png:
I mapped the attachments of the e-mail to the variable "email_files".
2. Mapping_Attachments.png:
The "email_files" is a Files format.
3. Input_Variables.png
The input variable for the manual task.
In this case, "expenses_upload" is my File Upload Widget.
4. Attaching_File_To_Widget.png
This is the script I used to attach the files to the File Upload Widget.
I assigned a list of IDs (all_mail_attachments) and put in the IDs contained in email_files.
Then, I used the attach_file method to put them into the File Upload widget.
Personally, I'm pretty sure I messed up somewhere in step 3 or 4, since I get an error in the beginning of the manual task.
However, since I couldn't find any documentation on how to create this, I was doing some try-and-error approach.
I would appreciate any help that I can get.
Best regards,
Tadeu Sakoda (Fujitsu do Brasil)
--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/8c6c8b1b-a6db-4cc7-a968-5a4123c63db5%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/c06afa3d-15eb-42de-bb56-d3e1f8523952%40runmyprocess.com.
Hello, Ghanshyam.
Sorry for my late reply.
To be sincere, the solution presented did not work for me.
I found a workaround to show the files using an array and an HTML widget to show the preview (I got it from another sample).
What I wanted to do was to show the files in the Upload Widget, but even looking at the RMP_FileUpload JS page, I couldn't find something that would work.
The closest I got was to simulate the file upload through JS, but that would be quite troublesome and most likely wouldn't work...
As such, I decided to make it simple and just show it in the array.
If you could give me any insights on how to show a file uploaded through e-mail attachment in the Upload Widget, I would appreciate.
I don't know if I'll use it in my current project (due to time constraints), but I will definitely consider using it in future projects.
Best regards,
Tadeu Sakoda