Table of Contents Previous Chapter 3 Organizing a Project that will use SDT 3.02

3 Organizing a Project that will use SDT 3.02

This chapter explains how the diagrams in an SDL system may be managed in a project including several project members. The functionality of the SDT tool related to management of diagrams in a project environment is provided by the SDT Organizer and the Search List Manager tools, and this chapter requires some knowledge about those tools. A reference manual for the Organizer tool can be found in chapter 22, The SDT Organizer, and the Search List Manager tool is documented in chapter 26, The Search List Manager, both in the volume SDT 3.01 Reference Manual.

Introduction

Software development projects are typically staffed by a large number of software engineers, each working simultaneously on different parts of the same system. This requires careful coordination and version control of the different parts of the system. Normally, stable versions of a system are stored in a central storage area (in this chapter named the original area) accessible for each user. The original area is typically either:

In addition, each project member may have his own work area where he temporarily stores the parts of the system he is currently working on. Furthermore, a project may also use a reference area which contain one or more packages of information that are shared between different projects.

SDT supports this way of working using The SDT Organizer and The Search List Manager tools. Those tools allow the members of a project to work independently, but in a coordinated and structured way. In particular, the tools support:

The rest of this chapter is organized as follows:

The SDT Organizer and Search List Manager Tools

The SDT Organizer and the Search List Manager tools are the parts of SDT that provide the ability to manage the diagrams that build up a project.

Important is that one diagram is represented by one file, and the mapping between diagrams and files are kept in the system file. The system file is the file that is opened when issuing the Open command in the Organizer. The system file has by default the extension .sdt.

A diagram may be bound to a physical file using the Organizer in three different ways:

Automatic Binding

Diagrams may be bound automatically when the diagram is saved for the first time. The name of the physical file will by default be <diagram name>.<ext>, where <diagram name> is the name of the diagram and <ext> is a suggested extension of three letters indicating what type of diagram is contained in the file. See "Default file names" on page 1190 in chapter 23, The SDL Editor, in the volume SDT 3.01 Reference Manual for information on default file names and extensions.

Example 2   
The block diagram with the name DemonBlock will by default be bound to the file demonblock.sbk
  

Manual Binding

Diagrams and files may be bound manually, on demand, via the command Connect Diagram. A file selection dialog appears and the selected diagram may be connected to an existing file.

Figure\x11 51 : Connecting a Diagram to an Existing File. 
-----
(fig)  
       
-----

Binding Using a Search List

Binding may also be performed according to a search list via the command Connect Diagram. A dialog appears and the selected diagram, including all its contained / referenced diagrams, are automatically bound according to the search list given as an option in the SDT tool.

Figure\x11 52 : Connecting a Diagram Using a Search List. 
-----
(fig)  
       
-----
The names of the files are not important when mapping files according to a search list, since the diagram name is stored in the file. What is important though, is the extension of the file name which must correspond to the type of diagram stored in the file.

Example 3   
Block diagrams must be stored in files with the extension .sbk.
  
Search lists are managed by the Search List Manager tool. A search list contains an ordered list of directories, where the first directory in the list, the workdir, is always the directory where the search list is located.

The remaining directories (one or more) in the search list corresponds to the original area.

-----------------------------------------------------------------------
Note:                                                                    
The order of appearance of the directories in the search list is of sig  
nificance.                                                               
-----------------------------------------------------------------------
When a search list is used in the Organizer to bind diagrams to files, each directory in the search list is searched in order for files whose contents match the diagram structure contained in the system file. It is always the first occurrence of a file that is bound to a diagram, i.e. if a file matching a diagram is found in the working directory, this file will be bound to the diagram. If a matching file is not found in the first directory, the next directory of the search list will be searched, etc.

Using the Search List Manager tool, it is possible to create new search lists and change existing search lists. It is also possible to execute an arbitrary operating system command on files corresponding to one or more marked diagrams by using the User Command command, which may for instance be used to move or copy diagram files between different areas.

How to Manage the Diagrams in a Project

Basically, diagrams in a project can be managed using the following two approaches:

The two approaches may also be combined.

Using a Configuration or Version Control System

