Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Event Notifications #965

Closed
mryckman opened this issue Oct 3, 2016 · 6 comments
Closed

Feature Request: Event Notifications #965

mryckman opened this issue Oct 3, 2016 · 6 comments

Comments

@mryckman
Copy link

mryckman commented Oct 3, 2016

I'm sure this has come up before, but it would be very cool if there was a way to attach actions to events within a data type. This would enable sending an email when a new item is added, for example. I would imagine it would be sensible to add this to the data type, then let the admin build an action and specify the event that calls that action... something like that.

If the emails were pretty customizable, they could facilitate workflow, let a user know we've received their comments, or whatever.

@iJungleboy
Copy link
Contributor

Just to brainstorm this a bit, these are probably common actions:

  1. Before Save - allowing you to do something, change the data, or cancel the save
  2. After Save - allowing you to do something
  3. Before Delete
  4. After Delete

What would have to be figured out

  1. A core issue would be the data-type transferred to these API; the common DynamicEntity wouldn't quite do, because you have other issues with data-before/after
  2. Another problem is multiple items - should a query call each before/after once? this could cause quite a bit of problems with performance, as each save would probably invalidate the cache, requiring a cache-reload which may be a bit expensive
  3. Where to put the code, especially because it would cause some issues in debugging the code if it only runs in hidden mode and be hard to develop
  4. Where to register that you have a custom event...

@mangiove
Copy link

mangiove commented Oct 4, 2016

Maybe instead of emails it would be less impact to initially just do an event registry? Where admin can see whats happened...
And select whats events would be registered...

@iJungleboy
Copy link
Contributor

An event-system would be a completely different feature and would again actually be fairly complex, especially if certain people would want notifications only in specific cases and not in others. So I believe the "simplest, most versatile" solution is a simple API, which allows people to code whatever they want to happen. Then people could create events, logs, send mails, update something else, etc.

@mryckman
Copy link
Author

mryckman commented Oct 5, 2016

Thanks Daniel - I suspect you're right... both about the approach and the complexity. I'd wondered about something visually managed - a bit like the query designer. Maybe the root object could represent an event in a data source where the result (presumably the updated/inserted/deleted record) could flow to different tasks assignable by the user. Perhaps those "tasks" could include things like "Log Event", "Send Email", "Execute Code", etc., but also include things like the "Value Filter" and other procedural things.

I don't know - in any case, it does seem difficult.

@iJungleboy
Copy link
Contributor

@mryckman such a generic workflow system can be created - but it would take a total of about 4 weeks work to do right. So without a sponsor it would be simply impossible, while providing a simpler "these are the events, you can write c# code for them" would be more likely because it's just much less work.

@iJungleboy iJungleboy modified the milestone: 2sxc 8.07 - New Data Sources and Improvements Oct 17, 2016
@iJungleboy iJungleboy modified the milestones: Need Contribution or Sponsor (open and closed), 2sxc 08.0x.00 - New Data Sources and Improvements Jun 3, 2017
@iJungleboy
Copy link
Contributor

will close for now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants