Generating a GUID/UUID in KRL
Is there a built-in function in KRL for generating a GUID of 开发者_如何转开发UUID (or something similar)?
I've created a module that wraps a webservice that might hold you over: UUID Module
Use like so:
ruleset a8x165 {
meta {
name "UUID Module Example"
description <<
Example use of the UUID Module
>>
author "Sam Curren"
logging off
use module a8x164 alias uuid
}
dispatch {}
global {}
rule first_rule {
select when pageview ".*" setting ()
pre {
testuuid = uuid:new_uuid();
}
notify("Hello World", "This is a UUID: #{testuuid}");
}
}
精彩评论