How to return a concept array in a RuleFunction. The array Flag in TIBCO BusinessEvents 4.0.1 is not working.

How to return a concept array in a RuleFunction. The array Flag in TIBCO BusinessEvents 4.0.1 is not working.

book

Article ID: KB0089585

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Resolution:
Description:
===========
How to return a concept array in a RuleFunction. The array Flag in TIBCO BusinessEvents 4.0.1 is not working.

Environment:
===========
TIBCO BusinessEvents 4.0.1
All Operating Systems


Symptoms:
=========
In the current version (4.0.1) it is not possible to build the ear file in studio when trying to retrun a concept array in a RuleFunction.

Cause:
======
This is indentified as a defect  - BE-10332.

Resolution:
========
Use the following workaround:

RuleFunction (return an Object)
--------------------------------
Object rulefunction RuleFunctions.createChilds {    
attribute {
            validity = ACTION;
      }
      scope {
      }
      body {
          Concepts.child[] childs=Concepts.child[2]{};
          childs[0]=Concepts.child.child(null);
          childs[1]=Concepts.child.child(null);
          return childs;
          }
    }

Rule:
----------------------------------------------
// process RuleFunction
Object t1 = RuleFunctions.createChilds();
// set returned object to concept array
Concepts.child[] childs=t1;

Issue/Introduction

How to return a concept array in a RuleFunction. The array Flag in TIBCO BusinessEvents 4.0.1 is not working.