Our current design starts from a trigger, checks the data against a bunch of rules that the customer sets up. The ones that pass get sent to another job which exports it to another external system through a SOAP call.
The problem is that we hit governor limits when a user updates too much data at one time (in particular we are looking at a large import from an external system or through data loader.
Since it's a large amount of data that we are targeting (~200,000+ accounts) we were planing on using a batchable class. The problem I'm seeing with that is that we are only allowed to enqueue 5 batches at a time which could be a huge problem if our customer has multiple workflows (which they do).
I've seen posts on here talking about a singleton solution however I am not clear on how to get that to work with workflows. Is there a way to delay the execution until after workflows have completed? Do I have to settle with putting the sync job on a schedule/add a large delay to give it time to collect all instances from the workflows?
Thanks for the help.