Skip to content

Introduce a Collect conditional element similar to the one in Drools. #166

@markbjerke

Description

@markbjerke

The collection conditional element similar to Drools allows you to specify set oriented bindings and reason over the set in the LHS of rules. A collect node was implemented that extends the from node. The example below finds all customers who have bought items over 10.

This blog describes collect, our implementation is similar. The example(s) in the blog were used as test cases.

http://blog.athico.com/2007/06/chained-from-accumulate-collect.html

This paper was used to develop the collect node:
http://citeseer.ist.psu.edu/viewdoc/download?doi=10.1.1.25.1076&rep=rep1&type=pdf

c : Customer;
items : Array items.length == c.items.length from collect( item: Item item.price > 10  from c.items );

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions