PROTOCOL PROGRESS WHEN RUN FROM WEB PAGE

Name: PROTOCOL PROGRESS MONITORING

Author: Mike Cherry

Requirements: Pipeline Pilot 8.5 or later

O/S: Windows and Linux

Limitations: tested on IE and Firefox

Pipe numbers in the Pipeline Pilot professional client provide a clear and simple representation of the progress of a running protocol. When running a protocol from a web page progress is less evident and indeed with long running protocols it can be difficult to know if any progress is being made at all. Attached are two protocols, a form protocol and a work protocol, that demonstrate a mechanism to report progress back to the original form page as the work protocol is running.

Please note that an earlier forum discussion outlined other mechanisms including the use of the pilotscript "SendMessageToClient" function, use of RSS feeds, writing log files and use of email

(https://community.accelrys.com/thread/4544?tstart=15). SendMessageToClient will work from the PP client and webport, the attached approach should work in webport but also from a web page, if you load the FORM protocol into the pro-client and run it, then click submit you should see the progress message displayed in the browser.

The mechanism works as follows:

1. In the FORM protocol a DIV is created on the page to hold progress information, this progress message DIV is initially hidden.

1. When you click the SUBMIT button an onsubmit event is called that runs some javacript.

2. The javascript first defines parameters for the progress message DIV and then displays that DIV.

3. A HTML file is created in the jobdir of the form protocol, an initial message is written to this HTML file and then the progress message is updated with this HTML (the initial message is "SUBMITTING PROTOCOL" but you can change this by modifying the HTML)

4. The javascript then starts a loop which updates the progress message DIV with the contents of the HTML file every X miliseconds (change the setTimeout parameters to change the interval).

5. In the WORK protocol when you want to report progress back to the form page you simply update the contents of the HTML file, the location for this file is passed from the form to the work protocol as an additional parameter in the INPUT FORM component.

In the example attached the WORK protocol starts with an immediate update to the HTML to tell the user that the protocol is executing. Then in the next pipe a run to completion subprotocol is used to update the HTML for every record that passes down the pipe giving you in the form page a better representation of what is happening in the WORK protocol. Simply update the HTML at any point in your WORK protocol with an appropriate message to let the end user know what is happening.

Note: you will need to save the protocols to a folder and modify the INPUT FORM component to point to the location of the WORK protocol and if you want to use these in webport then you also need to modify the IMPLEMENTATION tab form protocol parameter on the WORK protocol.