Live Publishing

Server Scheduler Action Example 

Automated updates from IOK using auto-refresh

This example page describes how to configure an Scheduler XML Action to publish an auto-refreshing .IOK file with updated data from an IOK data source held centraly, i.e. a server-based IOK 'datamart' source. This XML Action example demonstrates the procedure needed for live data publishing, where a changing data source is available only behind closed doors on a server, and the end user only has access to a web-hosted Omniscope 'datamart' file, rather than adding load to the transactional databases.  We call this use case scenario 'self-sourced publishing'. 

The downloadable file pack includes a "Refresh and publish.xml" XML Action with full comments in the XML source. To get started, download this example file pack .ZIP file:

 Self-sourced publishing example

and extract as "C:\Self-sourced publishing example\".

Note: In general, XML Actions are normally be edited in this way, and are executed by the Scheduler, either from the Watch Folder, or on-demand using a Scheduler Task List command.

How it works

In this XML action there are 3 path locations of note:
  1. The "internal master" - an IOK file containing the master configuration (views, layout) linked to the internal data source. Not publicly available, as it may contain database passwords, etc.
  2. The "public URL" - a location that end users download the IOK file from, such as "http://www.mysite.com/files/Report.iok".
  3. The "upload location" - an internal location accessible only to the server and usually not to end users, to which the public file is uploaded. This is a write-capable equivalent of the "public URL". Typically this might be the file path to the file behind the "public URL" within the web root folder on the http server. For example, "C:\www-mysite-com\httpdocs\files\Report.iok".

The XML action does the following:

  1. Refresh the "internal master" IOK file from the internal data source, and save
  2. Reconfigure the data source as the "public URL", clearing the action history
  3. Enable automatic refresh, both on open, and in the background once open
  4. Publish to the "upload location"

Results

After executing this action, you will have:

  • An updated internal master file
  • An updated public file available for end users from the "public URL"
  • The public file will automatically reload data from the public URL on open and in the background
  • The end user can now save a local copy of the file, perhaps with different views, which will continue to refresh data automatically from the public URL, even in the free Viewer if the Enterprise server is so licensed.

Testing / demonstration

To demonstrate this procedure in action using the sample files from the pack, we use the Enterprise Scheduler's Watch Folder feature to execute the action as described below.

1) Check the action works

- simulate data changing by editing the CSV file
- drop the XML action into the watch folder
- check the internal master IOK has the updated data but retains its formulas
- check the external file has the updated data and retains its formulas, leaving Omniscope open, without any prompts

(2) Check live refresh works in the external file

- simulate data changing by editing the CSV file
- drop the XML action into the watch folder
- check the external file refreshes automatically, without any prompts

(3) Check refresh on open works in a local user copy

- simulate a "local user copy" by opening the external file, creating a different view configuration,
and saving as a different file with HOLD pressed. Close the file.
- simulate data changing by editing the CSV file
- drop the XML action into the watch folder
- open the local user copy and check it refreshes on open

(4) Check live refresh works in the local user copy

- In the local user file, un-press the HOLD button, and leave the file open
- simulate data changing by editing the CSV file
- drop the XML action into the watch folder
- check the local user file file refreshes automatically, without any prompts