Skip to main content
Solved

Execute after transformers completed

  • August 12, 2020
  • 2 replies
  • 367 views

Forum|alt.badge.img

I have a transformer that Lists a set of companies in a database schema and then fires off a set of workflows. These end in 5 SQLExecutors which migrate the data into another database.

 

I want to be able to run a final tidy up process after these are all finished. The input must come from the List_Company_Schema process, not the SQLExectors but it must wait for them to finish.

 

How do I do this?

Best answer by nielsgerrits

Route from all outputports of transformers you want to wait for to a FeatureHolder. This will only release features if all have arrived. Then use a sampler to let only one feature through to initiate the next proces.

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

nielsgerrits
VIP
Forum|alt.badge.img+61
  • Best Answer
  • August 12, 2020

Route from all outputports of transformers you want to wait for to a FeatureHolder. This will only release features if all have arrived. Then use a sampler to let only one feature through to initiate the next proces.


Forum|alt.badge.img+2
  • August 12, 2020

@davebarter You need to get a Result from your 'Migrate_*' SQLExecutors. If you can add something like a SELECT COUNT(*) to those migrate SQL calls, then you'll know when each of those tasks finishes (the Initiator is output before the Result output so you can't use that). Then, a join of those four results with your Create_users (use FeatureMerger) should force the Create_users to wait for all the SQLExecutors to complete. Something along those lines.