You are not logged in.
Announcement
Unanswered posts
|
Pages: 1
Hello,
I try to send the result of a tFileList in the body of an email.
But I can't do that.
I add a tIterateToFlow, a tFileOutputDelimited, but I can't find how to send a message like that :
"The directory contains" +((Integer)globalMap.get("tFileList_1_NB_FILE")) + "files"
The files are "+ WhatISInTheDelimitedFile or TheFlow
Thanks for your help
P.S : I'm a programmer, I also forgot how to convert an integer to a string in java..... ;-))
P.S 2 : I know that I can have the file as an attachment (and it's work fine), but it's really faster to read the file without to open the attachment....
Last edited by olcell (2008-07-02 10:21:51)
Offline
jeremie wrote:
Hi,
what do you want to do ?
what contends your tFileOutputDelimited : name if files or data ?
and in the mail body you want to put the data of files ?
jérémie
I want to list the file in a directory (the result of a ftp download) and send it by email.
I never know how much files I will have but more than 10 files.... If I read less than 10 names, I know that the previous process fails.... With the list of the files, I know if its a "serious" or not "error"...
So I tried to put the result of the tFileList in a file and then, I can send the file.
But, putting the list and the number of the files directly in the body of the email will be better....
At this moment, tFileOutputDelimited contains the name of the files and the date of the day (it's just for the test, I can delete this item ;-) ...)
Offline
jeremie wrote:
Ok,
also you can create a globalvariable in a tJava Instead of the tFileOutputDelimited with globalMap.put
efter you ese them in the tSendMail
jérémie
Thanks Jeremie, but in 2.4.0, where is the tJava.... I can't find it in the "Processing family"....
Offline
olcell wrote:
jeremie wrote:
Ok,
also you can create a globalvariable in a tJava Instead of the tFileOutputDelimited with globalMap.put
efter you ese them in the tSendMail
jérémieThanks Jeremie, but in 2.4.0, where is the tJava.... I can't find it in the "Processing family"....
it's in the "Custom Code" section ;-))
Offline
Hi, I need some help again or not.... If somebody find a better/quicker solution ;-)).
In my tJava_3, I put this code
String var3 = "liste des fichiers3 : ";
var3 = var3 + (globalMap.get("tIterateToFlow_1.row1"));
System.out.println(var3);
globalMap.put("tJava_2_Flot",var3);
I get only "null".
If I remove ".row1", I get an array.....
I tried with a "main" link, an "On Component ok"....
I also tried with the tJava2 on the tFileList_1 with this code :
String var2 = "liste des fichiers2 : ";
var2 = var2 + globalMap.get("tFileList_1_CURRENT_FILE");
System.out.println(var2);
globalMap.put("tJava_2_Liste_FILE", var2);
But I get only the last file because I always initialize my variable..... and I find the solution : the "context" to create a global variable.... (maybe I say something wrong, then please correct me if it is so...)
When I create the var in the context, with this code in the tJava_2, It's OK!!!!
context.var2 = context.var2 + globalMap.get("tFileList_1_CURRENT_FILE")+"\r\n";
System.out.println(context.var2);
globalMap.put("tJava_2_Liste_FILE", context.var2);
Maybe, it's possible to make it more simple.....
Last edited by olcell (2008-07-02 14:19:40)
Offline

Hi,
What do you need 2 tJava, the tJava_2 is just
after you put your tSendMail with a OnSubJobOk
Not necessairy tFileOutputDelimited and tIterateToFlow.
i think not tIterateToFlow_1.row1 but row1.name_file from the shema of the tIterateToFlow
Furthermore the OnComponentOk don't push the schema.
Jeremie
Offline
jeremie wrote:
Hi,
after you put your tSendMail with a OnSubJobOk
Not necessairy tFileOutputDelimited and tIterateToFlow.
i think not tIterateToFlow_1.row1 but row1.name_file from the shema of the tIterateToFlow
Furthermore the OnComponentOk don't push the schema.
Jeremie
If I delete the tFileOutputDelimited and tIterateToFlow, it didn't work... I will send the file too and let it like that ;-)))
Offline
Pages: 1