I have a scheduled workspace running in FME Server. Upon success or failure, it posts to the same topic that runs another workspace. This workspace uses the FMEServerLogFileRetriever to pull the Feature Written Summary and then uses the FMEServerNotifier to run another topic that sends an email with the Feature Written Summary as the content. Right now, I'm querying the last job_id run in the fme_job_history to get the info. But, if more that one job runs at the same time, the logic gets a little fuzzy. It would be better if I could just pass the job_id from one workspace to the next. Is this possible?
In FME 2018 I would store the $(FME_JOB_ID) parameter in an attribute and then output that to a temp file that's being read by your second workspace or alternatively pass it through the notification system, which will take a bit of hassle. The problem is you have to run the FMEServerNotifier from within the workspace but at that point you don't know yet whether it's failed or not. In fact, if you trigger the topic that way that may actually set the 2nd workspace in motion while the first one is still running.
In FME 2018 I would store the $(FME_JOB_ID) parameter in an attribute and then output that to a temp file that's being read by your second workspace or alternatively pass it through the notification system, which will take a bit of hassle. The problem is you have to run the FMEServerNotifier from within the workspace but at that point you don't know yet whether it's failed or not. In fact, if you trigger the topic that way that may actually set the 2nd workspace in motion while the first one is still running.
I'd like to upgrade to 2019. But, I just upgraded to 2018, in a highly available failover setup, when 2019 came out and there's no in place upgrade. It makes upgrading a pain.
Initially, I tried to use the Notification Service to send an email and include the link to the log file. While, i'd prefer the recipient not have to scroll the log file to see the Feature Written Summary, I was going to try it. But, while inquiring the privileges needed to open the job log link, I was told admin rights would be needed to view the log link. I can't do that. So, I'm trying to come up with a work around.
Hi @dave29,
Another option would be rather than use the notification service to trigger the second job you could create a Parent Workspace to run on the schedule that contains two FMEServerJobSubmitter transformers. In the first JobSubmitter set Wait for Job to Complete = Yes so the second job isn't ran until the first one is complete. One of the output parameters from the Succeeded/Failed transformer is _job_id so you could pass this value through to a published parameter in your second JobSubmitter.
Hi @dave29,
Another option would be rather than use the notification service to trigger the second job you could create a Parent Workspace to run on the schedule that contains two FMEServerJobSubmitter transformers. In the first JobSubmitter set Wait for Job to Complete = Yes so the second job isn't ran until the first one is complete. One of the output parameters from the Succeeded/Failed transformer is _job_id so you could pass this value through to a published parameter in your second JobSubmitter.
OK. I'll try that. Thanks.
Hi @dave29,
Another option would be rather than use the notification service to trigger the second job you could create a Parent Workspace to run on the schedule that contains two FMEServerJobSubmitter transformers. In the first JobSubmitter set Wait for Job to Complete = Yes so the second job isn't ran until the first one is complete. One of the output parameters from the Succeeded/Failed transformer is _job_id so you could pass this value through to a published parameter in your second JobSubmitter.
The FMEServerJobSubmitter worked for what I was trying to do. I ended up adding the FMEServerJobSubmitter to my workspace that calls the FMEServerNotifier. It was easier to pass the Job_ID this way.
VDM_CrimeAnalysis_Master.fmw