Quote from: OpenGeek at May 23, 2010, 02:14 PM
Just create your xPDOObject derivative class, extend the methods you want to override, and any classes you want to use this base class simply have them extend it instead of xPDOObject. Or are you talking about doing this on an existing model, namely MODx classes?
thanks Jason,
Yeah, I wanted to guarantee that every object in modx has a ’save’ event fired before and after it some way. Preferable in the least intrusive way to the core code, too, for upgrade purposes.
Im actually thinking of designs/patterns for a very generic workflow 3PC. Basically, the only consistent way that I can think of, to move items along a flow, and keep the 3PC flow code blackboxed from the modx code, is to check modx objects on save, and see if they are workflow defined tasks.
Ive sort of kicked it around in my head a few of days, and using ’xpdoobject save’ seems to be the OAOO place to catch completed tasks, and trigger a workflow action to move it to the next one.
Maybe there’s a better approach to it that doesn’t involve extending xPDOObject?