JavaScript triggering an IronPython Script on load of analysis does not execute In Automation Services

JavaScript triggering an IronPython Script on load of analysis does not execute In Automation Services

book

Article ID: KB0079440

calendar_today

Updated On:

Products Versions
Spotfire Automation Services All Versions

Description

If you have JavaScript that triggers on load of analysis to execute an IronPython script, this will not execute during the Automation Services "Open Analysis from Library" job. This is because the $(document).ready depends on the UI HTML document being ready. When in Automation Services the application runs headless, and any UI events (such as this) will not be run.
 

Issue/Introduction

JavaScript triggering a IronPython Script on load of analysis does not execute during the Automation Services "Open Analysis from Library" job

Resolution

The workaround for this is as follows:

1). Create a Document Property and attach the IronPython script to execute on Document Property change.
2). In the "Open Analysis from Library" job , in configuration block set the document property created in the previous step to any value different than the current value saved in Step 1. For example:
documentProperty=Value1;
3). This will now trigger the IronPython script to execute upon opening of the analysis using Automation services.

Additional Information

Doc: How to execute a script on property change Wiki: How to create Configuration Block