Multiple Cradle Database Servers and How to Connect to Them

Multiple Cradle Database Server (CDS) Environments

Cradle supports multiple Cradle database servers,  in a single environment, based on the CDS Host Access List. The following file contains a list of the TCP/IP hostnames of the hosts that the CDS will respond to:

Windows – %CRADLEHOME%\admin\cds_hosts

Linux – $CRADLEHOME/admin/cds_hosts

The file is empty by default, which mean a CDS will respond to all hosts.

Two or more Cradle systems may be installed and operate in the same network by ensuring that each CDS has a non-empty Host Access List that defines the lists of hosts that are to be serviced by that CDS.  Multiple Cradle systems are consequently achieved by ensuring that the hosts used to run the CDSs appear in the Host Access List of only one CDS.

multiple CDS on single network
Multiple CDS on the same network

Clients Connecting to Multiple CDS

Each Cradle client such as WorkBench may be executed on a host which is in the Host Access List of more than one CDS. In this case, WorkBench should be told which CDS it is to connect to, for example by using the command-line option: -cds hostname

Methods of connecting Cradle tools to a CDS

There are several methods of specifying which CDS, when you have multiple Cradle database servers, a client is to use, or alternatively a client can attempt automatic CDS discovery.

-cds command line option

Cradle tools for example the WorkBench client, supports a -cds command line option that takes an argument which is interpreted to be either the hostname or IP address of the machine where the CDS is executing.

-cds hostname

If invoked with this command line option, the WorkBench client does not attempt CDS discovery via broadcast, but instead attempts to link directly to the CDS on the specified machine.

CRADLE_CDS_HOST environment variable

If a -cds command line option has not been specified, the WorkBench client tests for the presence of a CRADLE_CDS_HOST environment variable, and if defined, uses its value as the hostname or IP address of the host executing the CDS.

In this case, WorkBench does not attempt CDS discovery via broadcast, but instead attempts to link directly to the CDS on the specified machine.

Automatic CDS discovery by broadcast

If a CDS host has not been specified through other means (such as via the –cds command-line option, or CRADLE_CDS_HOST environment variable), a Cradle client such as WorkBench will attempt to locate a CDS automatically by broadcasting. If the client can connect to two or more CDSs and is using this method, the client will connect to which ever CDS responds quickest.

For a more in-depth look at environments with multiple Cradle database servers,  please refer to our online help.

Getting Started with Link Rules in Cradle

What Are Link Rules?

Link rules are used in Cradle as a way of defining constraints for cross reference operations within a project. They specify who can manipulate cross references, the link types that can be used, between what types of item, and which items of these types. This guide to getting started with link rules will help first time users understand the concepts.

The level of detail for each link rule can vary as required for your project’s needs. On one hand they can be very simplistic, allowing links of any link type between all item types. On the other hand they can be more detailed and specific, allowing links between different item types, models and individual item identities.

Throughout this blog post, and future posts, we will explore the Link Rule Setup dialog. These posts will cover the different options available and the result this will have on cross references between items in your project.

Continue reading “Getting Started with Link Rules in Cradle”

Regionalisation

Message Catalogue Manager

You will undoubtedly know that Cradle UIs are supplied in a number of different languages. This internationalisation is driven by our customer base and distributors. However, because a language may spoken in many parts of the world we offer localisation of our message catalogues. But did you know that you can also support regionalisation of your catalogue?

Message catalogues are split into three levels, Language (ISO 639), Country (ISO 3166) and Region.

The more frequent variants would be:

  • en = A base language English Catalogue
  • en_GB = The Queen’s English variant
  • en_US = A variant for over the pond.

or

  • fr = French language catalogue
  • fr_CA = Canadian variant likely to be used in Quebec, or Eastern Ontario

But you can get more specific

  • en_GB_cumb = A variant covering the Cumbrian dialect

Whilst my choice of a Cumbrian dialect regionalisation is unlikely to have a  practical use, we do recognise that some terms may be better understood in some areas of the world, than others. These stages could be used to create any language or variant you wish.

Showing the steps used to produce a language variant
Message Catalogue Manager Steps
  1. Open the base language catalogue, in this case en, then Create New Language country gb and region cumb
  2. Alter only the words that differ from the base catalogue in the country / regional variant and save the file
  3. Ensure your environment language or the CRADLE_UI_LANG environment variable is set for the new language
  4. Open up a Cradle tool such as WorkBench and check the word has been replaced

There is also an XLIFF export and import function in the Tools section that allows the new catalogue to be sent for external translations.

