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

Separate action expressions for different action triggers #161

Closed
snikolayev opened this issue Jun 3, 2018 · 2 comments
Closed

Separate action expressions for different action triggers #161

snikolayev opened this issue Jun 3, 2018 · 2 comments
Assignees
Milestone

Comments

@snikolayev
Copy link
Member

snikolayev commented Jun 3, 2018

Add ability to tie different action expressions to different action triggers. I.e. a separate expression for newly created activations, vs updated activations. Also add ability to tie expressions with de-activations, effectively creating undo actions.
This also changes how linked facts are auto-retracted when activations are removed. Previously, linked facts were retracted immediately, as soon as the activation was removed. Now activation removals will get queued and deactivation expressions will get executed as part of rules firing, hence creating parity between insertion, update and removal of linked facts.
Existing Do actions will continue to get executed on new activations and on updated activations.

@snikolayev snikolayev added this to the 0.9.0 milestone Jun 3, 2018
@snikolayev snikolayev self-assigned this Jun 3, 2018
snikolayev added a commit that referenced this issue Jun 3, 2018
- Add a notion of action triggers, that indicate how the activation was
triggered (create, update, removal)
- Ability to associate expressions with individual action triggers.
Including expressions on action removals
- Changed how linked facts are managed, to leverate action triggers
- Tests
snikolayev added a commit that referenced this issue Jun 19, 2018
For backwards compatibility reasons, auto-retract linked facts at the end of fact propagation, instead of as part of "undo" action. This preserves existing observable behavior.
@DonaldAirey
Copy link

I need this feature for a demo of the product I'm building on NRules. Any rough idea of when they'll be ready? Do you have a preview available?

@snikolayev
Copy link
Member Author

You can clone the repo and build it yourself with pre-release code. There is no hard set date for the release

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

2 participants