ARIS Community - We Love BPM

getDecryptedScheduleResult without GUID

egambrell's picture
by Ellen Gambrell Pelletier in Reports & Macros posted on 2017-03-06

Hi -

I already have a report that pulls the scheduled report results and generates an Excel file on a shared drive:

        var reportScheduler = Context.getComponent("ReportScheduler");
        var aByteArrayResult = reportScheduler.getDecryptedScheduleResult("scheduledReportGUID", "username", "password", false);
        var aSelectedFile = reportScheduler.getZipEntries(aByteArrayResult);
        var aByteArrayXLSX = null;
        for (var i in aSelectedFile) {
            if (aSelectedFile[i].getName().equals("OutputFile.xlsx")) {
                aByteArrayXLSX = aSelectedFile[i].getData();
        var outputFile = new + "\\OutputFile.xlsx");
        var fop = new;
        if (!outputFile.exists()) {

This is working great for a single database, but I need to be able to set this up for multiple databases nightly. Is there a way to get to the scheduled report without needing the GUID? Since the scheduled report GUID is completely different from the report GUID, I need to hard code in the scheduled report GUID within the report.

This creates a problem - if I have to get the scheduled report GUID via the database names, they could change and it could break. And if for some reason the scheduled report gets removed and set up a 2nd time, it will also break.

Sorry there are no tags
There are no attachments
Robert Goldenbaum posted on 2017-03-07

HI Ellen,

sorry, don't know about the scheduled report without GUID, but you could use an XML file with the GUIDs in it as a work around. Then you just have to add the GUID there without changing your script...

BR Robert

Ellen Gambrell Pelletier posted on 2017-03-13

Hi Robert - It is another option, but it still leads to the same problem. The idea is for the report to import content and then export out an update afterward. I need my end users to be able to schedule the report and not be required to grab the GUID and plug it in anywhere.