7.11 Definition block for usecase scripts

Each usecase definition block must begin with a USECASE header line to define the start of a usecase. Without the header, DS-5 does not recognize the script as a usecase script.

Tags describe the content of a usecase. Each tag is surrounded by dollar ($) signs to distinguish them from any other text. All tags are defined $<tag>$ <value> with the exception of the $Help$ tag. If a tag is defined in the usecase definition block it can only be present once. Duplicate names of tags are not accepted in a single usecase.
Only the $Run$ tag which describes the entry point or main method to the usecase needs to be defined for a valid usecase. To report meaningful help when searching for usecase scripts on the DS-5 command-line, it is recommended that you also define the $Title$ and $Description$ tags in each usecase.

Run

The $Run$ tag specifies the name of the entry point to a single usecase. When you run a usecase on the command line, it calls the method with the $Run$ tag. For details of how to define the entry point, and how to supply additional arguments to the method, see 7.12 Defining the Run method for usecase scripts.

Example 7-1 Examples

...
$Run$ mainMethod
...

Title

The $Title$ tag specifies the title in a usecase definition block. This is a single line string which is the title of this usecase script and is displayed when searching for usecase scripts on the command-line.

Example 7-2 Examples

...
$Title$ Usecase Title
...

Description

The $Description$ tag specifies the description in a usecase definition block. This is a single line string which is the description of this usecase and is displayed when searching for usecase scripts on the command-line.

Example 7-3 Examples

...
$Description$ A brief description of this usecase
...

Options

The $Options$ tag specifies a method within the usecase script, which can be called to retrieve a list of options. For a description of how to define the options function, and how to construct a list of options, see 7.13 Defining the Options for usecase scripts.

Example 7-4 Examples

...
$Options$ myOptions
...

Validation

The $Validation$ tag specifies the validation method in the usecase definition block. You must specify this to validate the options provided when the script is run. For a description of how to define the validation function, see 7.14 Defining the Validation method for usecase scripts.

Example 7-5 Examples

...
$Validation$ myValidation
...

Help

The use of $Help$ tags is slightly different from the use of other tags. The $Help$ tag enables writing a multiline block of text, which appears in the output when a user requests help about the usecase script. This can be used to provide usage description, parameters for the usecase scripts, or a more verbose help text.
To define a block of help text, enclose the block in $Help$ tags. Formatting, such as new lines and spaces are preserved in the $Help$ block. Everything, including the definition of other tags, are consumed within a $Help$ block. The $Help$ block must be completed before other tags or code is defined.

Example 7-6 Examples

$Help$
This is part of the help text
...
$Help$
Non-ConfidentialPDF file icon PDF versionARM DUI0446W
Copyright © 2010-2015 ARM. All rights reserved.