OB

Hello everybody!

I'm currently working with the version 98.1 of ARIS, and based on Dave Keaton's post(https://www.ariscommunity.com/users/ddkeaton/2016-02-08-serveradminbackupdatabase-question), also on scheduling a report to execute a daily backup of the database.

After execution, the results of the scheduling show:

The following errors occurred:

script Automatic Backup, line 32: Can't find method com.aris.modeling.server.bl.components.serveradmin.AServerAdminScriptInterface.backupDatabase(string,java.io.File).

Has somebody faced this error before, or would have any idea about it?

The code I'm implementing goes as follows. Any help is appreciated

Cheers,

Oswaldo

 

main();

function main()

{

       //Select the target folder

       var selectedFolders="C:\Users\bejarosw";

       Context.setSelectedPath(selectedFolders[0]);

       Context.setSelectedFile("Work DB"+"_"+Date());



        var sPath=Context.getSelectedPath();

        var sFile=Context.getSelectedFile();

        var oFile=new java.io.File(sPath,sFile);

        var oDatabase = "Work DB";

        var dbAdmin = Context.getComponent("ServerAdmin");

       

        if(dbAdmin.backupDatabase(oDatabase,oFile)){

            //Log backup result

            sMessage="Work DB"+" was backed up on "+new Date();

        }else{

            //Log backup result

            sMessage="Work DB"+" could not be backed up on "+new Date();

        }       

}

 

by Tricarico Romain
Posted on Thu, 09/08/2016 - 15:27

Hello,

The signature for the method is :

backupDatabase ( Database p_Database, File adbFile )

So the method is waiting for an object database, and not only the name of the database you want to backup.

If you want to save the selected database, try :

var oDatabase = ArisData.getSelectedDatabases()[0];

.....

if(dbAdmin.backupDatabase(oDatabase,oFile)){

.....

 

Hope it will help you.

Best Regards.

Romain Tricarico

www.bpmap.fr

0
by Oswaldo Bejarano Author
Posted on Thu, 09/08/2016 - 15:52

In reply to by BPMap

Hi Romain Tricarico,

Thank you very much for your help.

I included the change you mentioned, but now another error appears regarding the output of the report. What kind of output should I include in this case, and how to do it?

[Error]: The report returned no result. You may have to change the execution data.

[code]

main();

function main()

{

       //Select the target folder

       var selectedFolders="C:\Users\bejarosw";

       Context.setSelectedPath(selectedFolders[0]);

       Context.setSelectedFile("Work DB"+"_"+Date());

        var sPath=Context.getSelectedPath();

        var sFile=Context.getSelectedFile();

        var oFile=new java.io.File(sPath,sFile);

        var oDatabase = ArisData.getActiveDatabase();

        var dbAdmin = Context.getComponent("ServerAdmin");

       

        if(dbAdmin.backupDatabase(oDatabase,oFile)){

            //Log backup result

            sMessage="Work DB"+" was backed up on "+new Date();

        }else{

            //Log backup result

            sMessage="Work DB"+" could not be backed up on "+new Date();

        }       

}

[/code]

 

Best,

Oswaldo

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
  • Profile picture for user frankweise
  • Profile picture for user Henrik Buckler
  • Profile picture for user UffeK
  • SS
  • MZ
  • PacMan

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