-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add support for "Member of" triggers #22
Comments
I guess you have seen this? If I would implement this what would you like to have? Like for group items, have a trigger for member of like this: @JRuleName("testmemberOf")
@JRuleWhen(item = _gMyGroup.ITEM, trigger = _gMyGroup.TRIGGER_MEMBER_OF_RECEIVED_COMMAND)
@JRuleWhen(item = _gMyGroup.ITEM, trigger = _gMyGroup.TRIGGER_MEMBER_OF_RECEIVED_UPDATE)
@JRuleWhen(item = _gMyGroup.ITEM, trigger = _gMyGroup.TRIGGER_CHANGED) I guess it would add complexity to allow for triggers like TRIGGER_CHANGED_FROM_ON_TO_OFF etc. |
Yes, I've seen this but I didn't think that far that it would pave the way for the feature here. :) I think you're right. Having additional triggers would add complexity. What about that?
That way we can re-use the triggers but make it explicit that it acts on |
Looks good, would still need to have the item = since it is used to filter out events on the eventbus (hashmap only containing the items that we should subscribe on). Would maybe be possible to use the memberOf in that subscription as well. I can try and take a look |
I see. It would also be fine for me if the member of thingy was a a separate flag or so like:
I could also imagine to have a kind of
Oh, and I realized that I used the plural form ( |
I think JRuleWhen is very overloaded. What about splitting this annotation into something like JRuleWhenItemChanged, JRuleWhenItemUpdated, JRuleWhenMemberOfChanged, ... |
I would now suggest (as well) something like
|
Closing this as it is fixed in pr #66 |
Thanks a lot for implementing this feature! I'm looking forward to try this out. :) |
You should probably wait a bit. There are a number of major prs that will fix a lot of things (thinking of #77 for instance) |
As a follow-up from the JRule thread, support for "Member of" triggers would be super handy. Also the JRule docs don't explicitly make it obvious that groups are handled in a way that only events are triggered when the group's value changes (not from it's members). But the docs is a rather easy fix, I guess.
The text was updated successfully, but these errors were encountered: