Skip to Main Content
ARIS - SHARE YOUR IDEAS
How can we make ARIS better?
Status Open for voting
Created by Jörg Neves Bliesener
Created on Mar 22, 2022

Change Dialog availability detection in ARIS reports

Currently, there is a function isDialogSupported(), which is used, for example, in the "Create Process Manual" report (GUID2ba30bb0-5922-11df-3577-e3129f43de32):

function isDialogSupported() {
// Dialog support depends on script runtime environment (STD resp. BP, TC)
    var env = Context.getEnvironment();
    if (env.equals(Constants.ENVIRONMENT_STD)) return true;
    if (env.equals(Constants.ENVIRONMENT_TC)) return SHOW_DIALOGS_IN_CONNECT;
    return false;
}
This function merely checks the environment in which the process is running, but does not check whether the Dialogs object actually is available. This prohibits calling the report from within other reports, when the environment is ENVIRONMENT_STD, but no Dialogs object is available.

Suggested change:

function hasDialogsObject() {
    try {
        // check if Dialogs exists
        var f = Object.keys(Dialogs);
        return true;
    }
    catch (ex) {
        return false;
    }
}
function isDialogSupported() {
// Dialog support depends on script runtime environment (STD resp. BP, TC)
    var env = Context.getEnvironment();
    if (env.equals(Constants.ENVIRONMENT_STD)) return hasDialogsObject();
    if (env.equals(Constants.ENVIRONMENT_TC)) return SHOW_DIALOGS_IN_CONNECT && hasDialogsObject;
    return false;
}
Specifically, I need to post-process the PDF file created with the "Create Process Manual" (or any other) report and output it as a Base64 formatted string in an XML file.

Brainstorm ID 8425
Created on Brainstorm 09/07/2020 08:39 AM