Frames contain arbitrary information within an item. They can be set to hold anything from plain text, to a URL, a date or a word processor document . Access to these items is controlled based on the user’s privileges, team and the item’s status. Finer granularity of control can be achieved with skill based frame access. This ensures that users must hold a particular skill in order to see or edit the data within the frame.
Setting-up Skill Based Frame Access
Frame Assignment
Each item type can have frames assigned to it. Within project setup choose the item type, and add the frame type required. In this example a MANAGEMENT skill is being assigned to the Assessment Frame for the Regulations item type.
User Skill Assignment
For each user that should be able to see the frame, assign the chosen skill to them. Here we are assigning the MANAGEMENT skill to the user ASSISTANT_MANAGER but not to the SOUS_CHEF
Visibility in the User Interface
When the user accesses an item containing frames, whether they get to see the information or not, is controlled by the skills they possess. In this example both the ASSISTANT_MANAGER and SOUS_CHEF have logged into Cradle’s WorkBench and are querying the Regulatory Requirements for the establishment being planned. The ASSISTANT_MANAGER is allowed to see both the regulation document (stored as a pdf) and the management notes about their current compliance level. The SOUS_CHEF can see the Regulatory Requirements, so that they can aid implementation in roll-out, but is not privy to the management’s comments.
Application in Your Industry
The illustration above is deliberately simple and fairly generic. It should, however, be easy to see how projects, whatever topic they cover, can be set to allow certain users access to certain parts of the data but no others. Access may be restricted to NO_ACCESS or to READ_ONLY. The project may be quite happy for all engineers to see a financial budget frame for every component, but not so keen on having it changed by the implementer! The help section covers more on frame access.
Each query can have an initial View associated with it. Each time this query is run, it will apply the view. This is the best way of controlling your initial view for a particular query.
Shown in the screen shot below the project view ‘results‘ has been set in the query ‘My Results‘ each time this query is run the columns specified in the View Details are shown. There’s nothing to stop a user selecting a different view in the ribbon later.
Remember that View
WorkBench is designed to remember the last view you used for a particular item type. It’s likely that next time you run a query for the same item type, you’ll want the same view. Even if you close all your tabs, within the same session you are controlling your initial view of each query by the last choice you selected.
Initial Influence
You can control the initial view selected for a query in a project by associating a view with an item type in the project’s schema. Open Project Setup and select the item type and an appropriate view. When starting Cradle, this will be the view selected for this item type, the first time it it is queried. Thereafter, WorkBench will switch to “Remember that View”.
QAB Queries and Views
The Quick Access Bar at the bottom of WorkBench as some auto generated queries and auto generated views for speed. If one of these is selected then the the view that is ‘remembered’ will be the last one of the Automatic views.
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:
Some characters have special meanings within regexes these characters are:
Char
Description
Meaning
\
Backslash
Used to escape a special character
^
Caret
Beginning of a string
$
Dollar sign
End of a string
.
Period or dot
Matches any single character
|
Vertical bar or pipe symbol
Matches previous OR next character/group
?
Question mark
Match zero or one of the previous
*
Asterisk or star
Match zero, one or more of the previous
+
Plus sign
Match one or more of the previous
( )
Opening and closing parenthesis
Group characters
[ ]
Opening and closing square bracket
Matches a range of characters
{ }
Opening and closing curly brace
Matches 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 regex1\+2=3
For further information on using regexes in Cradle see our online help.
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.
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.
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).
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*.
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
At a command prompt cd %CRADLEHOME%\bin\exe\windows\or cd $CRADLEHOME/bin/exe/linux-ia32 or linux-x86_64
Execute test_login.exe or ./test_login.exe
Agree to continue with 'y'
For a basic test select 3 to login to the DEMO project as MANAGER
Select 7 to start the test
This will then tell you the method being used to find the CDS for now press 'y'
Move through the stages pressing 'y' each time and observe the result
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.
Item cross references can be captured through Document Loader in several ways. In this blog we deal with how to set Mapping Cross References in a Table. With all items in one or more tables, the linked items are in a cell using a comma to separate them. These cells will be mapped for the cross references.
The tables above show information created in a document. The first shows each item in a separate table and the second each item is a single row.
The columns in the second table are;
Key – The Identifying number for the item
Name – The text name being assigned to the item
Description – The text to be captured into the frame of the item
Linked Requirements – The list of Keys (1st column) to which this item is related. It is not necessary for every item to link From/To other items. For example 1.1 links to child item 1.1.1, it is not necessary to link 1.1.1 back to 1.1 in the table.
You can only set one item type to be linked per table.
Table Mapping
Document Loader allows you to map cross references From or To items of different item types. There will be two options for From and To item types for each item type in the schema. This includes Specifications but not Data Definitions or Diagrams. Cross References can be set To and From the document. This is not necessary as each item has a link added back to the document when captured.
The options will show in a list like the example below:
– Xref from <item type> by identity – Xref from <item type> by hierarchical attribute – Xref to <item type> by identity – Xref to <item type> by hierarchical attribute
Mapping Item Per Table Cross References
Load your document and right click on the cell you want to map and select Table Details. When the Table Details UI opens if not already selected, click on Item Per Table. To map the cells, the option is pulled over to the right column to the attribute you require it. The attribute in the right column is selected and then double click on the required option. Map the cells making sure you map one of them to an Identity or hierarchical attribute (Key). Set the cross reference cell by selecting the appropriate option.
For example in the first single table in the first screenshot, the numbers are for the Key attribute of an item. This means using the options with the hierarchical attribute in them.
As the links in the above example are to other items of the same type the option Xref to Requirement by hierarchical attribute is used. This will capture the cross reference from item 1 to 1.1. If I had put the cross reference to item 1 in the cells of the other items, I would have used Xref from Requirement by hierarchical attribute. This would then capture the cross references in the opposite direction of 1.1 from 1.
This mapping can be exported and used for other tables within the document and selected through the Copy table mapping drop-down.
Mapping Item Per Row Cross References
Mapping Item Per Row is similar to Item Per table but instead of mapping cells you are mapping columns. As before, right click on the table and select Table Details. As before set the attributes like Key and Name etc, then set the Linked Requirement using the Xref to Requirement by hierarchical attribute option.
Capturing the information
Once all the paragraphs and tables are mapped with the relevant options, the user can capture the document. The cross references from these cells are created at the end of the capture so that all the items should be in the database.
You will often want to organise information in a hierarchy. The hierarchy represents an entire collection of information. You can view the hierarchy at any level that is convenient. In effect, each level summarises the levels below it. Therefore, you may want any numerical information at the bottom of the hierarchy to be totalled at each higher level. So, it is common to use hierarchies to aggregate and apportion values.
Cradle can help you by calculating appropriate values at each level in the hierarchy. In the following System Breakdown Structure (SBS) hierarchy, the total weight of that component and everything within it is shown inside the square brackets:
Aggregation and Apportionment
Aggregation means to add together. In the example, the components of the transformer are:
Transformer, weight 15
Transformer mount, weight 5
Therefore, the aggregate weight is 20, which is shown as the weight of the entire transformer.
Apportion means to divide, or split. If a set of pumps is to weigh at most 200kg, and there are 4 pumps, then we can apportion this weight budget equally between the four pumps. So, each pump is to weigh 200kg divided by 4, which is 50kg for each pump.
So we normally aggregate actual values up a hierarchy.
Therefore we normally apportion a budget value down a hierarchy.
Use Hierarchies to Aggregate and Apportion Values
You can aggregate values up a hierarchy by:
Create an integer attribute that stores the value for each item
Create a calculation that adds the item’s value and the total of the values of all its children
Store this calculated value as the total for this item and its children
Another way to say this is:
value for an item = user-supplied value
total for an item = value for the item + total of the ‘total for an item’ for all children
You can apportion values down a hierarchy in a similar way:
Create an integer value that stores the budget value for the item
Create a calculation that divides the item’s parent budget value
Store the calculated value as the budget for this item
Integer Attributes
You can create integer, or positive integer, attributes in items. An integer attribute can only store an integer value. You can only store integers greater than or equal to zero in a positive integer attribute.
You can create integer attributes as categories and then assign them to your items. For example, you can create an integer attribute Weight by:
Ensure you are logged-in as a user who has PROJECT privilege so you can change the schema
Select Project Setup from the Project tab
Set Options to Item Definitions and select the Categories tab:
Select New… and enter the name of the new attribute, for example Weight, and set its type to be Integer or Positive Integer:
Assign the new Weight category to an item type by:
Select the Item Definitions tab
Choose the item type
Select Categories
Select an unused category assignment and select the new Weight category:
Repeat this process to create another positive integer attribute Total Weight and also assign it to the item type. This is the attribute that will receive the result of the aggregation calculation.
The Aggregation Calculation
The last step to use hierarchies to aggregate and apportion values is the aggregation or apportionment calculation.
Still inside the schema and with the same item type selected:
Select Calculations…
Select New and enter the calulation‘s name, such as Weight Calcs
To define the expression, we start by choosing the item’s own weightcategory:
Then click the + button or manually enter + into the calculation to perform an addition
Then choose to total the Total Weight of all child items. We find the child items by finding all items of the same type that are linked to the current item by following all cross references found by the navigation Downwards. When we find these linked items, we get the Total Weight value from them:
Select Validate to check the expression that we have created
Finally we specify that we want the result of the calculation to be stored in the integer category Total Weight that we calculated. This means that each item’s total weight will be available to its parent item when it get values from its children, see 2 above
Using the Results
We can use hierarchies to aggregate and apportion values and the results can be used either directly from the calculation, or by saving the result of the calculation in an attribute.
You can either display a calculation or the category that stores its result. The values can be shown in views. This is what what we did to produce the SBS display at the start of this blog entry. Here is the view:
You can use a calculation, or the category that stores its result:
In other calculations, or
As part of rule sets, or
To calculate part of a metric, or
To calculate KPIs (key performance indicators) in dashboards
You will often want to organise information in a hierarchy. In a hierarchy, each item of information will have a unique Identity, a hierarchical number and (usually) a name. Displaying item hierarchies nicely will help everyone to clearly understand the information and its structure.
For example, here is a (very!) simple collection of System Breakdown Structure (SBS) hierarchies:
This display clearly shows the hierarchical structure of the items, their hierarchical numbers, and their names.
Displaying Item Hierarchies
Hierarchies display items with a label. This label contains the item’s Identity, Name, Version and Draft ID attributes.
3SL recommends that hierarchical items are auto-numbered. Therefore, their Identity will not be the nice hierarchical number that users will want to see. That hierarchical number is normally stored in the Key attribute.
Therefore, we want the labels for items in a hierarchy to contain the Key and Name attributes.
Create a View for Trees
So, your first step is to define a view to show items in trees, such as:
This contains only the Key and Name attributes, and a small text separator containing a colon. This separator is cosmetic. If you prefer not to have it, then don’t!
Save the view with a simple name such as the item type followed by Tree. In this case, the view name is:
SBS – Tree
Save it as a Project scope view. If you save the view with Project scope, everyone in the project can use it.
Tell Cradle to Use this View in Trees
The final step is to tell Cradle to use the new view when displaying hierarchies of this type of information:
Select Project Setup in the Project tab
Set Options to Item Definitions
Select the Item Types tab and select your type of information
Choose your new view from the Tree View drop-down list
Save and close the schema
After you have made this change, all hierarchies of this type of item will be shown using your new hierarchical view.
Cross references, or links, are used to connect items in the database. Each cross reference connects two items. A cross reference represents the fact that the two items are related in some way. Sometimes, it is helpful to load cross reference links en masse from an external file.
Types of File to Load
Cradle can load data from files in three main formats:
Cradle
CSV / TSV, comma separated value or tab separated value
XML, there are many possible dialects of XML
Microsoft Excel® can easily produce CSV files. Also, it is easy to work with collections of simple data in Excel. Therefore, we recommend that you use Excel to load cross reference links into Cradle using CSV files.
Example
In this blog entry, we will assume that you want to load cross reference links between user-defined items, such as system requirements and verifications, or test cases to test results. So, if you want to do anything else, please look in the reference section below for links to the Cradle help.
In our example, we will create links of type FRED from PROCR items to SR items.
Create Cross Reference Links
You will need the following columns in your Excel spreadsheet:
Type, use the value: NOTE_NOTE
Link Type, the link type of the cross references that you want to create. In our example, this is the link type: FRED.
From Info Subtype, use the value: NULL_INFOSUB
For From Model Namespace, use the value: MH_IGNOREMODEL
From Number, this contains the Identity of the item at the from end of the cross reference. In our example, this is the Identity of the PROCR item.
From Type, this contains the type of item at the from end of the cross reference. In our example, this is: PROCR.
To Info Subtype, use the value: NULL_INFOSUB
For To Model Namespace, use the value: MH_IGNOREMODEL
To Number, this contains the Identity of the item at the to end of the cross reference. In our example, this is the Identity of the SR item.
To Type, this contains the type of item at the to end of the cross reference. In our example, this is: SR.
These fields can be in any order.
Load Cross Reference Links
You can load the CSV file containing your links by:
Select Import from the Project tab in WorkBench
Set: File Type to be: CSV
Then, set: Info Type to be: Cross References
Also, set: Overwrite to be: Off, as this is safer than the other options(!)
And set From file to be where your CSV file is stored
Click Import
You will be asked to define the mapping between fields in the CSV file and the attributes of cross references. Because the column headings in Excel match the names of the attributes, everything is mapped automatically:
Click OK to load cross reference links from the CSV file.
Link Rules
The link rules defined in your schema are used to control if cross references will be imported from your CSV file. You can set an option to ignore your link rules, if you want to.
Dangling Links
Importing cross references this way may create dangling cross references. A cross reference is dangling if the item at its from end, or its to end, does not exist. Cradle allows you to import these cross references because it would be too restrictive to prevent you doing this.
You can detect and remove dangling cross references using the Cross Reference Integrity check in the Project tab in WorkBench.
Reference in Cradle Help
You can review the details of Cradle’s CSV file format in the Cradle help. Every Cradle system contains the Cradle help. You can access this help from the Help tab in every Cradle UI, and (on Windows) from the Cradle Help item in the Start menu.
We also provide the Cradle help on-line in our website:
You may need to change attributes or a category of many items and there is an easy way to do this in one go.
Changing Attributes
The attributes of the same or different item types can be changed at the same time. In the image below, all the Group attributes are empty and I want to group this set of items. To change attributes, select them all, right click and select Properties.
In here I can enter some text in the Group attribute and when I click OK all the items selected will be up dated. I could change any of the options shown in Item Properties and it would up date all the items with the same information.
This will work on items in link views as well so you can change all of the linked items at one.
Changing Categories
This will only work for items of the same item type. Select all the items you wish to change, right click on them and select Properties. If all items are the same type with the same categories, Item Propertieswill show all of the categories for that type.
Selecting a new option will change all the items at the same time. Multiple Category types can also be changed here and will affect every item selected. All of the categories can be changed at the same time, if required, along with all the attributes shown above.
Related Articles:
For further information on attributes and altering data: