Skip to main content
Question

Sending mail with format based on DownloadURL

  • July 3, 2019
  • 2 replies
  • 30 views

jeroen
Contributor
Forum|alt.badge.img+15

I'm working with FME Server 2019 and was wondering if/how it is possible to use the automations functionality as followed:

So, i start a Data Download Service workflow with REST. This workflow performs its arts and then sends a mail if valid with the results if available or no mail when no new results are the (but the workflow still did the job). And failed if there is a bug/rejected stuff.

Is there a way to check/test the {downloadUrl} that is used in the Subscription before sending the link?

Sending format C is easy because that is just one topic and subscription connected to the failed results. But when the job is successful and the URL in {downloadUrl} is valid it should sends the mail in format A and if the URL in {downloadUrl} is _undefined_ it sends the mail in format B.

I was wondering if there is a way to keep the Data Download service as-is but test the content of the {downloadUrl} for further actions regarding the formatting of mail mail.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

jeroen
Contributor
Forum|alt.badge.img+15
  • Author
  • Contributor
  • 97 replies
  • July 3, 2019

Chose the wrong section -> This should be in FME Server.


Forum|alt.badge.img+2
  • 719 replies
  • July 11, 2019

Hi @jdh009,

In order to check if the DownloadURL parameter is defined I would recommend have a workspace triggered in response to the Topic your start workspace posts to on Success. This workspace will consume the Topic JSON message and extract the DownloadUrl attribute, using an AttributeValidator or Tester you can then check whether this url is defined.

Depending on the outcome of this test you can then define the different emails. Either you could use the Emailer Transformer referencing the URL attribute value, or set the Failed port of the Tester to a Terminator and then use Email Actions within Automations referencing {downloadUrl}. Take a look at this workspace checkdownloadurl2.fmw as an example.

In Automations you would set up the workflow similar to: