AC

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.

by Gerald Schroeder
Posted on Fri, 02/10/2017 - 10:08

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

0
by Ori . Author
Posted on Tue, 02/14/2017 - 12:26

Many thanks Gerarld for answering, I was already using these 2 functions only I was missing this one...

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock