How to use catalog function Temporal.Numeric.avgSince()

How to use catalog function Temporal.Numeric.avgSince()

book

Article ID: KB0091531

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Resolution:
Description:
===========
How to use catalog function Temporal.Numeric.avgSince()

Environment:
===========
TIBCO BusinessEvents 4.x/5.x
All Operating Systems

Symptoms:
=========
n.a.

Cause:
======
n.a.

Resolution:
========
The catalog function returns an object which could be cast to the specific property type.

Example:

Object obj= Temporal.Numeric.avgSince(c.testDoubleProp,60000);
double dValue = obj;
System.debugOut("### value: + dValue="+ dValue);

NOTE:
A warning/error is reported in studio version 5.0.x and 4.x  ("The type "Object" is ambiguous and could result in an error when used with type double"). You have to create a RuleFunction to execute  the typecast to be able to build the ear in that version. That issue is is fixed in TIBCO BusinessEvents 5.1 (CR 15962).

Issue/Introduction

How to use catalog function Temporal.Numeric.avgSince()