Item deletion event

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

1 Like

I have a similar use for this. Delete a post, thus deleting its likes and comments, and recursively delete the comments’ likes and comments. If it hasn’t been done already, send a feature request so it can be tracked against.

If you mean the suggestions-to-sponsor table, I have so much feedback (have sent a lot by e-mail too) that it would take me long time too send there too

btw, although it would be nicer to be able to attach such events (Item Deleted / Item Created) at the data layer once (not have to repeat per-page), it would be fine also if you can put them in a Reusable Element and just have it hidden in the pages you want

…another idea regarding where to host those Item Deleted events that I need so that you don’t need to replicate them at various pages (say via a reusable element that holds the events) is to have a page called “app” that doesn’t allow any UI elements (or that shows UI elements that appear automatically together with their workflows at all pages). Then you’d put your data-related workflows there (I also thought of having separate UI Workflows and Data Workflows tabs, but that would be more complex than having an app page where you hold global events [and why not global UI elements that appear - maybe show locked at the pages or in some stripe?] in each page, keeping their state between pages])