S-CASE Blog | Requirements Modeling

Requirements Modeling

The user of S-CASE can add software requirements in the following formats:

  • Functional requirements in textual form;
  • Graphical storyboards; and
  • UML diagrams in the form of images.

The following sections provide an overview of inserting and annotating requirements for an S-CASE project.

Modeling Functional Requirements

Adding and Modifying Requirements

Functional Requirements are created and annotated using the Requirements Editor Eclipse plugin. To create a new rqs file, the user can either select the Create requirements dashboard button or open the File menu and then New and select the Requirements Editor fileoption.

Upon following the steps of the wizard to create a new rqs file in the project, the user may add the functional requirements in text form in the first page of the Requirements Editor, as shown in the following screenshot.

Drawing

The user can add a new requirement by pressing the plus button.

Requirements can also be deleted, using the delete button, or modified, using the modify button. Note than if a requirement is deleted or modified, the corresponding annotations of the requirement are also deleted. Finally, requirements can be moved down or up using the downand up buttons.

Viewing and Modifying Annotations

Annotations can be viewed and modified in the second page of the Requirements Editor. An example showing an annotated requirements file is shown in the following screenshot.

Drawing

As shown in this screenshot, there are two types of annotations, entities and associations. Entities declare the type of each word (or phrase), and they can be one of:

  • Actor
  • Action
  • Object
  • Property

Associations declare the relations between different entities. The following relations are supported:

  • IsActorOf, which is defined from an Actor to an Action;
  • ActsOn, which is defined from an Action to an Object or from an Action to a Property;
  • HasProperty, which is defined from an Actor to a Property or from an Action to a Property or from an Object to a Property;
  • RelatesTo, which is defined from an Object to an Object.

Annotations are added and deleted using the right click context menu, while any modification of annotations is automatically saved to the file.

An entity annotation can be created by selecting a word or phrase and right clicking on the selected word. After that the user can select the appropriate entity from the context menu.

CreateEntityAnnotation

Associations are created by right clicking on existing entity annotations. The Requirements Editor automatically determines all possible associations from the currently selected entity and groups them in categories according to their type.

CreateAssociationAnnotation

When no association is possible from a selected entity or any possible target entities are already selected, the tool does not allow selecting the association.

DisallowAssociationAnnotation

Finally, deleting an annotations is simple. One can delete an annotation by right clicking on it and selecting the option Delete. Note, however that when entity annotations are deleted, the related associations are also deleted.

CascadeDeleteAnnotation

The Requirements Editor also supports automatically annotating software requirements using an NLP parser. This is performed by right clicking on the rqs file and selecting the option Auto annotate.

Note that when selecting this option all annotations are removed. Additionally, the user can select to clear the annotations of a file using the menu option Clear all annotations. This command is particularly useful if the user wants to modify the requirements in the first page of the editor.

Finally, note that automatic annotation should be used as a helpful complement; however it is important that the user inspects the annotations and modifies them if required.

Modeling Storyboards

Adding and Modifying Storyboards

To create a new sbd file, the user can either select the Create storyboards dashboard button or open the File menu and then New and select the Storyboards Diagram option.

Upon following the steps of the wizard to create a new sbd file in the project, the user may populate the diagram with nodes and paths. The available nodes are shown in the tool palette.

Palette

Storyboard and Action are similar within the same diagram. Actions, however, represent atomic operations, whereas Storyboards must have their own diagram consisting possibly of several actions.

Properties are interpreted as parameters of Actions. They have to be connected to some Action of the diagram.

Conditions can be used to split the main flow of a storyboard. Each condition must have exactly two outgoing paths.

Each Storyboard Diagram must have exactly one StartNode and one EndNode. The StartNode is the first node of the diagram and the EndNode is the last node of the diagram.

Finally, Path is used to connect the nodes of the diagram to one another. The have one direction, and in the case of an outgoing Condition path, they also have a label.

The palette is also available at any time at the position of the mouse.

MousePalette

So, the user can select any element from the Palette by clicking on it and place it on the Canvas by clicking once again.

The following figure depicts an example storyboard diagram.

Storyboard

The properties of a diagram element can be changed by clicking on it and changing the values in the Properties editor.

Properties

For Action, one can change the name, see the other connected nodes and properties and select the type of the action, out of the 4 CRUD types, Create, Read, Update, and Delete, and the type Other. Most other nodes (and paths) have only a name, while storyboard has also the Precondition option, as the diagram precondition.

PropertiesStartNode

Finally, apart from the properties of a storyboard diagram, the user also has to annotate the diagram actions. This is accomplished using the commands of the right-click context menu of storyboard files. The Annotate Diagram Instances option opens the sbd file in Requirements Editor and presents the actions of the diagram to the user so that he/she may annotate them. The Auto annotate diagram instances option automatically annotates the text instances using the NLP parser. Finally, the user can select to clear the annotations of a file using the menu option Clear all annotations.

Validating Storyboards

