apex-rollup icon indicating copy to clipboard operation
apex-rollup copied to clipboard

Use the same plugin with multiple Rollup_Control records?

Open dschach opened this issue 2 years ago • 3 comments

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.

dschach avatar Aug 28 '23 21:08 dschach

@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)!

jamessimone avatar Aug 29 '23 21:08 jamessimone

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

dschach avatar Aug 29 '23 22:08 dschach

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.

jamessimone avatar Aug 29 '23 23:08 jamessimone