IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 1 reply
  • Latest Post - ‏2013-03-25T17:34:40Z by SystemAdmin
SystemAdmin
SystemAdmin
6184 Posts

Pinned topic WTX8.2 - Mutiple output and sigle output can co-exists in a same rule?

‏2013-03-25T07:20:37Z |
If(PRESENT(EXTRACT(ITEMS,value:ITEMS>0)),
func_outputSeries(EXTRACT(ITEMS,value:ITEMS>0)),
"Test"
)

The above rule is appled to a output object containing the multiple occurrences. If there are 3 items in the ITEMS object but no one's value is greater than 0. I expect the final output is only one "Test". However, the final output is 3 "Test".

Anyone know this issue? And any solutions? Thanks
Updated on 2013-03-25T17:34:40Z at 2013-03-25T17:34:40Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: WTX8.2 - Mutiple output and sigle output can co-exists in a same rule?

    ‏2013-03-25T17:34:40Z  
    Hi,

    Since EXTRACT brings a series back, this does not look very surprising, as I suspect the execution engine evaluates the rule several times (I may be wrong, but I think this is what happens).

    If I was to test this condition, I'd rather use the ALL function, to test all objects in the series match/do not match a given condition.

    Be careful, the data binding is right behind the corner, as calling two series consuming function in the same rule on the same series may yield unexpected results...