Currently, there is a function isDialogSupported(), which is used, for example, in the "Create Process Manual" report (GUID2ba30bb0-5922-11df-3577-e3129f43de32):
function isDialogSupported() {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.
// 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;
}
Suggested change:
function hasDialogsObject() {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.
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;
}
Brainstorm ID | 8425 |
Created on Brainstorm | 09/07/2020 08:39 AM |