Hi,
I'm making a report to refresh every day a DB in the Business Publisher Server.
It works fine but I can't find the way to read the messages of the result.
Short Code:
publisher = Context.getComponent("BusinessPublisher");
readonlyDB = ArisData.openDatabase(BD_NAME, true);
infoUpdate = publisher.updateExport(readonlyDB, PUBLISHER_SERVER, EXPORTATION_BD_NAME);
var foo = infoUpdate.getMsgs();
The problem is the result of "getMsgs()" (Collection <Message>) in the "Report class BPExportResult"
foo.get(0) // Output: com.aris.modeling.common.core.progress.Message@7a88b227
foo.get(1) // Output: com.aris.modeling.common.core.progress.Message@475dd97f
foo.get(2) // Output: com.aris.modeling.common.core.progress.Message@2ba43e2c
How can I read this messages ? :S
Many Thanks.
Hello Ori,
don't know actual something about getMsgs();
but I use the following commands to get duration and success of the Publisher-Update:
aResult= publisher.updateExport(someparameters):
var aOutput = Context.createOutputObject(Constants.OutputTXT, aFileName);
aOutput.OutputLn("Duration=" + aResult.getDuration() ,"Tahoma",18,0,-1,1,0);
aOutput.OutputLn("Success=" + aResult.isSuccessfull() ,"Tahoma",18,0,-1,1,0);
.... and then write it in a file like this:
aOutput.WriteReport();
var oData = Context.getFile (sFileName, Constants.LOCATION_OUTPUT);
var dir = new java.io.File(aFolder).mkdirs();
var oFile = new java.io.File(aFolder+aFileName);
var oOS = new java.io.FileOutputStream(oFile);
if (oData!=null) {
oOS.write(oData);
oOS.close();
}
Best regards
Gerald