How to create a unique key in TIBCO BusinessEvents

How to create a unique key in TIBCO BusinessEvents

book

Article ID: KB0081000

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition All

Description

How to create a unique key in TIBCO BusinessEvents

Issue/Introduction

KB describes an option to create a unique key in TIBCO BusinessEvents

Environment

All Operating Systems

Resolution

The catalog function Authentication.createUUID() uses the Java function  UUID.randomUUID().toString() to build a unique key. 

see:
https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html

The unique key can then be used to define a workkey for scheduled Events or for a unique query names or any requirement where unique keys are required.

eg:
Events.evInput ev1=Events.evInput.evInput(...);
String workkey=Authentication.createUUID();
// scheduler scEv1 started in startup Rulefunction
Cluster.scheduleEvent ("scEv1",workkey,ev1,System.currentTimeMillis()+360000);


String sQueryName = "Query1"_ + Authentication.createUUID();
Query.create(queryName, <queryText>);


 

Additional Information

Catalog function, UUID