For full details of how to create languages, see the help for Message Catalogue Manager

Now it’s over to you why not try a regionalisation in Cradle in Klingon en_us_klingon?

 

Article Updated: 31/05/2018 – XLIFF

Installing New Security Codes

What is a Security Code?

All Cradle licences are configured by 3SL Security Codes.  This new Security Code must be installed on the host running the CDS (Cradle Database Server). It does not need to be installed on any machines were Cradle clients are installed.

Security Codes are in the file:

  • $CRADLEHOME\.c_config – Linux
  • %CRADLEHOME%\c_config.dat (usually c:\Program Files\Cradle\c_config.dat) – Windows

WARNING: Please be careful NOT to change any part of this file! If you do, you can easily prevent your Cradle system from working!

The Security Code contains the Cradle system’s serial number that identifies the Cradle system, and provides some basic information about it. The composition of the serial number is:

Security Code Structure
Composition of Security Code

The serial number contains the system sequence number that is the unique identifier of the Cradle system. The serial number itself may change if, for example, you purchase additional licences to increase the number of simultaneous users that the system will support, but the system sequence number within the serial number will remain unchanged.

To obtain the serial number of your Cradle system (on Linux) at any time, enter the following command:
c_serial

Installing Security Codes on Windows

  1. Shut down all Cradle tools and servers
  2. Select Cradle Utilities > New Security Code from the Windows Start menu:

    Dialog to enter new Security Code
    Security Code Configuration Utility
  3. Copy and paste the Security Code into the Security Code Configuration Utility dialog and select Decode
  4. If the decoded details are correct, click Configure to apply the new Security Code
  5. Once this is complete, you should reboot the machine, or (if not possible) restart the Cradle servers

Installing Security Codes on Linux

  1. Shut down all Cradle tools and servers
  2. Run the following command, you can then restart the CDS and CWS servers:

c_config -i security-code

where security-code is the 92 character Security Code issued by 3SL. Further information on c_config can be found in the help pages.

How to Make Use of User Variables in Document Publisher

Where can Variables be Placed

All User Variables in Document Publisher can be used throughout the template. You can use the variables within Headers, Footers, boilerplate text and document titles.

What are Variables?

The Variables store bits of data to be used in tags that allow the use of either a variation of data or static data.

For example the variable $UserName is static will only output the currently Logged in Users Name within the document. The User Name will also be output if the template is being generated through the Phase sidebar in WorkBench.

Some variables can be used to hold items identities in a static list like $IDList or lists of item identities collected from Hierarchy Tables like $ItemList. The lists for $ItemList can change depending on cross references and/or if the template uses parameters.

Creating User Variables is easy. Read How to Create a Variable to find out.

User Variables in Headers and Footers

The variable tags can be used within a Header and/or Footer in conjunction with Microsoft® Word’s own data fields.

In the Word tab, select the Header or Footer option. Then select the Edit Header/Footer option. Once the Header/Footer is open, select the User Variable button and the variable you wish to use.

Several variable tags can be placed to output within the Header/Footer so you get the output required. These tags can also be formatted.

When editing the Header or Footer the View will change to Print View as they don’t show in Draft view.

Doc Pub user variables in a header
Using variables in a Word Header.
Doc Pub user variables in a footer
Using variables and Word fields in a Footer.

The final output looks like this:

user variables output within a header

Footer Output User Variables

User Variables in Boilerplate

The variable tags can be placed within any boilerplate text. This allows for changes in data like the date or user publishing the document.

Boilerplate text and User variables
Boilerplate text with User Variables.
Two user variables within the Boilplate text
The User Name and Todays date within the Boilplate text.

User Variables in Title Text

A User Variable or a Paragraph Group tag can be used to set the Document Title. A variable is quicker but does not allow for parameters are used in a field tags.

Title Variables
$TemplateName User Variable

So the output looks like this:

Title Output

Or you can have the Title only output when you are generating a Formal Document. Use any of the $FormalDoc variables and they are only generated during a Formal Publish. In this example I have used $FormalDocTitle:

Title Formal Variables

Using $FormalDocTitle means the title will output as to the same as the User entered in the Title in the Publish Formal Document UI.

Publish Formal Document
Publish Formal Document User Interface
Title Formal Output
Document Title set by the words entered by a User during a Formal Publish.

Capturing New Document Versions

Capturing New Document Versions using Document Loader

You can capture new versions of source documents in the same way as regular documents. Document Loader compares the two versions of your document and identifies any new or modified source statements. You can select which of these revisions to load into your Cradle project database.

