Reporting on Completed Jobs in a Protocol (custom component)

Please find attached a ZIP file with a protocol that contains a component for retrieving information on completed jobs on a Pipeline Pilot server. The component, named "Completed Jobs", provides the same functionality as the "Completed Jobs" report on the 

Reports > Completed Jobs 

page of the Pipeline Pilot Administration Portal.

The motivation behind the development of this component was to have a mechanism for alerting administrators or other users to protocol jobs that have resulted in an error. For use cases like this the component could be incorporated into protocols (perhaps run as Scheduled Tasks) containing downstream components that would provide feedback to an administrator or user via a web page or an email, for example. 

Some notes on the use of the component:

- in order the use the component successfully, you must first install the Python "bs4" package for scraping web pages. In order to do this, please run the 

"Install Python Packages Using Built-in Python"

protocol available in the Protocols tab of the Pipeline Pilot client. Specify "bs4" (without quotes) on the "Packages" parameter and choose a destination for the bs4 package on the "PythonPath" parameter.

The value specified on the PythonPath parameter of this protocol should be the same as the value used on the parameter of the same name on the "Completed Jobs" component.

- you must be signed into the client as a Pipeline Pilot administrator in order for this component to work properly.

- parameters on the component are dynamically updated based on previous parameter choices and may show as invalid when the "Filter By" parameter is changed. When this happens, choose new values for the invalid parameters by selecting one of the newly updated choices available, or hover over the parameter name for a tooltip message as to what type of input is expected. 

- You can choose to output either 1) raw data records, or 2) JSON output. The latter should be useful if you choose to run the protocol as a web service (e.g. via a Protocol Link).

- as with all custom subprotocol components, you can right-click on the component and choose "Save As..." to save it to your XLMDB for later use.

I have tested this component using a number of different filtering criteria, but please feel free to report any errors or odd behavior you find on this forum.