Online UML class and statechart diagrams for your Cloudfier apps

Starting today, you can visualize your Cloudfier applications using the UML graphical notation, as both class and statechart diagrams. This feature was one of the most requested when I am presenting Cloudfier. People get that the textual notation (TextUML) is better for actually building the application, but diagrams are useful for someone new to the application to quickly get the gist of it.

How to show Cloudfier applications as UML diagrams

Since Cloudfier shows the diagram for the deployed version of the application, not what you are editing right now, you need to deploy the application first. In order to deploy, you can use the app-deploy or full-deploy commands. If the application is already deployed, you can use the cloudfier info command to just show the links to diagrams:

cloudfier info cloudfier-examples/car-rental

app-info

Then just click one of the links to class or statechart diagrams. This will open the diagram in a new tab. here is an example of a diagram URL:

The URL determines what package we are rendering and what elements should be rendered (via query parameters). By default, class diagrams are showing classes with attributes and operations (live class diagram example), and other classifiers, whereas statechart diagrams show only statemachines (live statechart diagram example). But feel free to to customize the URL to show exactly what you want to see (you can even mix statechart and class diagram elements in a single diagram). Here are all the supported options so far:

  • showAssociationEndOwnership (boolean)
  • showAssociationEndMultiplicity (boolean)
  • showAssociationName (boolean)
  • showAssociationEndName (boolean)
  • showAttributes (boolean)
  • showClasses (boolean)
  • showClassifierCompartmentForPackage (Current, Immediate, Any)
  • showClassifierStereotypes (boolean)
  • showComments (boolean)
  • showDataTypes (boolean)
  • showElementsInOtherPackage (Never, Immediate, Always)
  • showEmptyClassifierCompartments (NotEmpty, Never, Always)
  • showEnumerations (boolean)
  • showFeatureStereotypes (boolean)
  • showInterfaces (boolean)
  • showOperations (boolean)
  • showParameters (boolean)
  • showParameterDirection (boolean)
  • showParameterNames (boolean)
  • showPrimitives (boolean)
  • showRelationshipStereotypes (boolean)
  • showReturnParameter (boolean)
  • showSignals (boolean)
  • showStateMachines (boolean)
  • showStructuralFeatureVisibility (boolean)

If you feel like you need more control, feel free to enter an issue.

To finish this post, a couple of snapshots for posterity:

Statechart for the Expense entity

Statechart for the Expense entity

Two statecharts from the carserv application

Two statecharts from the carserv application

Email this to someoneShare on FacebookShare on LinkedInShare on Google+Tweet about this on Twitter

Comments are closed.