As of StreamBase 7.5.1, there is a
uuid() built-in StreamBase Expression Language function.
Prior to 7.5.1, there was no built-in StreamBase Expression Language function available, and you might implement your own Custom Java Function to generate a GUID using the process described below.
Implement a Custom Java Function that uses the Java UUID class:
As defined, the
.java source lives in the project under..
<project>/java-src/com/sb/support/UtilsUUID.javaTo use this function expression, for example, in a Map expression..
calljava("com.sb.support.UtilsUUID","GenUUID")
If you change the implementation package, class, or function name, you will need to update the calljava() arguments in the above expression.
For more details on creating Custom Java Functions, refer to the Help under StreamBase Documentation > API Guide > Developing StreamBase Custom Functions >
Creating Custom Java FunctionsWhen deploying, export the custom functions to a
.jar and reference the
.jar in your project's Build Path or the Server Configuration File (
sbd.sbconf).