@hollyatsafe @keithatsafe Do I want something that is impossible with Automations? Should I do it the old way?
Hello @michielschram,
Unfortunately, you've stumbled upon a limitation to Automations. We currently don't have multiple output ports on workspaces and therefore can't route the email differently depending on the output of the workspace.
I'm not sure what your output email currently looks like or if it has an attachment. If you aren't currently emailing an attachment, you could include an HTML report and attach it to the email. This could include if the validation was successful or not. I'm thinking of something like this demo: http://demos.fmeserver.com/validation/
I've raised your case internally and it is now attached to the idea of adding new output ports on the workspaces in automations. I'll let you know if there are any new developments.
@michielschram
I am not sure what the output of your first workspace is and haven't used the automation filter yet, but would it perhaps be possible to adjust the name of the output (if the validation is not valid) and filter on that? Perhaps you can add a prefix or a suffix to the filename?
Hej Michiel,
A possible workaround you could use is the following:
Create 2 new topics on FME Server.
1) If the submission was valid/passed.
2) If the submission was invalid/failed.
In your "CreateValidationStatus" workspace use 2 FMEServerNotifiers depending on the result. One that triggers topic 1 if it was successful and one that triggers topic 2 if it failed.
You can send the information you need into the 'Content' parameter in the ServerNotifiers.
*In my case it just checks if a random number is equal or smaller than 5.
Then change your automations a bit so it looks like something in the form of this:
Your main workspace is still run by the normal trigger (a DirectoryWatch in your case). The result will however trigger one of the "FME Server Topic" triggers.
Depending on the result you can send your mails or start new workspaces for further processing.
In the new workspaces you can take the FMEServerParameter; "FMESERVER_TOPIC_MESSAGE" to get your data back again to process it further.
If you make good use of Annotations and Bookmarks in your automation I think you can still create a very clear workflow even though you are using Topics (instead of connection lines) that are not directly visible here.
Hope this can help you with your workflow.
Hello @michielschram,
Unfortunately, you've stumbled upon a limitation to Automations. We currently don't have multiple output ports on workspaces and therefore can't route the email differently depending on the output of the workspace.
I'm not sure what your output email currently looks like or if it has an attachment. If you aren't currently emailing an attachment, you could include an HTML report and attach it to the email. This could include if the validation was successful or not. I'm thinking of something like this demo: http://demos.fmeserver.com/validation/
I've raised your case internally and it is now attached to the idea of adding new output ports on the workspaces in automations. I'll let you know if there are any new developments.
Sienna, thank you for your response. It would be great for Automations to be able to use a result of a workspace within the automation flow.
@michielschram
I am not sure what the output of your first workspace is and haven't used the automation filter yet, but would it perhaps be possible to adjust the name of the output (if the validation is not valid) and filter on that? Perhaps you can add a prefix or a suffix to the filename?
Lars, thank you for your responce. Unfortunately your not able to use the output of a workspace as input for an automation action. Hopefully this will change in the future.
Thank you all for thinking allong. Actually the solution of Jurgen works fine but we decided within our project to do it without topics. We are just running every workspace within the automation. The first thing that workspaces do that are dependant on upstream workspaces is check if they should run. This save's a lot of time and keeps things simple. Hopefully in the future we will be able to add filters that are dependant on previous results so unnecessary workspaces aren't run.