How to write rule to generate unique sequence number like UUID API in java...
That depends on what you want to do. If you want to return a UUID/GUID from a rule service, the easiest way would probably be to import a Java or .Net UUID generator and just invoke that.
If you want to identify a rule instance uniquely, you need to wrap this in a Custom Provider.
Thanks for ur reply.
My rule has to return a unique number whenever it's called,
Also it has to check whether the unique number returned previously.
Means, every time when my rule is called it has to return a new unique number which never be sent previously.
I would probably go for a unique identity generator, which would save me the trouble of having to manage/verify that myself. Both C# and Java have these available, so it shouldn't be a problem.
Thanks for ur reply, Few more clarifications please,
1,Can i import UUID java api to implement this or is there anyother best way available for this ?
2, Do we need to persist generated ID's in a filesystem or DB ?
1) You can import it using the Java BOM
2) Whether you need to persist it somewhere depends on your requirements, there are certainly no technical reasons to do it.
Retrieving data ...