Generating Unique Identifier in SOA

To generate unique identifier in SOA, you can use the below in Java Embedding activity

 try{                               
    java.lang.String varGUID =  ""+java.time.LocalDate.now()+java.time.LocalTime.now();
    varGUID=varGUID.replace("-","").replace(":","").replace(".","");
    setVariableData("VarGUID",varGUID);  
    addAuditTrailEntry("GUID: "+varGUID);    
}                          
catch(Exception ex){                          
    addAuditTrailEntry("Error in generating GUID");
}

 

 

Or use the below in assign activity

translate(string(xp20:current-dateTime()),'-:T+.','')

Comments