0 votes
577 views
in Activities & Tasks by
How can we generate an excel and send it as attachment in email in IBM BPM?
Passing a link to attachment is working but i need to send the attachment directly in the mail.
Please let me know if any more information is needed on this requirement.

2 Answers

0 votes
by (240 points)
If you are able to generate the excel file save it to the server location or some shared location which is accessible by the server.In the out of the box send email connector you can pass the file location to the attachments variable.
0 votes
by (2.3k points)
There is no easy OOTB answer to this.  The fully formed way is to write a set of Java connectors to address the use case and leverage them.  If you want more of a hack, it turns out if you create a file with an html table in it and name it with an excel extension, it will open properly in excel.  So knowing that you could write code that uses the System Toolkit write a text file with that content to your server, then use the OOTB e-mail connector to generate / send the e-mail.  This isn't an ideal solution and requires a bunch of be-spoke code, but it should work.

BP3 has toolkits that implement the java solution using open source packages to answer both halves of this problem.  One is a toolkit that can generate a multi-sheet excel spreadsheet from lists of Business Objects via configuration data.  The generated excel can be written to the file system, attached to a Process Instance, or returned as an ECMDocument (or whatever that is called in the IBM ECM Toolkit).

Using that last option, the BP3 E-mail toolkit addresses many of the short comings of the OOTB e-mail toolkit, handling secure server connections, servers that require logins, and, importantly for this answer, use a ECMDocument for file attachments.

Related questions

0 votes
1 answer 457 views
0 votes
4 answers 405 views
0 votes
1 answer 249 views
0 votes
0 answers 28 views
0 votes
0 answers 94 views
0 votes
1 answer 720 views
0 votes
1 answer 581 views

582 questions

482 answers

87 comments

1.7k users

Dosvak IBM BPM /BAW Products, Download Evaluation
Process & Performance Tools Process & Performance Tools
Code Analyzer Code Analyzer
UI Toolkit UI Toolkit
Integration Monitoring Integration Monitoring
Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.
Created by Dosvak LLC
Our Youtube Channel
...