BizVR to DMN Collection Mapping - Gnorion/BizVR GitHub Wiki

We should probably distinguish between LISTS (which are ordered) and COLLECTIONS (which are unordered) since some list expressions do not apply to collections

BizVR DMN Example
{color in (red,green,blue},number in {1,2,3,)} equivalent Feel expression (if there is one)
{p in Persons, c in Cars where p.colorPref=c.color }
? concatenate([1, 2, 3], [4, 5]) [1, 2, 3, 4, 5]
? count([1, 2, 3, 4, 5]) 5
? distinct values([1, 1, 2, 2, 3, 3, 4, 5]) [1, 2, 3, 4, 5]
? flatten([1, [2, 3], [4, 5]]) [1, 2, 3, 4, 5]
? max([1, 2, 3, 4, 5]) 5
? mean([1, 2, 3, 4, 5]) 3
? min([1, 2, 3, 4, 5]) 1
? reverse([1, 2, 3, 4, 5]) [5, 4, 3, 2, 1]
? sort([5, 4, 1, 2, 3]) [1, 2, 3, 4, 5]
? sum([1, 2, 3, 4, 5]) 15
? index of([“a”, “b”, “c”, “d”, “e”, “f”], “c”) 3
? append([1, 2, 3, 4, 5], 6) [1, 2, 3, 4, 5, 6]
? list contains([1, 2, 3, 4, 5], 5) true
? list contains([1, 2, 3, 4, 5], 6) false
? remove([“a”, “b”, “c”, “d”, “e”, “f”], 2) [“a”, “c”, “d”, “e”, “f”]
? sublist([1, 2, 3, 4, 5], 2, 3) [2, 3, 4]