Complex Data structure DataList TERR type is mapped to Object in TIBCO BusinessEvents Rule/Rulefunction. Use Object for the DataList(com.tibco.terr.TerrList) returned from TERR, and then use the Analytics.DataList.getElement catalog function to extract the list(Object[]).
See the code example below to extract elements returned from TERR in a BE Rule/Rulefunction:
Object[] TerrResult = Analytics.Engine.invokeTERRFunction("TerrEngine","FraudDetectionList",debitTime,debitAmount,averageMonthlyBalance);
Object TerrResultList = TerrResult[0];
Object[] firstElement = Analytics.DataList.getElement(TerrResultListObject, 0);
int fraudFlag = Number.valueOfString(firstElement[0]);
Object[] secondElement = Analytics.DataList.getElement(TerrResultListObject, 1);
String fraudMessage = secondElement[0];