What’s a dangling cross reference?

Dangling Cross Reference

These are cross references in the Cradle database where one or both items at the end of the reference are missing.

It goes without saying that if you have item A linked to item B and then delete item B, the link between A and B should disappear. In usual operations this is true and this is what Cradle will do.

However, it is possible to create a dangling cross reference when importing partial data from other projects or backups. Say for example you have exported all your Definition items (one of which is item A) and separately all your cross references.  (including the one to item type Constraints one of which is item B). Into a new project you import all the cross references and then the Definition items. You plan to create new constraints. If one is not created called B there will be a dangling cross reference in the new project.

Finding and Rectifying Cross Reference Problems.

Cross Reference Integrity Checker

Dangling cross references are just one of the  anomalies that can be detected using the cross reference integrity checker. This is run from the Project ribbon.

There are a number of tests which can be selected and these are shown below.

Once a problem has been identified, it can be fixed, deleted or exported for editing as appropriate. The availability of these will depend on both the problem and the current user’s privileges.

The cross reference integrity checker and report
Cross Reference Integrity

 

CheckDescription
Dangling cross referencesDetects cross references whose from or to item do not exist.
Duplicate cross references (A-B and B-A)Cross references are considered to be duplicates if a cross reference exists from item A to item B and another exists from item B to item A and they both share the same link type.
Reversed hierarchical cross referencesDetects cross references that are between items where the from item has an identity that suggests it to be the child of the to item.
Cross references to be reversedDetects cross references that are invalid according to the current link rules but which, if reversed, become valid.
Cross references needing a new link typeDetects cross references that are invalid according to the current link rules but which become valid if their link type is changed and where there is only one link type that is valid for the cross reference.
Invalid cross referencesDetects cross references that are invalid according to the current link rules.
Cross reference cardinalityDetects cross references whose cardinality does not match the current link rules.
AllWill perform all the above integrity checks.

Performance

Dangling xrefs can cause issues with performance when items have been deleted. If item A was linked to item B, then item B got deleted. There would be a dangling xref which isn’t linking any items, creating extra data. If another item B was then created. It would then be linked back with item A. Which could potentially cause problems?

For full information on the settings see the help on Cross Reference Integrity

Article Updated 04/02/2019 – Added performance section

Special characters in regexes and how to escape them

Regex – Regular Expression

Cradle provides support for regular expressions, regular expressions are a means to find variable text in places such as:

  • Queries
  • Find dialogs
  • Category recognition strings
  • Category value validations

For instance, regular expressions (regexes) can be used in queries to find all items in which any frame, or a specific frame, or any of a list of frames, contains text matching the regular expression that you are searching for. For example, if you wanted to find all items containing sequences of capital letters followed by numbers, then the regular expression would be:

[A-Z]+[0-9]+


Whilst you are here, take a look at Why is Requirements Management Essential for your Business?


Special Characters

Some characters have special meanings within regexes these characters are:

CharDescriptionMeaning
\BackslashUsed to escape a special character
^CaretBeginning of a string
$Dollar signEnd of a string
.Period or dotMatches any single character
|Vertical bar or pipe symbolMatches previous OR next character/group
?Question markMatch zero or one of the previous
*Asterisk or starMatch zero, one or more of the previous
+Plus signMatch one or more of the previous
( )Opening and closing parenthesisGroup characters
[ ]Opening and closing square bracketMatches a range of characters
{ }Opening and closing curly braceMatches a specified number of occurrences of the previous

Examples

Finished\? matches “Finished?
^http matches strings that begin with http
[^0-9] matches any character not 0-9
ing$ matches “exciting” but not “ingenious
gr.y matches “gray“, “grey
Red|Yellow matches “Red” or “Yellow
colou?r matches colour and color
Ah? matches “Al” or “Ah
Ah* matches “Ahhhhh” or “A
Ah+ matches “Ah” or “Ahhh” but not “A
[cbf]ar matches “car“, “bar“, or “far
[a-zA-Z] matches ascii letters a-z (uppercase and lower case)

Using Special Characters as Literal Characters

If you want to use any of these as literal characters you can escape special characters with \ to give them their literal character meaning.

Example

If you want to match 1+2=3, you need to use a backslash (\) to escape the + as this character has a special meaning (Match one or more of the previous).
To match the 1+2=3 as one string you would need to use the regex 1\+2=3

For further information on using regexes in Cradle see our online help.

 

Season’s Greetings 2017

Season’s greetings from 3SL

3SL Season's Greetings
Season’s Greetings

Saudações da temporada, Feliz Natal,节日祝福, Prettige Feestdagen, Joyeuses Fêtes, Frohe Festtage, 계절의 인사, С Новым годом и Рождеством, Cyfarchion y Tymor

However you celebrate the end of 2017, 3SL would like to wish all its customers, potential customers, distributors, partners and staff,  Season’s Greetings, a Happy Christmas and peaceful family times over the festive season. We’ll see you again in the new year.

