Pass org.jbpm.document.Document as an attachment to email service task.

104 views
Skip to first unread message

Deepak Srivastava

unread,
May 5, 2021, 2:24:17 PM5/5/21
to jBPM Usage
Hi,

Any idea how can I pass the uploaded document (org.jbpm.document.Document) within a process as an attachment to an email service task so that when the email service task is triggered, it also sends the document as an attachment to the email.

Thanks,
Deepak

Abhijit Humbe

unread,
May 6, 2021, 5:11:18 AM5/6/21
to Deepak Srivastava, jBPM Usage
Email service task didnt support actual attachment. Attachments  process variable only accept String type (URL of the file to be attached). If file is available in private network then either you have to write custom email WorkItemHandler or you can make use of kie-server document REST API's.
Abhijit Humbe


--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-usage/CAABD%2Bj0Hm-wYVZfToFO3L9HMW58r1yQaow8O4YesmUPJe0B55w%40mail.gmail.com.

Deepak Srivastava

unread,
May 6, 2021, 6:28:37 AM5/6/21
to Abhijit Humbe, jBPM Usage
I already uploaded a document while starting the process and jbpm saves it at jboss_home_dir/bin/.docs/{docId}/{fileName}. The file is already available with the server. 

How the Attachments variable needs to be passed in this case? if I pass URL of the file like below in the Attachments variable, will it send the document as an attachment to the email?
e.g location of the file from server - /home/jbpm/bin/.docs/12345/test.pptx

or what's the best way to send an uploaded document (which is already present in jboss/bin/.docs folder ) to an email as an actual attachment file.

-Deepak

Reply all
Reply to author
Forward
0 new messages