One way to manage the diagrams in a project is to have the original area managed by some external configuration or version control system, e.g. RCS. In that case, every member of the project has his own work area from which SDT is started. In each work area, there is a system file (or multiple system files, each one containing a different part of the system). All diagrams in the system file are bound to files in the user's work area. The correspondence of files in each user's work area to files in the original area are managed by the external configuration or version control system.

We will now, in a few examples, describe how SDT can be used together with such a system, in this case RCS.

Example 4   
Let us assume that the diagrams in project PBX are managed by RCS. The structure and contents of the original area and each project members work area is then as depicted in Figure 53.

Figure\x11 53 Example of Structure and Contents of the Original Area and the 
		DifferentWork Areas of Project PBX. 
------
(fig)   
        
        
        
------
Each project member has access to a copy of the files contained in the original area. These files contain the diagrams he needs access to and a system file (PBX.sdt) describing the system structure. If a project member, say "User A", is to change the process diagram CLIP, he "checks out and locks" the file clip.spr by entering the command
co -l clip.spr (-l is the lock option) in UNIX. When he is finished working on the CLIP diagram using SDT and his changes are approved by the project manager, he "checks in" the file by issuing the command ci clip.spr in UNIX and informs the project about the modification.

Other project members may then access the latest version of the file clip.spr by checking out (i.e. copy) clip.spr.

  
Example 5   
If the project member "User B" is going to add a new diagram to the system PBX, for example process diagram CLIR, referred in the parent diagram block CLIPBLK, he must carry out the following steps:

  1. First check out and lock the system file PBX.sdt and the file clipblk.sbk
  2. Update the parent block diagram CLIPBLK and save it.
  3. Create and save the new diagram process CLIR on file clir.spr.
  4. Save the system structure on the system file PBX.sdt.
  5. Check in clir.spr, clipblk.sbk and PBX.sdt
  

Merging Individual System Views

When a multi-user project is applying frequent changes to a system, in particular when the system's structure is not yet finalized and evolves from the efforts of many engineers, each project member should be able to work on his individual view of the system and merge his individual view with other views in order to build the complete system.

Again, we assume that the diagram file locking mechanisms are controlled outside SDT, ensuring that a file cannot be modified by several members at the same time.

To cope with the situation, each project member uses his own work copy of the system file, in which the changes he applies to the system are reflected. An official copy of the system file is stored in the RCS directory; this copy reflects the global view of the system. Before checking in the (modified) system file, the project member has to let SDT carry out the following tasks:

  1. Compare his view of the system with the official copy.
  2. Suggest a merged view (the user can accept the suggested view as it is or change it if he wants).
  3. Save the merged view on a system file.
Example 6   
Let the name of the "official" system file be official.sdt, and have RCS control the management of the file. Each project member creates his own local work copy of the official.sdt file and names it, say, local.sdt.

The official.sdt file should not have any source directory specified and should use relative paths when specifying directories. This is set in the Set Directories dialog.

The local.sdt file has the source directory pointing to the user's work directory and uses relative paths. The source directory can be specified when the local.sdt file is created, in the following way:

  1. Set source directory to the user's work directory.
  2. Open the official.sdt file (without any source directory specified and using relative directory paths.).
  3. Save the system file under a new file name in the work directory (local.sdt).
Each individual project member is now assumed to work with file names relative to the source directory, and has a local copy of all diagrams in the system. (A project member locks only those diagrams that the he is going to modify.)

A check-out of all files in the RCS directory results in the official version of the system.

Figure\x11 54 :Example of how to Merge Individual Views. 
-------
 (fig)   
         
         
-------
The situation which is depicted in Figure 54 is that "User 1" has locked and modified c.spr and created a new file f.msc. The system file local1.sdt reflects the changes he has applied to the system. "User 2" in turn has locked and modified b.sbk and d.spr, and created g.msc. The system file local2.sdt reflects this.

To bring the changes back to the RCS directory by merging his view of the system with the current official system, "User 1" carries out the following steps: (we assume "User 1" has completed his work before "User 2" has)

  1. Checks out and locks the system file official.sdt
  2. Opens the file official.sdt with the Organizer.
  3. Compares his view of the system (reflected in the file local1.sdt) with the Organizer contents (which reflect official.sdt). To do this, he uses the Organizer command Compare System.
  4. SDT suggests him to add the new file f.msc to the Organizer view. He accepts the suggested merged view.
  5. Saves the Organizer view, which results in an updated official.sdt, including the newly added file f.msc.
  6. Checks in official.sdt and the modified / new files c.spr and f.msc
