Xuse User Guide: Use-Cases
Typically a requirements project contains many use-cases. In Xuse each use-case is described in its own XML file described below.
Xuse cases are typically located below the use-case folder in the project folder structure. All use-cases could be located directly at this point, on the other hand
file systems folders may be used to arrange several related use-cases in one folder - Xuse interprets the folder structure on the local file syste
as the use-case package structure.
An Example XML based use-case is shown below:
Before examining the different parts of the XML structure in detail it is worth visualising the transformed HTML result.
Headers
Location/XPath |
Cdn. |
Description |
xuse:use-case |
1 |
Container element for the whole use-case. |
xuse:use-case/@id |
1 |
The unique identifier for the use-case. This is the identifier used elsewhere to create and association with this use-case. |
xuse:use-case/@name |
1 |
A short title for the use-case that should be descriptive such that humans find it easy to understand and reference. |
xuse:use-case/@model-version |
1 |
Version of Xuse schemas that this file conforms to. This should not need to be changed and is typically used by the upgrade tool. |
xuse:use-case/xuse:annotation |
0..* |
Container element for an annotation. |
xuse:use-case/xuse:description |
1 |
Short paragraph describing the use-case. |
xuse:use-case/xuse:document-history |
1 |
Container for the document history. The history should be updated at the end of every significant modification to the use-case. |
xuse:use-case/xuse:document-history/@current-version |
1 |
The current version number for the use-case. |
xuse:use-case/xuse:document-history/@current-version |
1 |
The current version number for the use-case. |
xuse:use-case/xuse:document-history/xuse:version |
1..* |
Container element for the details of a particular use-modification. |
xuse:use-case/xuse:document-history/xuse:version/xuse:revision |
1 |
Number representing the revision number for the version. |
xuse:use-case/xuse:document-history/xuse:version/xuse:author |
1 |
Name of the author responsible for this revision of the use-case. |
xuse:use-case/xuse:document-history/xuse:version/xuse:change-date |
1 |
Date associated with this revision of the use-case. |
xuse:use-case/xuse:document-history/xuse:version/xuse:description |
1 |
Description of the changes made. |
Properties
Location/XPath |
Cdn. |
Description |
xuse:use-case/xuse:use-case-properties |
1 |
Container element for the properties of this use-case. |
xuse:use-case/xuse:annotation |
0..* |
Container element for an annotation. |
xuse:use-case/xuse:use-case-properties/xuse:trigger |
1 |
Description of the trigger event that initiates the use-case flow of events. |
xuse:use-case/xuse:use-case-properties/xuse:goal |
1 |
Description of the purpose of the use-case. |
xuse:use-case/xuse:use-case-properties/xuse:primary-actor |
1 |
Reference to the actor that initiates the use-case. This is of the form <xuse:primary-actor refId="ref"/> |
xuse:use-case/xuse:use-case-properties/xuse:secondary-actor |
0..* |
Reference to secondary actors that are involved in fulfilling the use-case. This is of the form <xuse:secondary-actor refId="ref"/> |
xuse:use-case/xuse:use-case-properties/xuse:pre-requisites |
1 |
Description of the pre-requistites necessary before this use-case flow can be executed. |
xuse:use-case/xuse:use-case-properties/xuse:success-outcome |
1 |
Description of the outcome if the use-case completes normally. |
xuse:use-case/xuse:use-case-properties/xuse:failure-outcome |
1 |
Description of the outcome if the use-case does not completes normally. |
xuse:use-case/xuse:use-case-properties/xuse:priority |
1 |
Measure of the priority of the use-case from the perspective of the customer. Typically this is useful to plan the order in which use-cases should be realised by project releases. |
xuse:use-case/xuse:use-case-properties/xuse:complexity |
1 |
Measure of the complexity of the use-case from the perspective of the customer. Typically this is useful to plan the order in which use-cases should be realised by project releases as well as understanding how much effort will be involved. |
Main Flow
Location/XPath |
Cdn. |
Description |
xuse:use-case/xuse:main-flow |
1 |
Container element for the properties of this use-case. |
xuse:use-case/xuse:main-flow/xuse:annotation |
0..* |
Container element for an annotation. |
xuse:use-case/xuse:main-flow/xuse:step |
1..* |
See the use-case step section for details. |
xuse:use-case/xuse:main-flow/xuse:end |
1 |
Indicates the end of the main flow and use-case. |
Alternate and exception flows
Alternate flow
Location/XPath |
Cdn. |
Description |
xuse:use-case/xuse:alternate-flows |
1 |
Container element for the properties of this use-case. |
xuse:use-case/xuse:alternate-flows/xuse:alternate-flow |
1..* |
Container element for an alternate flow. |
xuse:use-case/xuse:alternate-flows/xuse:alternate-flow/xuse:annotation |
0..* |
Container element for an annotation. |
xuse:use-case/xuse:alternate-flows/xuse:alternate-flow/xuse:step |
1..* |
See the use-case step section for details. |
xuse:use-case/xuse:alternate-flows/xuse:alternate-flow/xuse:end |
0..1 |
Indicates the end of the alternate flow and use-case. Note this cannot be used if <xuse:rejoin/> is used. |
xuse:use-case/xuse:alternate-flows/xuse:alternate-flow/xuse:rejoin/@at-step |
0..1 |
Reference to the step in the main/basic flow at which the flow is meant to continue with. This is of the form <xuse:rejoin at-step="step-id-ref"/> . Note this cannot be used if <xuse:end/> is used. |
Exception flow
Location/XPath |
Cdn. |
Description |
xuse:use-case/xuse:exception-flows |
1 |
Container element for the properties of this use-case. |
xuse:use-case/xuse:exception-flows/xuse:exception-flow |
1..* |
Container element for an exception flow. |
xuse:use-case/xuse:exception-flows/xuse:exception-flow/xuse:annotation |
0..* |
Container element for an annotation. |
xuse:use-case/xuse:exception-flows/xuse:exception-flow/xuse:step |
1..* |
See the use-case step section for details. |
xuse:use-case/xuse:exception-flows/xuse:exception-flow/xuse:end |
1 |
Indicates the end of the exception flow and use-case. Because this is an exception flow it is not possible to rejoin the main flow of events. |
Use-case step
Location/XPath |
Cdn. |
Description |
[root-path]/xuse:step/@step-id |
1 |
Unique identifier for the use-case step (this has to be unique within the use-case rather than the project). This is used for use-case step cross referencing but is typically not displayed in output documents. |
[root-path]/xuse:step/xuse:annotation |
0..* |
Container element for an annotation. |
[root-path]/xuse:step/xuse:description |
1 |
Description for the use case step. Note reference to specific requirements and other use-cases is typical for a use-case step such that the narural language of the use-case flow is not interrupted by formal requirements. |
[root-path]/xuse:step/xuse:release-reference |
0..1 |
Reference to the project release where this step will be implemented. Note this is a place-holder for future functionality. |
[root-path]/xuse:step/xuse:ref-alternate-flow |
0..* |
Reference to alternate flows that may be invoked from this step. |
[root-path]/xuse:step/xuse:ref-alternate-flow/@refId |
1 |
Identifier for the alternate flow that is invoked from this step. |
[root-path]/xuse:step/xuse:ref-alternate-flow/@condition |
1 |
Description of the condition whereby the alternate flow is invoked. |
[root-path]/xuse:step/xuse:ref-exception-flow |
0..* |
Reference to exception flows that may be invoked from this step. |
[root-path]/xuse:step/xuse:ref-exception-flow/@refId |
1 |
Identifier for the exception flow that is invoked from this step. |
[root-path]/xuse:step/xuse:ref-exception-flow/@condition |
1 |
Description of the condition whereby the exception flow is invoked. |