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

Add Support for Defining Rules Without Lambda and the DSL #3

Closed
Clayton7510 opened this issue Feb 12, 2017 · 1 comment
Closed

Add Support for Defining Rules Without Lambda and the DSL #3

Clayton7510 opened this issue Feb 12, 2017 · 1 comment
Assignees
Milestone

Comments

@Clayton7510
Copy link
Collaborator

Rules and Decisions can be very nicely wired up with lambda. But [eventually] there should be support for wiring rules up without lambda and without the DSL (even though, this is very cool :).

What if given(), when() and then() methods could take in Facts, Predicates and Functions, respectively, but also be defined in a Rule class (by the developer)? That might be pretty cool. So, it could be an either/or situation. And thenRules or Decisions could then be added to a Book or mixed with other Rule types.

@Clayton7510 Clayton7510 self-assigned this Feb 13, 2017
@Clayton7510
Copy link
Collaborator Author

I think the basic approach will be defining classes that define given, when and then methods. Each of those methods will be injected into a Rule (e.g. default to StandardRule) as the definition of the functional interfaces which can be passed into the when() and then() methods. The given() method will convert the state defined into Facts. Anyway, that's the thought right now.

@Clayton7510 Clayton7510 added this to the 0.2 milestone Feb 13, 2017
@Clayton7510 Clayton7510 modified the milestone: 0.2 Feb 21, 2017
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

1 participant