You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could be expected behavior, however, it seems like a bug that when you have multiple "collect" outputs that point to a sink such as Response, that the outputs should merge into a single list by default. Right now, it seems based on evaluation order which one "wins". To overcome this, I need to specify and output selector, then have a function that merges them together which isn't ideal. Example is attached.
Hi @TheCaffinatedDeveloper for now this is by design, reason for this output is that it is not simple to just merge arrays compared to objects. In objects we will do a basic merge but arrays require merge strategy. Adding arrays strategy has caused some issues with passthrough mode of the nodes.
For example merging arrays doesn't mean just adding them, it can also be merging based on prop (property such as "id"). Example if it exists update it if not then add it...
@ivanmiletic Thanks for the quick reply! Makes sense, I can see how a merge strategy could come in handy but also add complexity. I tried to find some documentation related to this behavior which is why I thought it could be a bug.
PS: Zen has continued to shine as a rules engine, keep up the great work!
This could be expected behavior, however, it seems like a bug that when you have multiple "collect" outputs that point to a sink such as Response, that the outputs should merge into a single list by default. Right now, it seems based on evaluation order which one "wins". To overcome this, I need to specify and output selector, then have a function that merges them together which isn't ideal. Example is attached.
Actual Output:
Expected Output:
graph (85).json
The text was updated successfully, but these errors were encountered: