I need to add workflows for Data-related events (like Item Created/Deleted), is this possible?
I had sent you a suggestion about adding default values to fields to use at instantiation, however having an event for when a Type is instantiated is even more flexible (not that I’d mind having default values too, data events would be run after the application of the default values I suppose). So when I have a type of Team getting instantiated in the workflow of a page, I can have my DB layer autoinstantiate a TeamRating object and assign it to the Rating field of the Team object that was just instantiated (getting it as a parameter from the Item Created event)
Deletion (Destruction) events are even more important (to be fired just before the object is destroyed). I don’t see currently, since there is no looping support how I can delete a Project type without leaving back garbage in the DB
I can delete the Project.Teams and Project.Tasks lists manually [error prone if I forget to do it] in my page workflows, but I can’t tell each Team and each Task in them to also delete their children now, neither can I loop upon them since there are no loops supported in workflows currently [see my question on how to send multiple e-mails - say to all members of all teams in a project - recently in the forum]
I think the Deletion events are critical. Even if I had looping support, I wouldn’t want to do all this work (delete members of lists, then delete the lists etc.) at each place I delete a Project, might forget something. Much better if I just delete the Project (from a Project List I remove say one project) and a workflow event for Project.Deleted tells me which object is going to be deleted and I can talk to its fields to delete the list of Tasks and list of Teams. Then more events are raised for each Task and Team item and they can also tell their children to cleanup if they have themselves lists too
Unless that is you have (or plan to have) implemented garbage collection in the database, where anything that isn’t held eventually by something else (eventually hanging from the user or some tables marked as “global”) gets removed. Not sure you can implement such garbage collection anyway (unless you do a “global/non-global” table concept, where the Users table is of course a global one) since some users may want to store flat data in tables, not hanging from something else via a reference