Adding a new version of document and Overwite/Merging

When you load the new version of your document, Document Loader adds or updates the appropriate items in your project database. A new set of bookmarks is created around each source statement and linked to the new version of your source document

Please note that Document Loader does not delete items in your project based on deleted paragraphs in your new version.

As long as you have all items baselined in the previous captured document. When making a new version of the document, Document loader will create a draft of the items.

Document Loader relies on an accurate correlation between the source statements in the current version and the new version of your source document. Before loading a new version it is necessary to consider the nature of the modifications in your document.

We advise taking a backup prior to loading a new version.

Your new version will contain minor revisions to requirement statements with new sections and subsections added. These modifications should have been made with Word’s Track Changes enabled.

If however, the new version contains strong modifications, such as restructured sections or entire sections deleted, then it may be necessary to load your document as a new source document instead. You may still update the existing items in your project, provided that your document contains the items’ identities. To do this you must set the Overwrite option to Merge.

The Document Loader dialog is shown below showing a new document version ready to be captured. As you can see the changes are highlighted:

New document version to be captured using Document Loader
Document Loader Screen

Click here for step by step instructions on capturing new document versions using the Document Loader tool.

Article Updated 04/02/2019 – Updated to include new version with baselined items

Table Generation Method in Document Publisher

There are two ways to generate a Document Publisher table. The first table generation method is the Default, this outputs each item row by row. This generation is slower but allows for different styles and formatting in a cell.

The second table generation method is XML which is faster but does not allow for different styles and formatting within a cell. If the user is outputting a simple table then XML is the way to go, especially if it is a large table.

This article highlights some of the limitations and pitfalls with XML output.

A Simple Table Generation

Outputting a simple but large table is quicker by setting the Generation Method to XML.

Simple Table
A simple and none formatted, Document Publisher Table
Hierarchy Table
A hierarchy table I use for this example.

Outputting the above table using a hierarchy as above is much faster using the XML method rather than the Default method.

Differences in Styling Text in a Cell When Using the XML Generation Method

Taking the table above and formatting all the tags in different ways to make them stand out can cause some problems in the XML.  For instance the user may wish the Verification Method to be output in a different colour to the rest of the Verification information at present this would cause issues with an XML Table Generation Method.

Differently coloured tags
Differently coloured tags

In the above screen-shot, I have made the Identity and Name of the Verification blue and the Method green. This currently limitation means when generated using the XML Generation method, none of the text is seen under the Verification column.

The output from differently coloured tags
The output from differently coloured tags within the same cell

Setting the Verification Method to the Automatic Font colour, the text is output but the Identity and Name will still not show.

Coloured and auto coloured atgs
The output if some tags are coloured and others are set to automatic in the same cell.

The only way to have the output show correctly is to put the Font Colour on the whole cell:

Coloured cell tags
All tags in the cell are the same colour.
Coloured cell output
The output from the colour placed on the cell not the text.

The user can even have all the different columns in different colours and this will output each item and column correctly.

All coloured cells Output
All cells are coloured differently in the table output

The same goes for making text bold, italic or underlined; unless it is on the whole cell it will cause issues with the output.

Differences in using Formatting Marks in a Cell

Placing formatting marks like between tags in the same cell is also subject to limitations. Placing a single carriage return (new line) between 2 tags can cause the second tag to not be output if placed incorrectly:

Using formatting incorrectly
Using formatting incorrectly
Output when formatted badly.
Output when formatted badly.

When done correctly can still output as the user requires, make sure the cursor is before the bookmark and press Shift+Enter:

Using formatting correctly
Using formatting correctly

Or just putting a full carriage return (paragraph end)  between the tags, making sure the cursor is between the 2 bookmarks and not inside one of them:

Using formatting correctly
Using formatting correctly
Correct formatting output.
The output when formatting is used correctly.

The alignment of text within a cell must also be the same, the user cannot have one tag as left aligned and another right or center aligned unless there is a full carriage return between them.

You also cannot use Ctrl+Tab for a single tag in the cell as the data will not show in the output.

For more information on Tables in Document Publisher click here

Customise your Quick Access Bar to your needs

Quick Access Bar

The Quick Access Bar (QAB) is intended to provide quick and easy access to all of the types of information in your Cradle database that are relevant to you. It provides easy access to the Automatic scope queries for all item types as a scrollable list of controls, each of which provide access to an automatic menu for an item type.

Controllability

But what about if you only want the bar to display a specific set of item types or you want them in a specific order?

