How to send attachment in Email in BPM Process?

One Star

How to send attachment in Email in BPM Process?

Hi,
I am working on Talend BPM 5.4.1. I want to send attachment using email connector in BPM process.
I am able to do in static way.

Here is my scenario:
I took an variable "Result" with "Attachment" data type. I clicked on Browse, I selected the file.
I used this variable in email connector- attachment.I am able to run the process and get the mail with attachment successfully.

But when I update the file with data and run the process again, attachment is not updating with current values. It's giving me the old file in attachment(as i gave the file path).
Can anyone help me that, how can we do dynamically sending mail with attachment?

Thanks,
Shilpa

One Star

Re: How to send attachment in Email in BPM Process?

Hi,
I am working on Talend Open Studio for Data Integration 5.3.1
Here is my scenario :
I want to select row5.ACT where row4.NUMVOL between row5.NUM_VOL_MIN and row5.NUM_VOL_MAX.
PS : row4.NUMVOL, row5.NUM_VOL_MIN and row5.NUM_VOL_MAX are strings.
How can I do this with tMap ?
Can anyone help me please ?
Thanks.
One Star

Re: How to send attachment in Email in BPM Process?

Can anyone reply this for this post? How to send dynamic attachment in email?
Thanks
Shilpa

Hi,
I am working on Talend BPM 5.4.1. I want to send attachment using email connector in BPM process.
I am able to do in static way.

Here is my scenario:
I took an variable "Result" with "Attachment" data type. I clicked on Browse, I selected the file.
I used this variable in email connector- attachment.I am able to run the process and get the mail with attachment successfully.

But when I update the file with data and run the process again, attachment is not updating with current values. It's giving me the old file in attachment(as i gave the file path).
Can anyone help me that, how can we do dynamically sending mail with attachment?

Thanks,
Shilpa
Four Stars

Re: How to send attachment in Email in BPM Process?

Hi Shilpa,
Whether after update, the file name is changed or is same?
Vaibhav
Highlighted
Four Stars

Re: How to send attachment in Email in BPM Process?

Hi Yosra,
- You will have to first parse string to integer - ex - Integer.parseInt("10")
- After conversion, you can use if-then-else expression in tmap
Pl check sample expressions at http://community.talend.com:80/t5/Design-and-Development/IF-else-statement-usage-in-tMap/m-p/9962#M1...
Hope it helps and get you some idea to implement.
Vaibhav
One Star

Re: How to send attachment in Email in BPM Process?

Hi Vaibhav,

Let me explain you briefly.
I am generating the file from DI job.
Job is like (Source)Database Input component -- > tfileexceloutput
This job generates output file in Target folder.

I am calling the DI job in BPM process thru Talend Job Launcher connector.
For attachment,
I have created one variable with data type attachment and browse the file from the Target folder(Which was generated by DI job).
For the step, I using Email connector - configuring the email connector by taking the attachment variable.

Here, it is taking initial attached file. But though the file was updating from DI Job, the attachment was not taking the updated file.

So how can we do dynamic attachment in email? Please let me know do you understand my question or not.

Thanks,
Shilpa.

Hi Shilpa,
Whether after update, the file name is changed or is same?
Vaibhav
Four Stars

Re: How to send attachment in Email in BPM Process?

I got your question, but I have same question again.
After execution of Talend DI job the file which is generated in consecutive execution, whether it is updating/inserting/apending data in same file or creating new file with different name?
If it is creating new file, then in variable is already pointing at previous file, then how can he pickup new file?
Rest design logic is fine.
Vaibhav
One Star

Re: How to send attachment in Email in BPM Process?

The file will update after each execution. The file is having same name in same folder.
Thanks,
Shilpa
I got your question, but I have same question again.
After execution of Talend DI job the file which is generated in consecutive execution, whether it is updating/inserting/apending data in same file or creating new file with different name?
If it is creating new file, then in variable is already pointing at previous file, then how can he pickup new file?
Rest design logic is fine.
Vaibhav
Four Stars

