- Posts: 109
Notifications with created files
- JD Cox
- Topic Author
- Offline
- User
Less
More
1 year 2 weeks ago #3701
by JD Cox
Notifications with created files was created by JD Cox
I append data to an End of Day EOD file for each customer. In the evening after production I execute a script from FHSM ‘IF EXIST *.csv‘ I execute a FHDEF that recreates the file in an Email
folder then moves the original file to a Processed folder. If the task is successful it emails the customer a copy of the EOD file. The problem I’ve run into is not every customer ships every day.
So in the evening when their task runs, it is successful but no file is generated. Therefore, it sends an email with no attachment. So, I remove the ‘IF EXIST *.csv‘ part form the scripts, this forces
the FHDEF to be executed resulting in an error code 1. The task is not successful so no email is sent. This works for what I need but the FHSM always has Warnings/Errors. Is there a better
way to do this or would it be possible to add something like this to the notifications...
folder then moves the original file to a Processed folder. If the task is successful it emails the customer a copy of the EOD file. The problem I’ve run into is not every customer ships every day.
So in the evening when their task runs, it is successful but no file is generated. Therefore, it sends an email with no attachment. So, I remove the ‘IF EXIST *.csv‘ part form the scripts, this forces
the FHDEF to be executed resulting in an error code 1. The task is not successful so no email is sent. This works for what I need but the FHSM always has Warnings/Errors. Is there a better
way to do this or would it be possible to add something like this to the notifications...
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
1 year 2 weeks ago #3702
by FlowHeater-Team
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Replied by FlowHeater-Team on topic Notifications with created files
Hi CD,
You just have to create a second “File Monitoring” Task. Configure this ask to watch a Folder for *.csv files and execute your Definition. As soon as a new file are created in this folder your definition will be executed. In this case FlowHeater Server automatically exchange the file name in the definition. You also define your mail notifications into this task.
In your original task you only copy your CSV file, if exist, to this folder. That´s all ?
You just have to create a second “File Monitoring” Task. Configure this ask to watch a Folder for *.csv files and execute your Definition. As soon as a new file are created in this folder your definition will be executed. In this case FlowHeater Server automatically exchange the file name in the definition. You also define your mail notifications into this task.
In your original task you only copy your CSV file, if exist, to this folder. That´s all ?
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Please Log in or Create an account to join the conversation.
- JD Cox
- Topic Author
- Offline
- User
Less
More
- Posts: 109
1 year 1 week ago #3703
by JD Cox
Replied by JD Cox on topic Notifications with created files
Problem solved.
I was hoping to manage it with one task per customer. I ended up running the original script in one task then File monitor for each customer to execute the email.
So, close enough. And, I really like the Filter option on FH Server.
As always thanks for your help.
JD aka CD
I was hoping to manage it with one task per customer. I ended up running the original script in one task then File monitor for each customer to execute the email.
So, close enough. And, I really like the Filter option on FH Server.
As always thanks for your help.
JD aka CD
Please Log in or Create an account to join the conversation.
Time to create page: 0.262 seconds