Holocentric website

February 2009 eNewsletter

visit website

Tips 'n' Tricks in Modeler: Dynamic Property Displays

This tip involves some minor scripting, but the result can be quite powerful.

Occaissionally, you may want to display or review the underlying properties of an item or items on a diagram in Holocentric Modeler, for example the description of a use case or an actor.

It is possible to display any property that is available in the model for an item, for example the person who last modified the item, the date they did the modification, a metric, or a custom property field that you have added to the item.

How?

Displaying a property can be achieved by placing a Note or a Shape on a diagram, associating it with an item on the diagram and then inserting a script that will return the required property of the associated item.

In the following example, we will use the description of an item as the property we wish to display.

The steps required are:

 
  1. Open a suitable diagram. In this example you will use a Process diagram.

  2. Select the Note tool from the Toolbox and place on the diagram. (NB: A Rounded Rectangular Shape tool a Note item could also have been used, however the Note tool resizes automatically). Refer Image 1.

  3. The Note Editor will open.

  4. Click on the Insert Link/Script icon to open the Insert Rich Text Field editor, and then click on the Script radio button. Refer Image 2.


Image 1 - Creating the Note


Image 2 - Setting up the Script

  1. Enter the following text string into the Script Type field (include the capital I in Item):
    connectionItem.model.description

  2. Click OK to close both editors.

  3. The note will show the following result in red text: dnu: DiagramNote#description. Don’t despair, this just means the script can’t return anything as the note hasn't yet been connected to an item on the diagram.
  1. On the diagram, connect the note to the item whose description you want to display by using the Annotation Connection tool from the Toolbox. After you refresh the diagram (using <F5> or the Refresh icon from the toolbar) or once you reposition the note on the diagram, the text within the note will update and should now display the description of the linked item as per Image 3.

    NB: If no text has been returned, make sure the item you have linked to actually has a description.


Image 3 - Displaying the Description

The following table displays a range of other examples that you might like to experiment with:

If you want to display this:

Type this:

Duration of activity

connectionItem.model.avgActivityDuration

Person who last modified an item

connectionItem.model.lastModifiedBy

The date the item was modified

connectionItem.model.dateModified

A customised property (must be the exact name including capitals)

connectionItem.model.name of customised property

   

NB: If you wish to display multiple properties within the same note, simply insert a script for each separate property required. You can also add headings within the note’s text to enhance the information displayed.

Experiment with this script and you will find this to be a very useful addition to your models. It is particularly useful in general diagrams when there is specific information to display.

Happy Modeling!

 
Holocentric is a leading provider of knowledgebase solutions which enable organizations to better understand how their people, processes and technology can combine more effectively.
Holocentric : Level 2, 73 Walker Street, North Sydney NSW 2060, Australia, t: +61 (2) 9957 3169
© Holocentric Pty Ltd. All Rights Reserved ~ Privacy Policy ~ Visit us online: www.holocentric.com