- Notifications
You must be signed in to change notification settings - Fork 113
Open
Description
Hi,
Would it be possible to load examples with complex facts, e.g. object with nested array of objects? How would you manipulate them?
Example:
var fact = { "parentObject": { "id": "abc123", "items": [{ { "id": 1, "parentId": "abc123", "status": null }, { "id": 2, "parentId": "def234", "status": null }, { "id": 3, "parentId": "abc123", "status": null } }] } } Let's say now that I want to create a rule to change the status of all objects in "items" array where parentId = parentObject.id; how can I achieve this?
In Drools (Java) I was able to bind to the object with those conditions to a variable and then to manipulate it in the "then" part, after I loaded all objects into the working memory.
Is there any way to achieve the same result with this library? Is there a better way other than loading each individual object into the working memory?
Maybe I missed it, but I couldn't find any example.
Thank you.
brent-hoover and DanielVillacanas
Metadata
Metadata
Assignees
Labels
No labels