Home > Uncategorized > How to Generate a GUID in an XAction

How to Generate a GUID in an XAction

I needed to uniquely identify a request to Pentaho (one particular action sequence request). Found a pretty darn easy way to do this with the help from Java RMI classes.

- Insert a Javascript data source

200805011651

- Enter the following script

function getGUID() {
var VMID = new Packages.java.rmi.dgc.VMID();
return VMID.toString();
}
getGUID();

- Set return type as “string” for a new value

200805011650-1

- Add it to your response

200805011652

200805011653

- Enjoy your GUIDs!
cef9372c035a42ed:-b0917ee:119a6d47d72:-7ff4
cef9372c035a42ed:-b0917ee:119a6d47d72:-7ff3
cef9372c035a42ed:-b0917ee:119a6d47d72:-7ff2

PS - I personally hate GUIDs when stored in the database. :) However, for matching up with a particular request, yippeee!!

Uncategorized

  1. J. Daniels
    July 2nd, 2008 at 05:24 | #1

    wow, this tell me squat. How about an explanation of what you are talking about, how it works, how to do it. Geek talk is useless

  2. March 1st, 2009 at 15:00 | #2

    wasn’t there a new release for this?

  3. Trarsescuse
    August 29th, 2009 at 23:39 | #3

    Hi,

    visit my blog: http://fundus.blog.de
    no spam!!!! if you report my blog at my hoster, you will die!!!!

    please visit us!!

  1. No trackbacks yet.