Difference between revisions of "Task Cancelation Utility"

From Hornbill
Jump to navigation Jump to search
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
=About the Hornbill Task Cancelation Utility=
 
=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 utility provides a simple way to either cancel 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.
 
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.
+
When the tool is executed, depending on configuration, a list of tasks will be cancelled.
  
 
==Open Source==
 
==Open Source==
Line 15: Line 15:
 
===Windows Installation===
 
===Windows Installation===
  
* Download the OS and architecture specific [https://github.com/hornbill/goSimpleListImport/releases/latest ZIP archive]
+
* Download the OS and architecture specific [https://github.com/hornbill/goHornbillTaskCanceller/releases/latest ZIP archive]
 
* Extract zip into a folder you would like the application to run from e.g. '''C:\data\'''
 
* Extract zip into a folder you would like the application to run from e.g. '''C:\data\'''
* Open '''conf.json''' and add in the necessary configuration
 
 
* Open a Command Line Prompt as Administrator
 
* Open a Command Line Prompt as Administrator
 
* Change Directory to the folder containing the utility '''C:\data\'''
 
* Change Directory to the folder containing the utility '''C:\data\'''
Line 24: Line 23:
  
 
Windows:
 
Windows:
<code>
 
Hornbill_Task_Canceller.exe -listfile=C:\data\tasks.csv
 
</code>
 
  
 
<code>
 
<code>
Hornbill_Task_Canceller.exe -taskref=TSK1234567
+
taskCanceller.exe -instance=testinstance -api=abc...def -listfile=C:\data\tasks.csv
 
</code>
 
</code>
  
==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:
 
 
==Example Configuration file==
 
 
<code>
 
<code>
  "InstanceID": "my_instance",
+
taskCanceller.exe -instance=testinstance -api=abc...def -taskref=TSK1234567
  "APIKey": "123...def",
 
 
</code>
 
</code>
  
==What do I put in the Configuration file?==
+
=Command Line Parameters=
  
===Configuration===
+
* instance - Name of the Hornbill instance to connect to
* '''InstanceID''' - This is the name of your Hornbill instance and can be found within the URL you use to navigate to it: live.hornbill.com/['''''instance name''''']/. This value is case sensitive.
+
* api - the API Key to use to connect to the aforementioned instance
* '''APIKey''' - This is an API Key with which the tool will cancel the task(s).
+
* 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.
 +
* delete - Set to true to delete the task(s), defaults to false and the cancellation of the task(s)
  
==Command Line Parameters==
+
= API Key Rules =
 +
This utility uses either ([[API keys]]):
  
* conf - Defaults to `conf.json` - Name of the Configuration file to load
+
* task:taskCancel
* taskref - allows for the cancelation of a single task
+
* task:taskDelete
* listfile - path to text file with a list of task references to cancel. One task reference per line.
 
  
 +
=Troubleshooting=
 
== HTTP Proxies ==
 
== HTTP Proxies ==
  
Line 65: Line 58:
 
<br>
 
<br>
 
Where "HOST" is the IP address or host name of your Proxy Server and "PORT" is the specific port number.
 
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==
 
==Logging Overview==
Line 74: Line 63:
 
No logging apart from a summary at the end and errors/issues will be reflected in the command terminal
 
No logging apart from a summary at the end and errors/issues will be reflected in the command terminal
  
==Trouble Shooting==
+
=Extras=
 
 
===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 ===
+
Bundled with the app is a file '''open-tasks-on-cancelled-requests.report.txt''' which is a Service Manager report export which can be imported to identify orphaned tasks (i.e. live tasks which connected to cancelled requests).
* '''102''' - Unable to Load Configuration File
 
  
 
[[Category:Integration]]
 
[[Category:Integration]]

Latest revision as of 15:10, 24 September 2021

About the Hornbill Task Cancelation Utility

The utility provides a simple way to either cancel 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.

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:

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

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

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.
  • delete - Set to true to delete the task(s), defaults to false and the cancellation of the task(s)

API Key Rules

This utility uses either (API keys):

  • task:taskCancel
  • task:taskDelete

Troubleshooting

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.

Logging Overview

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

Extras

Bundled with the app is a file open-tasks-on-cancelled-requests.report.txt which is a Service Manager report export which can be imported to identify orphaned tasks (i.e. live tasks which connected to cancelled requests).