External Tools

Squore uses a menus folder in its configuration so you can add functionality that will be available in the user interface to run external tools (since 14-A). These external scripts are launched in Squore Server's context, and can therefore benefit from Squore's authentication and permission mechanism. They are launched from the web interface via a Tools menu visible to the users whose profile grants access to the Use External Tools feature.

Each external tool is defined within its own sub-folder in menus and appears as a link in the main Squore toolbar, as shown below:

A Tools menu containing an external tool to create a demo environment, and the associated page to configure and launch the script.

The menu in the image above was added using the following form.xml:

<INSTALLDIR>/configuration/menus/CreateDemo/form.xml:
<?xml version="1.0" encoding="UTF-8"?>
<tags name="Create Demo" baseName="CreateDemo" multiUsers="false" users="demo;admin" image="earth.png">
	<tag type="multipleChoice" changeable="true" displayType="comboBox" name="Demo:" key="demo" defaultValue="TD_JAVA" >
		<value key="ISO9126" name="ISO9126 -- C" />
		<value key="RISK" name="Risk Index -- C" />
		<value key="RISK" name="Risk Index -- Java" />
		<value key="TD" name="Technical Debt -- Java" />
	</tag>		
	<tag type="booleanChoice" changeable="true" name="Create Users:" key="create_users" defaultValue="false"/>	
	<tag type="multipleChoice" changeable="true" displayType="radioButton" name="" key="useAccountCredentials" 
		defaultValue="USE_ACCOUNT_CREDENTIALS" credentialType="USE_ACCOUNT_CREDENTIALS">
		<value key="NO_CREDENTIALS" name="No credentials" />
		<value key="USE_ACCOUNT_CREDENTIALS" name="Use my SQuORE credentials" />
		<value key="PERSONAL_CREDENTIALS" name="Define credentials" />
	</tag>	
	<tag type="text" changeable="true" name="Username: " key="username" defaultValue="" credentialType="LOGIN" />
	<tag type="password" changeable="true" name="Password: " key="password" defaultValue="" credentialType="PASSWORD" />
</tags>

The tags element accepts the following attributes:

You can then add a series of tag elements that follow the same specification as the one described in the section called “Attributes” to use as parameters on your custom page, with two extra types available:

The following variables are injected in the script execute.tcl before execution: