3

I've got a workspace that inserts data in a database. It runs on FME Desktop and FME Server.

After the insertion (the first workspace) is completely done, I'd like to run a second workspace that checks the data quality (if there are spatial duplicates). So the first workspace has to transfer a parameter to the second workspace (the database scheme).

How do I do it?

I thought about using automations on FME Server but I don't see an appropriate trigger event

3 Answers 3

4

You can use a workspacerunner transformer, to be triggered at the end of the first workspace; this is typically after a featurewriter. Note the workspacerunner will run once for every incoming feature so you may need to limit the triggers.

Use a published user parameter on the second workspace to define any incoming parameters.

3

You could do it all in one workspace using FeatureReaders / FeatureWriters instead of classic Readers / Writers. (Using the FeatureWriter summary output to initiate the check proces.)

Or use a WorkspaceRunner when on Desktop or a FMEServerJobSubmitter when on Server. Then you need to create something to let the workspace detect if it is run on Desktop or on Server. I use Python Scripted Parameters for this. If fme_engine = '' then desktop and use workspacerunner, else = server and use fmeserverjobsubmitter.

1
  • when will know current workspace is finish execution ? because I need to pass current workspace output to inside workspace runner ? Jun 21, 2021 at 13:47
2

You shouldn't need a trigger on an FME Server automation; as long as it is connected, the second workspace will start automatically when the first finishes:

enter image description here

So here "austinApartments" will run as soon as CommunityMapping has finished (assuming the first workspace is successful).

The difficulty is passing information from the first workspace to the second. At the time of writing, this isn't supported (I'm 99% certain it will be part of FME2020), but you could pass info using an FMEServerNotifier transformer to trigger a notification that way, and use a topic as the trigger and recipient of the information. Or you could have the first workspace write a little bit of info to a temporary file and have the second workspace read it back. Not elegant, but like I mentioned, 2020 will see a proper solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.