Understanding Wizards

Wizards provide the entry point for Squore users to create and edit projects and meta-projects. A model can have one or more wizards, depending on the options that a Squore administrator decides to display to end-users when they create projects. This is achieved by editing the file Bundle.xml located in the Wizards folder inside a particular model.

Creating or editing a project in Squore involves going through these three steps after selecting a wizard:

  1. Project Attributes Specification
  2. Repository Configuration and Data Provider Selection (or project selection when creating a meta-project)
  3. Project Summary and Confirmation

Note: When editing projects, the Data Provider Selection screen is shown or hidden depending on the ability of each Data Provider selected originally to accept new settings. When nothing can be changed, the step is skipped completely.

The syntax of a Bundle.xml file offering one standard wizard and one meta-project wizard to the user is shown below:

<?xml version="1.0" encoding="UTF-8"?>
<Bundle>
	<!-- attributes common to every wizard in this bundle -->
	<tags>
		<tag type="numericValue" name="Project Business Value" 
		measureId="BV" suffix = "FP" defaultValue="0" />
	</tags> 
	<wizard 
	  wizardId="STD_PROJ"
	  versionPattern="V#N1#" 
	  autoBaseline="false" 
	  users="demo;admin" groups="users"
	  img="wizardicon.png">
		<!-- attributes specific to this wizard -->
		<tags>
			<tag type="numericValue" name="Project Cost" measureId="COST" 
			  suffix = "M/M" defaultValue="0" />
		</tags>
		<repositories all="true" hide="false">
			<repository name="FROMPATH" checkedInUi="true">
				<param name="path" value="/media/sources/" />
			</repository>
		</repositories>
		<tools all="true">
			<tool name="SQuORE" optional="false">
				<param name="languages" 
				    value="cpp:.c,.C,.h,.H;java:.java;csharp:.cs;"
				    availableChoices="cpp;java;csharp" />
			</tool>
			<tool name="Antic_auto" 
			    optional="true"
			    checkedInUI="true"
			    projectStatusOnFailure="warning" />
		</tools>
	</wizard>
	<wizard wizardId="STD_META_PROJECTS" projectsSelection="true" />
</Bundle>

In order for a wizard to appear in Squore, you need to define its ID, default version pattern and icon, and it will become available when clicking on the New Project... button. Note that the availability of a wizard can also be restricted to a set of users or groups. The rest of this chapter covers the settings available for each step of the project creation wizard.

The wizard element accepts the following attributes:

Note

The users and groups attributes are only used to filter the list of wizards in the web interface. This does not prevent users from creating projects using the wizard from the command line.

Tip

The versionPattern parameter allows specifying a pattern to create the version name automatically for every analysis. It supports the following syntax:

  • #N#: A number that is automatically incremented

  • #Nn#: A number that is automatically incremented using n digits

  • #Y2#: The current year in 2-digit format

  • #Y4#: The current year in 4-digit format

  • #M#: The current month in two digit format

  • #D#: The current day in two digit format

  • #H#: The current hour in 24 hour format

  • #MN#: The current minute in two digit format

  • #S#: The current second in two digit format

Any character other than # is allowed in the pattern. As an example, if you want to produce versions labelled build-198.2013-07-28_13h07m (where 198 is an auto-incremented number and the date and time are the timestamp of the project creation), you would use the pattern: build-#N3#.#Y4#-#M#-#D#_#H#h#MN#m