Re: How to send attachment in Email in BPM Process?

Something is fishy here...
If the filename is same, path is also the same, file is updated by talend job execution through BPM, if everything is true then the file is cached by the BPM and not receiving new file from the variable..
One Star

Re: How to send attachment in Email in BPM Process?

Yes. It is not updating with attachment. How can we achieve this?
Please help me.
Thanks,
Shilpa
Something is fishy here...
If the filename is same, path is also the same, file is updated by talend job execution through BPM, if everything is true then the file is cached by the BPM and not receiving new file from the variable..
Four Stars

Re: How to send attachment in Email in BPM Process?

Hi Shilpa,
Please send a mail to Venkatesh MEKALA , he will help you to resolve your issue.
Vaibhav
One Star

Re: How to send attachment in Email in BPM Process?

Sure.I will send an email to him.
Thanks Vaibhav.

Hi Shilpa,
Please send a mail to Venkatesh MEKALA , he will help you to resolve your issue.
Vaibhav
One Star

Re: How to send attachment in Email in BPM Process?

Could anyone please give solution for this issue?

Thanks,
Shilpa.
Four Stars

Re: How to send attachment in Email in BPM Process?

Hi Shilpa,
Can you mail me your bonita job .bos file. I think the problem is of some variable usage...
Vaibhav
One Star

Re: How to send attachment in Email in BPM Process?

Vaibhav,
Could you please provide me your email address? I am not able find how to attach file from Talend Forum email.

Thanks,
Shilpa
Hi Shilpa,
Can you mail me your bonita job .bos file. I think the problem is of some variable usage...
Vaibhav
Four Stars

Re: How to send attachment in Email in BPM Process?

Sent you a mail...
check it in spam folder..
One Star

Re: How to send attachment in Email in BPM Process?

Did not received mail yet.
Sent you a mail...
Four Stars

Re: How to send attachment in Email in BPM Process?

Sent you a mail...
check it in spam folder..
One Star

Re: How to send attachment in Email in BPM Process?

Thank you. Sent you an email.
Four Stars

Re: How to send attachment in Email in BPM Process?

You have not called the talend job connector at any place.
- First ensure that you are calling talend job from Bonit and it is working successfully... by checking file update timestamp or contents. once this is done, attachment is not an issue...
Vaibhav
Four Stars

Re: How to send attachment in Email in BPM Process?

One Star

Re: How to send attachment in Email in BPM Process?

I am sorry Vaibhav. I have you sent which was using only email connector and how to do attachment. I sent actual process what i am doing now. Please check.

Thanks,
Shilpa
You have not called the talend job connector at any place.
- First ensure that you are calling talend job from Bonit and it is working successfully... by checking file update timestamp or contents. once this is done, attachment is not an issue...
Vaibhav
Four Stars

Re: How to send attachment in Email in BPM Process?

I can test the step and see that the job is executing... some minor error is there, but it could be resolved.
Have you followed above documentation inside the url?
Vaibhav
One Star

Re: How to send attachment in Email in BPM Process?

Yes. I followed the same steps for job launcher. My problem is about email connector to send attachment dynamically.

Thanks,
Shilpa
Four Stars

Re: How to send attachment in Email in BPM Process?

I could not import your .bar file, bonita encountered error...
I will create one sample job for you and send it across to you may be in coming week for your reference.
Thanks
Vaibhav
One Star

Re: How to send attachment in Email in BPM Process?

ok.Thank you so much for your help. If I could receive early from you, it will be very great Smiley Happy and =)
Thanks,
Shilpa
I could not import your .bar file, bonita encountered error...
I will create one sample job for you and send it across to you may be in coming week for your reference.
Thanks
Vaibhav
One Star

Re: How to send attachment in Email in BPM Process?

Hi Vaibhav,
Do we have any solution for dynamic attachment scenario?
Thanks,
Shilpa
I could not import your .bar file, bonita encountered error...
I will create one sample job for you and send it across to you may be in coming week for your reference.
Thanks
Vaibhav