tSendMail malfuctioning

One Star

tSendMail malfuctioning

Hai,
I have a job that extract data from tFileList.
Using tFileExist, I am checking the existing of the file.
If there is no file exist in the tFileList, I have to sent notification using tSendMail.
Using the expression of , an email will be sent to the target email address.
In my case, I have tested to put a file in the tFileList. Logically, an email would not be sent to the targeted email address. Unfortunately, it happens the other way round. Do you know why is the email is sent to the email address even there is a file in the tfileList?
Any suggestion are appreciated.
Thanks,
fadh
Four Stars

Re: tSendMail malfuctioning

Hi,
Following expression is true when there is no file, and tsendmail would send the mail.
((Boolean)globalMap.get("tFileExist_1_EXISTS")) == false
Thanks
Vaibhav
One Star

Re: tSendMail malfuctioning

Hi sanxaibhav,
I have used the expression as what you have suggested. the link shows false but there is no email notification sent towards the identified email address. How could this suppose to be happened?
One Star

Re: tSendMail malfuctioning

Hi,
Anyone has the idea of what actually has happened?
Any suggestion would be much appreciated.
Thanks,
fadh
Moderator

Re: tSendMail malfuctioning

Hi,
I have designed a demo job with the condition !((Boolean)globalMap.get("tFileExist_1_EXISTS")), everything is OK.
Please have a look at my screenshots
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: tSendMail malfuctioning

Can you pl check on your filter condition on tFileList? I think problem is there
One Star

Re: tSendMail malfuctioning

Hi Sabrina,
using the expression of !((Boolean)globalMap.get("tFileExist_1_EXISTS")) and I have deleted the file, the link of (IF) shows false. But if I put the file again in the folder, the link shows true by using the expression above.
I am a bit confuse.
Moderator

Re: tSendMail malfuctioning

Hi,
It seems you got an opposite result(If the file exist, the condition should be "false"). Could you indicate the build version you are using? Does it repro on another version?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tSendMail malfuctioning

Hi,
I am quite unclear with "repro on another version". I am using TOS 5.3.1
Thanks,
fadh
One Star

Re: tSendMail malfuctioning

Is it has related with the tFileExist?
Moderator

Re: tSendMail malfuctioning

Hi,
How did you set tFileExist? Did you use dynamic file path in it?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tSendMail malfuctioning

Hi,
Here is the file path in the tFileExist.
Thanks,
fadh
Moderator

Re: tSendMail malfuctioning

Hi,
From your screenshot, I don't find any error.
I will make a testing on talend open studio 5.3.1 to see if this issue repro then come back to you as soon as we can.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tSendMail malfuctioning

Hi Sabrina,
TQ so much for your concern.
Regards,
fadh
Moderator

Re: tSendMail malfuctioning

Hi,
I have made a testing on Talend Open Studio 5.3.1. It is OK with me. Could you please restart your studio then re-create a new job for your requirement to see if everything is going well?(you can just create a demo job for testing:tFileExist-->RunIf-->tSendMail).
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tSendMail malfuctioning

Hi Sabrina,
The output is still false.
Regards,
fadh
One Star

Re: tSendMail malfuctioning

hi Sabrina,
the above job is the new job that I have tested as what you have suggested.
Regards,
fadh
One Star

Re: tSendMail malfuctioning

Hi,
I am quite curious if that I can use dynamic file path. Is it possible to use any?
Regards,
fadh
Four Stars

Re: tSendMail malfuctioning

Hi Fadh,
I am not sure where is the problem,
In tFilelist you can't use dynamic path, it is the start component, you have to set the path...
Pl check the screenshot which checks Users.csv file and if the file is not available it won't send the mail.
I think you can identify the problem in your job now?
Thanks
Vaibhav
One Star

Re: tSendMail malfuctioning

Hi,
How do I call for a document with different name?and how do I check existence of the file in the tFileList?
regards,
fadh
Moderator

Re: tSendMail malfuctioning

Hi,
How do I call for a document with different name?and how do I check existence of the file in the tFileList?

What the "document" with different name looks like?
You can select check box "Generate Error if no file found" to generate an error message if no files or directories are found. Is it what you are looking for? If not, could you please elaborate an example with an example with input result and expected output result.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tSendMail malfuctioning

Hi,
It is an excel file of document. For example customer_2011.xlsx and the one is customer_2012.xlsx.
Can I know which one of the components that I can select the check box as what you have stated earlier?
Can I send an email notification if I select the check box of "Generate Error if no file found"?
Regards,
fadh
Moderator

Re: tSendMail malfuctioning

Hi,

The option "Generate Error if no file found" exists in TalendHelpCenter:tFileList component.
Please have a look at my screenshots
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tSendMail malfuctioning

Hi Sabrina,

Thank you for your suggestion. Your suggestion is very helpful.
By the way, I am just wondering what actually has happened when I used the IF expression which it did not work at all in TOS 5.3.1. Is it because of bug?
Regards,
fadh
Moderator

Re: tSendMail malfuctioning

Hi,
I cannot repro this issue on Talend Open Studio 5.3.1. You'd better take a testing on another build version to see if it repro.(It seems "!" operator is not working for you?)
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: tSendMail malfuctioning

Please ignore.