HoldJobPlus Resources

HoldJobPlus for Enfocus Switch supports monitoring and releasing jobs through two webhooks.  Download a sample Node.js Job Manager based on the Express framework using Pug.  With just a few minor changes, it should work with your HoldJobPlus implementation.

Download JobManager

  1. Edit app.js and set the switchPassword constant to match your webhook password if you are requiring a credential and set the port constant to match Switch’s Port for the switch Web Service.
  2. Edit views\waitingJobs.pug to edit the table columns to match your job information. The JSON response is passed to pug so all you need to do is reference the specific items you want to display as td items. (Note: be careful to maintain the indents as this is important to pug.) Remember that your custom information is included in the job.jobinformation element so if you configured an item called description you would reference it as job.jobinformation.description.
  3. Edit control.json to set switchHost to match your host name or ip address. Under jobTypes, create an entry for each instance of HoldJobPlus that has been implemented the webhook option. The value for name will appear under Job Type and the values for inquire and release should match the configured webhook paths preceded by /scripting.

To run on Windows, open a command prompt instance, set the working directory to the jobManager directory (where app.js can be found) and enter node app.js. Ctrl-C will stop the server. (I’m not sure how you do this on a Mac.)

From a browser, type in the host name or ip address and port to access the server, examples:  or http://localhost:3000

Clicking on the link under Inquiry will return a list of the currently held jobs. You can select one or more jobs and click Release Selected Jobs which will move the jobs to the outgoing connection.  Clicking a link under Release All Jobs will do just that.