You can customise how the QAB will look for you in User Preferences. Choose which items are to be shown and in which order you wish them to be displayed you even have the option to set whether you want the Quick Access Bar to be shown when WorkBench starts.

Quick Acces Bar in User Preferences
Customising your Quick Access Bar

For further information on customising your UI see this previous blog post.

Related Article:

If you need to set these values for everyone in the project, it can be achieved with the Cradle initialisation file.

 

UPDATED: April 2020 – Related article

Column Sorting in WorkBench

Column Sorting

WorkBench can perform column sorting in Table and Document view styles. This can easily be performed by clicking on a column heading.

Sort Options

Selecting a column heading will display four sort options. When one of these options is chosen the items will be sorted and then displayed based on that selection.

The sort options available when a column heading is selected.
WorkBench Column Sorting

Sort ascending – Case insensitive

The first sort option will sort the items from A to Z, based on the item’s value for the selected column. This is done regardless of whether the characters are upper-case or lower-case.

Sort Ascending - Case Insensitive
Sort Ascending – Case Insensitive

Sort descending – Case insensitive

For the second sort option the items are returned from Z to A, based on the item’s value for the selected column. Again, as this option is case insensitive the returned items can be upper-case or lower-case.

Sort Descending - Case Insensitive
Sort Descending – Case Insensitive

Sort ascending – Case sensitive

The third sort option will sort the items from A to Z; but this time all upper-case items are returned first:

 Sort Ascending - Case Sensitive
Sort Ascending – Case Sensitive

Once there are no more upper-case items the remaining items are then displayed a to z:

Sort Ascending - Case Sensitive
Sort Ascending – Case Sensitive

Sort descending – Case sensitive

The final sort option will sort the items from z to a; meaning all lower-case items are shown first:

Sort Descending - Case Sensitive
Sort Descending – Case Sensitive

Once there are no more lower-case items the remaining items are displayed Z – A:

Sort Descending - Case Sensitive
Sort Descending – Case Sensitive

Note:

This sorting only re-arranges the current data brought back in the current query. It does not retrieve new data from the database. In order to retrieve data from the database in a particular order, then one of the database key fields must be selected in the Sort by: field of the query. However, because the sorting occurs on the data in the table it does have the advantage of being able to order the table by frame content or other non key fields.

 

 

Publish a Formal Document Using a Batch File

Running Document Publisher in the Background

Publishing a Draft or Formal Document can take time. If you need to use Microsoft® Word for other work, is a nuisance when having to wait.

Users can run a batch file to create the documents either as a Draft and/or as a Formal document. The batch file can be used in a task while the user is not using their computer; for example at night or a weekend if many documents are being generated.

The command line needs to have all the options set the same as they would  be through the UI (User Interface):

Publish Formal Document User Interface
Publish Formal Document User Interface

Formal Document Command line Options

The normal batch file command line options for just a draft document are:

Draft Options for batch file
Command Line Draft Options

Each of the following shows what the command line options for each Formal option in the User Interface:

Formal Options for batch file
Formal Options needed in a batch file

All the above -fdoc options are requirements within the command line except -newversion. Only use the -newversion option, if a new version of the document is required.

The final command line to generate the DEMO Template will look like this: (NOTE: Options with more than a single word are required to be in quotes e.g. -fdoccomment “Published DEMO Template Using Batch File”)

"%CRADLEHOME%\bin\exe\windows\DocPub.exe" -login MANAGER,MANAGER,demo -file "DEMO Template" -location PROJECT -type DOCX -output "C:\Temp\DEMO Template.doc" -formal -fdocname "DEMO Template" -fdoctype REQUIREMENTS -fdoctitle "DEMO Template" -fdocissue 1 -fdocdate Jun -fdocref DEMO1 -fdocclass UNCLASSIFIED -fdoccomment "Published DEMO Template Using Batch File" –log

Any template that generates through Document Publisher can generate through a batch file.

As you can see in the command window below, 3 templates are being generated, a doc, a docx and a docm.

Command line window
Command Window showing 3 types of document being generated

Once the documents are generated, they can be seen in WorkBench in the Project sidebar under the Formal Document sections:

Project sidebar Formal Documents sections
Project sidebar – Formal Documents sections showing the 3 generated documents

Using parameters within a batch file

The great thing about using a command line batch file is that parameters can be set, as long as the template has parameters setup. This means you can run the same document many times but use different parameters for each run with a different document output name. For example if you used ?reqID within the Key or Identity you could output different Requirement Documents.