When "User 2" in turn is to merge his results into the official copy, he carries out in a similar way as "User 1". This time, SDT will suggest him to preserve the MSC stored on f.msc (that "User 1" did add) and to add his own addition, g.msc. He accepts the suggestion, saves the merged Organizer view on official.sdt and checks in the files official.sdt, b.sbk, d.spr and g.msc.

  

Using Search Lists

The possibility to use search lists is mainly maintained in SDT 3.02 for backward compatibility reasons. As explained before (see "Binding Using a Search List" on page 92), a search list consists of an ordered list of directories. The first entry in the search list always corresponds to the working directory or working area. The work area may be specified using the Organizer command Set Directories (see Figure 57 on page 102); if not specified, the work area is always fixed to the directory from where SDT was started. The other directories in the list correspond to the original area.

Example 7   
The diagrams of project PBX may be structured according to Figure 55.

Figure\x11 55 : Directory Structure of Project PBX Using Search Lists. 
------
(fig)   
        
        
------
The diagrams in the original area may be managed using e.g. RCS or some other version control system, or may be structured using one directory for every new version as explained earlier.

The search lists of each user has typically the contents:

--------------------------------------------------
Denomination   Directory                            
--------------------------------------------------
Work area      `pwd` (the users working directory)  
Original area  /PBX/PBX-1                           
Original area  /PBX/PBX-2                           
Original area  ...                                  
--------------------------------------------------
If project member "User A" would like to work on the process diagram CLIP, he either "checks out" the file clip.spr by issuing the command co -l clip.spr in UNIX if RCS is used, or he simply copies the file to his working area. This may for instance be done by using the User Command facility in the Search List Manager tool. He must then update the binding of diagrams to files in the system file by issuing the command Connect Diagram and specify the option By expanding diagram in search list PBX.ssl in the Organizer to reflect the new location of the file clip.spr. This is important, since otherwise the system file will contain the invalid binding of the diagram CLIP to the file clip.spr in the original area. If the original area is not write protected, "User A" may accidentally corrupt the original file.

When "User A" is finished working on the CLIP diagram using SDT, he either "checks in" the file by issuing the command ci clip.spr in UNIX, or simply moves the file back to its appropriate place in the original area. This again may be done by using the User Command facility in the Search List Manager tool. Finally, the system file has to be updated by issuing the command Connect Diagram and specify the option By expanding diagram in search list PBX.ssl in the Organizer.

If project member "User B" adds a new diagram to the system PBX, for example process diagram CLIR, then, when the corresponding file clir.spr is moved into the original area, other project members may then rebind according to the search list PBX.ssl to get access to the new version.

  

Settings in the Preference Tool

Two settings for the Organizer in the Preferences tool are related to where diagrams are stored. The two settings are:

The source directory and the target directory appear as options in the New dialog in the Organizer.

Figure\x11 56 : Specifying Source and Target Directories when Creating a New 
		System.
-----
(fig)  
       
       
-----
The directories may be temporarily changed in the Organizer by using the Set Directories command. In the Set Directories dialog there is also an option to either show the absolute path to files, or to show the path relative the Source directory.

Figure\x11 57 : Specifying the Source Directory in SDT. 
-----
(fig)  
       
-----
This affects the way paths to files are stored in the system file.

Differences to SDT 2.3

The main difference to SDT 2.3 is how diagrams are mapped to files. In SDT 2.3, the binding of a diagram to a file was done automatically when the diagram was accessed. The search list was consulted and the first file found according to the search list was bound to the diagram. In SDT 3.02, the binding of a diagram to a file is explicit and stored separately in the system file.

-------------------------------------------------------------------------
Caution!                                                                   
An important difference is that when saving a diagram in SDT 3.02,         
it is saved according to the binding of the diagram in the system file.    
If the diagram is bound to a file in the original area, the diagram will   
be saved in the original area, not automatically saved in the work         
area as was the case in SDT 2.3. Therefore, it is important that the       
original area is write protected to avoid overwriting diagrams by          
mistake.                                                                   
-------------------------------------------------------------------------
This page intentionally left blank

 
Table of Contents Next Chapter