Skip to main content

FME Flow 2023.1.1, Build 23631 - win64

Hello FMEers,

I have a simple workspace that is hooked up to a Resource or Network Directory trigger in FME Flow. I connected an emailer to the success port of the action, like so:

 

The workspace contains scripted parameters which get written to an Automations writer called ScriptedParams. I want to get the values of some of the scripted parameters in the email, so through the text editor interface I navigate to

Workspace > ScriptedParams > MyParam and it drops

{route.ScriptedParams.MyParam} into the body of the email.

But when the automation runs I only get the value _undefined_  in the resulting email.

If I ONLY connect the emailer to the ScriptedParams port (i.e. delete the success port connection) the values are correctly passed. But of course I want the email to be sent when the workspace runs successfully.

So what is the correct way to configure this automation to get the scripted parameters from the workspace into the success email?

Thanks!

Hi @joaniegeo99

With the current Automation configuration, the email action will receive two features (records) and be triggered twice - once for the success port (which will be missing the the workspace attribute MyParam, hence the undefined error) and once for the AutomationWriter’s feature (or features, if there are multiple output).

If the workspace is not too complex and doesn’t have multiple writers and parallel flows, you should be able to simply disconnect the Workspace Action success port from the Email Action. The AutomationWriter port will not output a feature if something fails upstream, so no email will be sent. 

If the flow within your workspace is more complex and branches off into parallel flows, it’s possible the workspace could fail somewhere, but still output a feature from the AutomationWriter port. In that case, I would recommend modifying the workspace logic to bring those flows together into one at the end and use a tester prior to AutomationWriter, so that you can control when it outputs a feature. 

I hope this helps!


OK thanks, I’ll do that.

Cheers.


Reply