The UK offices will be closed from close of business on Friday 22nd December to 2nd January 2018. There will be no one manning the phones. You can send support enquiries to support@threesl.com and we’ll deal with them as soon as we can.

What’s a cradle.ini or .cradlerc file?

Preferences and Settings

The cradle.ini file on Windows® or .cradlerc file on Linux® is a configuration file holding the settings for Cradle.
The top half of the file contains all the default settings (commented out) so you can always see the values ‘as shipped’. It isn’t a file for the every day user, but is something the system administrator may delve into to control users’ experience.

The values are per installation so the file is located in the %CRADLEHOME%\bin\exe\windows or $CRADLEHOME/bin/exe/[linux-ia32|linux-x86_64] directory. The settings will apply to all the clients that connect. So if you set your date display preference to DD/MM/YY all users will see this.

image of cradle.ini file with date setting highlighted
The cradle.ini / .cradlerc file

Further details on cradle.ini or .cradlerc are shown in the Cradle help on the startup file.

Local Settings

Users can override most of these default settings through their preferences. These are stored on a per user basis. This means that a user located in, say the USA can choose to show their date as MM.DD.YY. This will be their preference regardless of their Cradle username or project. They don’t have to change their files manually. Users can alter their settings via the Preferences button on the Home ribbon. However should admin need to get at them, their files are located in %CRADLEHOME%/admin/definitions/personal/NETWORK_USERNAME. These files are either non existent (if a user has never overridden a preference), or are just a delta of the differences between theirs and the default file. Therefore, don’t worry when there is not much in them.

Trouble shooting

If a user can’t see a new setting that’s been applied by the system administrator, it may be that they already had an override in their personal settings and this will continue to apply until they either set their personal value to match the global, or their personal copy of the cradle.ini or .cradlerc file is deleted.

Preserve Your Settings

We would recommend backing up your system cradle.ini or .cradlerc file.

December 2017 Newsletter

Happy Birthday to ya, Happy Bir—-th—-day…

Ok we didn’t manage to get Stevie Wonder on board, but we’re all still singing away at our desks!

30th Birthday Cake
Happy 30th

Thank you to all our loyal customers and friends past and present. We’re proud to have been of assistance in your projects. Thank you too to all the staff who over the years have changed Cradle into the multi module full lifecycle suite it is today. Keep an eye on our Birthday page for events and offers through our Birthday year.

Opportunities

Opportunities with 3SL producers of Cradle
Opportunities with 3SL producers of Cradle

Over Christmas is the last chance to get your applications in as we’ll be sifting through the applications in January See here for more details.

Banking Changes

Updated ring fence information and dealing with 3SL’s banking details. With budgets run annually make sure you follow these changes into the new financial year to ensure continued maintenance is paid into the right accounts, posted here.

GDPR

padlock over computer based on images from negativespace.co pixabay.com on pexels.com
GDPR

As most people are aware, those doing business with any European country will have to abide by some stricter data protection guidelines. There’s a lot of hype and scaremongering going on at the moment as people try to come to grips with the extent of the changes. 3SL are undertaking their data audits to ensure we only hold personal data necessary to run 3SL and to support our Customer’s contracts. 3SL hold very little personally identifiable information on our customers, but even your name/email address/company need to be protected. We don’t sell or trade or provide information we hold with third parties, unless it is either a legal requirement to do so, or necessary to complete a contract such as with our Bank or Credit Card processor. We’ll be publishing our policies either on our website or to be made available on request. We hope you agree that we don’t send unnecessary communications to you, for example these newsletters are the way we communicate important changes, release information and articles that may assist in your use of Cradle. However, if we decide to classify any communications or interactions as extras, we may ask you to specifically opt in to receive them. We hope you’ll agree to continue to receive them and you will of course have the option to opt out at any time. If you have any questions at present, please send them to support@threesl.com . A brief initial steps guide can be downloaded from the ico

 Social Media

Twitter

Find out what DIAT is an acronym for!! (OK we invented that one!) Celebrating scientific discoveries on X-Ray day When I’m Calling You... contacting 3SL and what’s blocked if you send us an email.

Hints of the Month

Last month’s blog articles included a lot about cross references: How to load Cross References en masse. did you know you can load a cross reference from a CSV file? Mapping cross references for input from Document Loader The power of cross references when working out aggregate values . Other topics included defining a report for later use, no need to remember the settings you can save them and run later. You can read Hints & Tips in the 3SL Blog

A Holistic View – The Context Diagram

Context Diagram – the world around our project

A context diagram aids visualisation of where a project sits in relation to its external interactions. We don’t want to model those external systems, but we do want to know how they interact with our system.

Automatic wipers for a car don’t need to know how the weather works, but they do need to sense the presence of water on the windscreen. The context would, therefore, include the weather as an external influence with ‘rain’ or ‘rain present’ being signalled to our system. If our company only produces the wiper element the actual car is outside our scope. However, this is where we get our power from and it’s where we will install them so the car is part of our context. The interactions with the car such as ’12v supply’ and ‘user control signal’ are likely to show a part of the holistic context.