Storyboard diagrams have specific validation rules. Storyboard Creator checks these rules every time a diagram is saved and presents them in the Problems tab of Eclipse.

Several validation errors are shown in the following figure.

Validation

In the above example, the start node does not connect to any node, the Action “Add tag” does not connect to any node, and there is no connection (i.e. possible path) to the Action “Create Bookmark”. In addition, a condition path of Condition “User wants to add tag?” does not have a name.

The messages shown by Storyboard Creator are informative, so the user should be able to correct the diagram and upon saving, these messages will disappear.

Modeling UML diagrams

Importing UML diagram images

To create a new uml file from an image the user should start the import wizard by selecting the option File > Import.. from the menu. Eclipse presents a list of import wizards, where the user can expand the node “S-CASE” and select “Import UML diagram from image”.

Import uml image

The UML image import wizard is based on a standard Eclipse import wizard. The wizard consists of two pages:

  1. UML diagram image selection,
  2. Export diagram XMI.

The first page asks the user to select an image file containing the diagram, and denote the type of diagram to be detected – activity or use case diagram. Once an image is selected, a preview of the image is shown in the page. Selecting Next continues the wizard.

Import wizard first page

The Export diagram XMI page asks the user to select the location of the resulting model file (a project or a folder in the workspace), and give a File Name with a “uml” extension for the resulting file. Selecting the option to open the result in editor will start the associated Eclipse editor (based on the file extension) after the recognition finishes. Several advanced options can also be configured in this page. Note also that by selecting Advanced<< and then check the “Show images” checkbox, the images resulting from intermediate processing stages of the recognition will be displayed.

Import wizard second page

The recognition starts when the user selects the option to ‘Finish’ the wizard. Progress of the recognition can be monitored in the Eclipse view ‘Progress’. The output of the process is stored in the uml file under the specified project/folder that the user has defined in the wizard.

Generating Papyrus UML diagrams

The user has also the option to use Papyrus to view or edit the created uml file. The user can right-click on the created uml file and select“Convert to Papyrus Diagrams”. The Papyrus diagram is generated and opened with Papyrus editor.

Generate papyrus uml diagram

Want to give S-CASE a try? You can find everything you need right here to install and start using S-CASE today.

S-CASE Blog | YouRest Web Directory

YouRest web directory application

The purpose of the YouREST web directory application is to provide a centralised interface for advertising the S-CASE Web Services. YouREST provides a catalog of services and a web site to browse and search this catalog. These Web Services may be external services registered by the user in the YouREST platform, or RESTful web services produced by the S-CASE MDE and Web Service Composition mechanisms. The intended user is able to browse all the registered web services to the platform and view their metadata. Searching functionality is also an option.

API Description

The initial page of the tool can be accessed from the URL http://yourest.scasefp7.com/ and prompts user to login to the platform.

Initial page

By selecting “Sign In”, the user may login or create a new account to YouREST platform. In case that the user is not registered, a First/Last/Screen Name and a valid email address should be entered. The text verification should be also inserted for preventing the platform from spamming.

The YouREST login page The YouREST registration page

After a successful login or registration, the user is directed to the main page of the YouREST, where the list of the registered web services are depicted. The home page contains also the list of the application domains, searching functionality and the functionality to register a new web service.

The YouREST home page

It should be noted that each web service listed in the home page, may contain multiple web service operations. These operations, along with the web service’s metadata, can be seen by selecting the search icon button of each web service. The above mentioned information appears in a new popup window.

Web Service metadata in YouREST

In case that the web service belongs to the logged in user (i.e. current user has registered the web service in YouREST), the title, description and the image URL of the web service can be edited. The user can also delete operations of the web service, or even delete the whole web service (by consecutively deleting its operations).
Drawing
Drawing

It should be noted that the operation delete button is only enabled for the logged in user to whom the web service belongs, as for the edit operation. The searching functionality together with the left panel that contains application domains list, limit the results presented to the user, according to keywords (contained in web service title, description and operation names) or the application domain category that the web service was registered.

SAT Tool

The Add a new service button, redirects the user to the web service registration page. In this page the user interface of the Web Service Annotation Tool (SAT Tool) has been integrated with YouRest. The user can register a new web service by providing a WSDL/WADL or RAML file. For the semantic annotation of an external web service, a valid URL containing the web service description (for WSDL and WADL documents) or the selection of a RAML document selection is required. Thus, when the user selects a valid web service documentation and selects the Parse and align button, the web service description is parsed in the background and the classification algorithms classify the web service operations according to the three-level categorisation method.

The Web Service annotation page of YouREST

When the parsing and classification background operations are finished the predicted domain, real/ideal matching and i/o matching is computed. The predicted application domain is presented under the Predicted Domain panel as a dropdown menu, in case a user wants to change it.

Predicted Domain panel

In case that the web service to be annotated does not belong to any existing application domain, the user may request a new one by selecting Propose a new application domain button. This will open a new dialog, requesting the new domain name and a short description.

