Task Cancelation Utility

From Hornbill
Jump to navigation Jump to search

About the Hornbill Task Cancelation Utility

The utility provides a simple way to either cancel or remove tasks from within the Hornbill Collaboration Tool. The tool is designed to run behind your corporate firewall, and requires access to your Hornbill instance.

The tool connects to your Hornbill instance in the cloud over HTTPS/SSL, so as long as you have standard internet access then you should be able to use the tool without the need to make any firewall configuration changes.

When the tool is executed, depending on configuration, a list of tasks will be cancelled or removed.

Open Source

The Hornbill Service Manager Request Import Utility is provided open source under the Hornbill Community Licence and can be found Here on GitHub

Installation Overview

Windows Installation

  • Download the OS and architecture specific ZIP archive
  • Extract zip into a folder you would like the application to run from e.g. C:\data\
  • Open a Command Line Prompt as Administrator
  • Change Directory to the folder containing the utility C:\data\
  • Determine the appropriate executable and possibly rename it to remove confusion.
  • Run the command relevant to the OS of the machine you are running this on:

Windows: Hornbill_Task_Canceller.exe -instance=testinstance -api=abc...def -listfile=C:\data\tasks.csv

Hornbill_Task_Canceller.exe -instance=testinstance -api=abc...def -taskref=TSK1234567

Configuration Overview

If a configuration file is not specified as a command line argument when executing the tool, then a default configuration file named conf.json, containing the correct JSON, must exist. The following configuration file contains the configuration elements required when importing request data:

What do I put in the Configuration file?

Command Line Parameters

  • instance - Name of the Hornbill instance to connect to
  • api - the API Key to use to connect to the aforementioned instance
  • taskref - allows for the cancelation of a single task
  • listfile - path to text file with a list of task references to cancel. One task reference per line.
  • dryrun - dryrun set to true will not action anything, just provide you with a summary of intent.

HTTP Proxies

If you use a proxy for all of your internet traffic, the HTTP_PROXY Environment variable needs to be set. The https_proxy environment variable holds the hostname or IP address of your proxy server. It is a standard environment variable and like any such variable, the specific steps you use to set it depends on your operating system.

For windows machines, it can be set from the command line using the following:
set HTTP_PROXY=HOST:PORT
Where "HOST" is the IP address or host name of your Proxy Server and "PORT" is the specific port number.

Testing Overview

The -dryrun option will give a summary of the intended action.

Logging Overview

No logging apart from a summary at the end and errors/issues will be reflected in the command terminal

Trouble Shooting

Common Error Messages

Below are some common errors that you may encounter in the log file and what they mean:

  • [ERROR] Error Decoding Configuration File:..... - this will be typically due to a missing quote (") or comma (,) somewhere in the configuration file. This is where an online JSON viewer/validator can come in handy rather than trawling the conf file looking for that proverbial needle in a haystack.

Error Codes

  • 102 - Unable to Load Configuration File