Data Flow Diagram (DFD)

In terms of functional analysis and design the DFD shows the external elements with which our main system interacts on the context diagram. This usually has only one process on it, and that is our system of interest.

an example context diagram
Context Diagram – DFD

Taken from the Cradle demonstration project this diagram shows our system of interest is operating the aircraft. The externals that we interact with form the context within which the project operates. This includes the booking system, the fuel suppliers, the control tower and so on.

When the design and analysis are broken down at lower levels, the passenger details or navigation information will have to be handled by parts of the target system. If there is anything that does not balance at the lower levels, then a function must be missing. It implies that we have an input stimulus or an expected output and have nothing to handle or provide it.

Block Definition Diagram (bdd)

Context diagram notations are not restricted to Yourdon, a SysML bdd is also used to describe the context. Information gathered from the use cases and operational scenarios can be used to build a holistic view.

Context diagram shown on a bdd
Context Diagram – bdd

Visual

Whilst not necessary, adding images to your context can aid communication to your stakeholders and customers. They don’t really have to understand the notation to visualise the ‘Passenger’ as a person interacting with the flight. In Cradle, images can be added to the diagram as standalone images, or can actually replace the symbol on the diagram. (The image in the latter will follow all the rules and have the underlying specification of the real diagram element).

Bottom-Level Items Output in Document Publisher

A user wants to output bottom level items in Document Publisher. As bottom level items do not have anything linked below them, this can be set in a hierarchy table.

How this works for Bottom Level Items

All it takes is 3 rows in a hierarchy. The first row works as any item above the bottom level items. The second row will actually be for items on the bottom level. The third level is used as a check that the items are bottom level. It makes sure that no items are linked in a Downward direction using that Link Type for the 2nd row to be output.

If there are items linked below the item, using the Link Type set, then it is not a bottom level item and will not be output. Although this can be used with many different hierarchy levels, as long as the last row is always set as below.

Creating the hierarchy Table

So open the Hierarchy Details dialog and set the top item type to the type you require (here we are using Requirements). Leave level this as it is already set. Click the Add Row button and set the Follow Links to Downwards. The arrow next to the second level item show point towards it. Set the Link Type for this level, in this case it is RELATED TO. Next is the Publish Subject Items option which sets what will be published based on your links. Set Publish Subject Items to Only if link exists.

Select the second level item type and click the Copy Row button.

Adding and Copying rows
Adding and Copying rows in Hierarchy Details in Document Publisher

Select the last row and click the Indent button. The Publish Subject Items now needs to be set to Only if link does not exist.

Removing options set from the top and bottom nodes.
Removing options set from the top and bottom nodes.

The nodes without any options set should be grey, click OK and repeat for each Field required. All item attribute nodes in the Tags sidebar now show as on (Row 2).

Showing all the item nodes are set to Row 2
Showing all the item nodes are set to Row 2

Generating the template

When the template is generated, only the second row item will be output containing the bottom level items. For a short example to be output, the Key is set to 1.1*.

Bottom level items output using heading tag
Bottom level items output using heading tag.

Resolution of connection issue using Test_Login

Command Line Utility

Test_Login is a command line utility supplied with the Cradle Suite to help diagnose connection problems between the Cradle client and CDS (Cradle Database Server).

Steps

  1. At a command prompt cd %CRADLEHOME%\bin\exe\windows\or cd $CRADLEHOME/bin/exe/linux-ia32 or linux-x86_64
  2. Execute test_login.exe or ./test_login.exe
  3. Agree to continue with 'y'
  4. For a basic test select 3 to login to the DEMO project as MANAGER
  5. Select 7 to start the test
  6. This will then tell you the method being used to find the CDS for now press 'y'
  7. Move through the stages pressing 'y' each time and observe the result

    running of test_login.exe to diagnose issues
    Test_Login

If all is well the process will complete without errors.

If there is a problem an error will be raised (for example if a connection can’t be established because the CDS is not accessible or running Stage 1 would fail. At this point a user could try different CDS connection methods to diagnose the issue.

The ability to try different users and projects allow elimination of problematic installations or bad users.

Further information on the options in Test_Login can be found in the help.

 

Happy 30th Birthday 3SL (Structured Software Systems Ltd.)

3SL Turns 30

1st December 2017 starts our Birthday Year.

Watch this space for updates during our 30th Birthday Year……..

Happy Birthday!

30th Birthday Cake
Happy 30th

Thank you to all our loyal customers and friends past and present. We’re proud to have been of assistance in your projects.

Thank you too to all the staff who over the years have changed Cradle into the multi module full lifecycle suite it is today.

Mark Walker founder and Managing Director of 3SL said:

“I am delighted with the success of Cradle and the way 3SL has been able to develop a tool that has influenced and supported so many projects world wide”

Structured Software Systems Limited’s  official start date was 1st December 1987 and trades under the catchier moniker 3SL.