Hi All,
I'm extracting some info from the promotion request object (from
workflow - using the code below) however I couldn't find how to extract
the name of Initiator and approvers.
can you assist how to achieve this ?
Thanks
Rami
// Define a task to get object attributes
//String myOutputFile= "G:/temp/eli_out.txt";
String myOutputFile= "K:/Pro_stds/Mcad_Shadow/In/shadow_out_";
java.util.Date date = new java.util.Date();
java.text.SimpleDateFormat formatter = new
java.text.SimpleDateFormat("ddMMyyHHmmss");
java.lang.String s = formatter.format(date);
//define the locale to be used later
java.util.Locale myLocale=new java.util.Locale ("en",",");
// Get the promotion notice items
wt.maturity.PromotionNotice pn =
(wt.maturity.PromotionNotice)primaryBusinessObject;
wt.fc.QueryResult items =
wt.maturity.MaturityHelper.service.getBaselineItems(pn);
//System.out.println("eli test");
int i = 0;
int indx=aCounter;
System.out.println("indx="+indx);
//open the file
java.io.FileWriter myFileWriter = new java.io.FileWriter(myOutputFile +
s + ".txt");
//myFileWriter.write("test \n");
//myFileWriter.write("Today is " + date + "\n");
//myFileWriter.write("Today is " + s + "\n");
while (items.hasMoreElements()) {
wt.fc.WTObject item = (wt.fc.WTObject) items.nextElement();
anItem=null;
// Check the class of the Object
System.out.println("i="+i+" indx="+indx);
String classItm = item.getClass().getName();
System.out.println("classItm="+classItm);
wt.util.LocalizableMessage elilocal =
item.getDisplayIdentifier();
String eliname = elilocal.getLocalizedMessage(myLocale);
System.out.println("eliname ="+eliname );
myFileWriter.write(eliname);
myFileWriter.write("\n");
anItem = item;
if (i == indx) break;
i++;
}
aCounter--;
myFileWriter.flush();
myFileWriter.close();