New Application Domain

Requesting a new application domain, will alert by email the SAT Tool administrator for this request for further actions on integrating all data required in the ontology. Each operation of the web service is being matched with an ideal operation belonging to the predicted application domain. The operations are presented in a dropdown menu and the user may select and view the desired one.

Web Service Operation List

By selecting one web service operation, the corresponding matched ideal operation is displayed in the right dropdown menu along with the classification score that has been computed by the second-level classification step. The classification score has been computed by the classification algorithms presented, and it is a normalized to [0,1] double value.

The Web Service annotation page of YouREST

It should be noted that the ideal operations presented in the ideal operation dropdown menu is in descending order according to the classification score computed by the classification algorithms. The inputs and outputs of the web service and ideal operation are presented in a tree-like representation, while the computed alignments are displayed in the two tables.

The Web Service annotation page of YouREST

For each input/output mappings a normalized to the interval [0,1] score has been assigned according to the classification results of the third-level categorisation. By selecting one row of the mappings, the corresponding concepts in the two trees are highlighted. It should be noted that one concept from the web service operation can be only aligned with one concept of the ideal operation. The user may fine tune the mappings by dragging one concept from the web service operation tree and drop it to the ideal operation tree.

Dropping a concept to the ideal operation tree

For saving the mappings between one web service operation and an ideal operation, the Save alignment for this operation button should be selected. Then the mappings are saved in the ontology and the operation is considered as aligned.

The alignment saving indicator
The alignment saving verification

An already aligned operation cannot be aligned again, except if the alignment is deleted. In this case an error message appears.

Error message when trying to save an already aligned operation

In case that the ontology ideal operations are not adequate, the user may create new ones per selected application domain. This can be performed by selecting the Create new Ideal Operation button. A new dialog appears on the page, where the new ideal operation name should be entered. The ideal operation name should be unique, and a warning message will appear if it already exists.

The new ideal operation dialog

Except from the ideal operation name, each new ideal operation should have at least one input and one output. Adding inputs or outputs can be performed by right-click on the Inputs or Outputs nodes.

Adding new concepts in Inputs of a new Ideal Operation

The menu that pop-ups allows the addition of a primitive object, the addition of a non-primitive object or deletion of an inserted object. For the addition of a new non-primitive object a non-empty object name should be entered. Then the new ideal operation tree is updated accordingly. Adding a new non-primitive object can be performed under the Inputs or Outputs nodes or under an inserted non-primitive object. Additionally, primitive objects can be added under the Inputs or Outputs nodes and under an inserted non-primitive object.

Adding new non-primitive objects in a new Ideal Operation

For inserting a new primitive object, the Object name and the data type selected from the predefined objects in the dropdown menu are required.

Adding new primitive objects in a new Ideal Operation

When finishing with the insertion of inputs and outputs of the new ideal operation, the concepts are entered in the ontology, and the dropdown menu, of the ideal operations of the application domain is updated including the new ideal operation. It should be noted that the new ideal operation will be available to all registered users of the YouRest.

The SAT Tool provides also the functionality to declare some IPR policies to each registered web service operation. With these options, the user may add a license to the service or charge for example the use of the service by third-party users. The Access Info settings are available by selecting the Set Access information for this operation button. The new dialog that opens contains following fields.

  • Service Access Description: A description of the access information
  • Is accessible to countries: A list of the countries that the operation is available to. Selecting multiple countries can be performed by selecting Ctrl button.
  • License name: The license name of the operation
  • License description: The description of the license
  • Is proprietary: Selection if the license is proprietary or not
  • Trial schema: If the use of operation has a trial period
  • Duration in days: The number of the free trial days
  • Duration in usages: The number of free usages
  • Offers full functionality during trial: If the operation is fully operating during the trial period
  • Limited Functionality Description: A short description of the trial schema
  • Discount Schemas: Allows the insertion of discount options if the use of the operation is coupled with the use of another operation of the same user
  • Paired Service: The paired service that the discount is valid
  • Discount Reason: A short description on the discount reason
  • Discount (%): The percentage of the discount

By setting the operation access information and saving the alignment, the web service ontology is updated and all the information is stored in the ontology repository. This allows having restrictions and business rules into the registered web services of S-CASE.

The operation access information dialog

Connection with public web service directories

YouREST, provides two different tabs for presenting the Mashape and ProgrammableWeb Web Services.

The tabular user interface of YouREST

Each tab, contain the corresponding web services along with the application domains defined in each Public Web Service Directory. Searching is also a functionality.

The Mashape Web Services in YouRESTThe Programmableweb Web Services in YouREST

Each Web Service contains also some metadata as in S-CASE Web services. These can be shown by selecting the button search icon, which displays a dialog that contains all retrieved metadata along with the operations listed in each Web Service.

Mashape Web Service metadata

Want to give S-CASE a try? You can find everything you need right here to install and start using S-CASE today.