Sunday, 28 July 2019

Rational Rhapsody Tip #61 - Checking RTC Eclipse is set-up for IBM Rational Rhapsody use

One of the questions I had recently in training related to how to check whether your RTC Eclipse client is correctly set-up for use with Rhapsody. The RTC Client is used in concert with Rhapsody for both the Rational Model Manager (RMM) and Rational Team Concert (RTC) integration. If you have incorrectly set up the client then this may cause significant issues, particularly if it tries to use a textual merge, rather than the Rhapsody DiffMerge tool. This video (with voice), which shows Rhapsody v8.3.1 with Jazz/am 6.0.6, covers 4 checks that you can do.

This video covers how to check that your RTC Eclipse client is correctly set-up for Rhapsody use with IBM Jazz's /am or /ccm application (RMM/RTC).

When using Rhapsody with Rhapsody Model Manager (RMM) or Team Concert (RTC) the file is stored on the file-system in a sandbox area. RTC Eclipse is run at the same time as Rhapsody to act as the bridge to the Jazz/am or Jazz/ccm application and the status of the units is provided directly in the Rhapsody browser.

There are 4 checks shown in the video:

1. Firstly, you need to check that the IBM Rational Rhapsody integration for Rational Team Concert plugin is installed. The plugin files are provided as part of the Rhapsody install. An Eclipse 64 bit client will work with both 32 and 64 bit Rhapsody. If you have 32 bit Rhapsody then make sure you install the 32 bit version of the plugin

2. Rhapsody and RTC Eclipse communicate via a port on the machine. The Eclipse client's error log can be a useful diagnosis tool, as it will report whether the comms is working between Rhapsody and RTC.

3. The Rhapsody model consists of unit files under the _rpy folder. You need to check that the Automatically detect changes box is checked in the Team > Jazz Source Control > Local Changes preferences for Eclipse. This will mean that when files are saved, the Eclipse client will update it's status.

4. Finally, check that Eclipse is using the Rhapsody DiffMerge tool for Rhapsody unit file types in the Team > Jazz Source Control > External Compare Tools preferences. Double-clicking a file in the Pending Changes should launch Rhapsody DiffMerge. By default Rhapsody DiffMerge will ignore graphical-only differences, but you can choose to show them if you wish

Friday, 5 July 2019

Rational Rhapsody Tip #60 - Initializing your history connectors (in state machines)

This video came from a question I got asked in a web-based Rhapsody "hands-on" tool training course this week, which is really what are history connectors and how to use them in Rhapsody when you're building and running with the event driven framework (OxF). Unusual for me, I just banged it out with the microphone running (which worked, well mostly ;-) I've included a summary below in case you can't YouTube the whole 8 mins.

Firstly if we take this statechart we can see that if I exit and return a state then the default transition will be taken:

A history connector is a way to get the state-chart to remember the state it was in when you exit and return to it when you re-enter. The UML would normally have you drawing it something like this:

The trouble is, this won't work if you want Rhapsody to generate the desirable code, i.e. Rhapsody will still take the default transition if you re-enter the state.

to draw the history connector correctly in Rhapsiody (at least correctly to generate the correct code), you need to a) Draw the default transition to the History Connector, and b) Draw a transition from the history connector to where you want the default transition to go. 

This has the effect of initialization the history connector to the default transition.

.. and then remembering the history, the next time you re-enter the state (and the default transition is called upon).