Hi,

When writing a custom function as a Siddhi Extension I faced an issue in
validating the parameter count passed.

Eg:
from InputStream1
select *custom:cos(para1)*
insert into OutputSream1

I tried to validate the custom function '*cos*' where user should be able
to pass only one parameter.I used the below code in my function:

 @Override

public void init(Attribute.Type[] types, SiddhiContext siddhiContext) {

if (types.length  !=1 ) {

 //validation message

}

………

}
Here even when the user doesn't pass any parameter, it returns the
types.length as '1' and the data type as LONG.

Can somebody please help me to figure out the reason for this??

Thanks...
-- 
*Lahiru Cooray*
Software Engineer
WSO2, Inc.;http://wso2.com/
lean.enterprise.middleware

Mobile: +94 715 654154
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to