jamessimone / apex-rollup

Fast, configurable, elastically scaling custom rollup solution. Apex Invocable action, one-liner Apex trigger/CMDT-driven logic, and scheduled Apex-ready.
MIT License
202 stars 27 forks source link

Use the same plugin with multiple Rollup_Control records? #483

Open dschach opened 10 months ago

dschach commented 10 months ago

Because RollupPlugin.Name must be unique, I don't see how to use the same plugin with multiple RollupControl records (which would let some rollups be defined as Synchronous, some as Queueable, etc.

jamessimone commented 10 months ago

@dschach it'd be great to get more info about what you're trying to do here, and how Rollup Plugin records tie into that (nb: neither Rollup Plugin nor Rollup Control have underscores in their API names)!

dschach commented 10 months ago

How would you put RollupLogger onto two different RollupControl records? The use-case could be one RollupControl is Queueable and one is for Batch.

jamessimone commented 10 months ago

Not all plugins use the Rollup Control lookup, and the logging framework is a good example of that. The lookup is still required - and I could be convinced that should be updated! - but it's only used for certain plugins. It's been a good long while since I've had a look at that particular part of the overall framework (nearly two years ago).

Long story short - it used to be that logging plugins were the only plugins, and the CMDT records themselves were called something different (Rollup Logging Plugins, IIRC). Then came the need for several other plugins that had nothing to do with logging, and the subsequent port over to Rollup Plugins. It's very possible that the control record still being required has more to do with the way that things used to work rather than how they work right now.