Posts

Last month in our blog on Software Testing for State Machines with Altova UModel we discovered unexpected behavior in our model of an air conditioning system and challenged readers to improve the design. This post describes one possible solution. When we ran the Tester application for our model, we saw that the Power switch did not turn the system off when it was in the Standby state. In the state machine diagram in our original model, the only route into Standby from Operating mode is via the Standby button, and the only way out of the Standby state is to press the Standby button again, as seen in the detail below. We can create an alternate exit to power off the system from the Standby state simply by drawing a new transition line from Standby to the Off state, and assigning powerButton() as the event that triggers the transition. UModel makes assigning the trigger easy by providing a pop-up window listing events that are already defined in the model. Our completed revision to the model with the new transition from Standby to Off looks like this: After regenerating the Java code and compiling the new version, we can run the Tester application again. The Debug output message window shows that the system entered Standby in Event 3. Event 4, activation of the Power button, now sets the state to Off. Find out for yourself how you can enhance the logic of your own state machine diagrams with Altova UModel – download a free 30-day trial today!

Many varieties of software testing have gained prominence as developers search for ways to improve quality and meet project deadlines – code review, unit testing, regression testing, beta testing, test-driven development, and more. Regardless of a project’s goals or the source code language employed, it’s well accepted that the earlier a defect is found, the easier, cheaper, and more rapidly it can be fixed. Code generation from UML state machine diagrams, a new feature introduced in Altova UModel 2011 Release 2, can be used to validate conceptual logic very early in project development. Real-world design in a state machine diagram An example included with UModel provides a simple and realistic state machine diagram with a small test application you can run to see for yourself how easily it can be to test the logic of a design. The state machine diagram in the AirCondition.ump project in the UModel 2011 examples folder describes the operation of a typical heating and air conditioning system. The system includes a power button shown on the left side in the transition from the Off state, a modeSelect function that selects heating or cooling, a speedSelect function for the fan, and a standby button that puts the system in the standby mode shown on the right. The example project folder includes all the code generated for the diagram by UModel in Java, C#, and Visual Basic. To try out the Java version, all we have to do is use the command javac STMTester.java to compile the code and java STMTester to run it. The tester application displays a simulated control panel with information windows about the heating and air conditioning unit. The operating buttons appear along the top, the current state is described in the first window, and output messages generated by changes in the system appear in the second window. As shown above, the system initializes in the Off state, the mode is set to heater, and the fan is off. Before you operate the system, you might want to resize the control panel and state machine diagram to follow the actions of the tester application in the diagram itself, as shown in the reduced size image below. Operating the state machine When we click the powerButton, the Current state window is updated and a detailed description of the operations that occurred are listed as Event 1 in the Debug output messages window. If it’s a hot day, we might want to change the mode to Cooling and increase the fan speed, which we can do by clicking the modeSelect and speedSelect buttons. The Current state window updates with each click, and Event 2 and Event 3 are added to the output messages window. Now we can see how the tester application lets us fully exercise the logic of our state machine diagram by clicking every possible sequence of button selections to see if they produce the expected results. For instance if we put the unit in Standby mode (Event 4 below), then press speedSelect, we see in the output messages for Event 5 that no state change occurs in the substate named RegionSpeed. Compare Event 5 to Event 3 in the output messages window as shown below. Now that the system is in Standby mode and we don’t need any heating or cooling, let’s save energy by pressing the Power button to turn it off. Wait a second – it looks like nothing happened. No transition took place in Event 6, and the Current state in the top window is still Standby! Looking back at the state machine diagram, we can see the only way out of Standby mode is to press the Standby button again. Is that really the behavior an average user would expect, that the Power button would not turn off the system from Standby mode? Just imagine how expensive this issue could be to fix if it was first identified much later in product development when the prototype was being tested by a regulatory agency! Here’s a challenge we’ll throw out on the table for our readers: how would you design another more direct route from the Standby state to the Off state? Testing your own state machines You can use the UModel state machine code generation example projects as templates to create test applications for your own designs. You will want to take advantage of the UModel feature that automatically creates operations in a class as you add operation names to transitions in your state machine. Also, the UModel Help system includes detailed information about code generation from state machine diagrams and also uses the AirCondition.ump project file as an example. Find out for yourself how you can improve project development by testing the logic of your own state machine diagrams with Altova UModel – download a free 30-day trial today!

Altova UModel® 2011 allows users to organize diagrams into subgroups and place each group in an individual layer. Layers can be selectively hidden or exposed, providing a convenient way to decompose a BPMN diagram that describes a complex business process involving multiple departments or enterprises. This layers feature can be used with all diagram types supported by UModel and can clarify any complicated diagram, such as a use case with multiple actors or sequence diagram. You could even add a comments layer to collect feedback on a model from other project stakeholders. Here is a view of the UModel Layers helper window with a Default layer and Comments layer. When you circulate the model for review, the Design layer could be locked to allow changes only to the Comments layer. It’s easy to assign elements to a layer by using the right-click context menu. Later on we could choose to hide the Comments layer from view, while retaining the layer contents in the diagram to preserve a historical record of the reviewer comments. When diagramming a complex business process, we can create individual layers for each participant so each layer then provides a simplified view into a portion of the overall process. In this application, we would name layers by department or enterprise. Here is the UModel Layers helper window for an order processing diagram indicating the Sales Fulfillment layer is visible and the Finance layer is hidden: Here is the order processing diagram showing only the Sales Fulfillment layer: To depict the entire process, we can simply make all layers visible. Here is the same diagram with both layers visible: Find out for yourself how the UModel 2011 layers feature can enhance your BPMN diagrams – download a free trial today!

Authors of various industry reference books ranging from SOA and Web services to XML continue to use and recommended Altova tools. The latest update to the Cold Fusion book series – “ColdFusion 9 Developer Tutorial” is an update to John Farrar’s “ColdFusion 8 Developer Tutorial”. In this latest update, Farrar uses the Altova MissionKit, our suite of XML, database, and UML tools to do all his XML work for the book. According to Farrar, “I have a suite of tools from Altova and find they do what I want. I can create XPath, XML Schemas, and more from their tools and don’t ever feel the need to look for a new tool.” Farrar, a ColdFusion expert, teaches the basics of ColdFusion programming, application architecture, and object reuse. He then shows off a range of topics including AJAX library integration, RESTful Web Services, PDF creation and manipulation, and dynamically generated presentation files. So whether you need an overview of XML technologies, the latest information on working with ColdFusion, or want to delve into Web services, you’ll want to check out the Altova Reference Books page on our Web site.

With the release of Version 2011 we are thrilled to bring you the Altova MissionKit in Japanese. Now all the Altova tools available in the MissionKit have been fully translated into Japanese. Like the English and German versions of the tool suite, the fully translated Japanese language version provides users with powerful functionality for XML and Web development, data mapping and integration, rendering and publishing of XML, XBRL, and database data, UML modeling, and more. All the tools available in the new Japanese language version of The MissionKit are available at the same cost as the English versions, and current Version 2011 users can now unlock any language version using their existing key code. If you haven’t checked out our latest release – Version 2011, download a free, 30-day trial today! The Japanese language version of all the MissionKit tools can be purchased from the Altova Online Shop or through your preferred reseller.

As software applications interact with growing amounts of data, database designs and structures become critical to development of successful projects. UModel® 2011, just launched on September 8, 2010, adds a new feature that empowers users to extend software modeling functionality by modeling relational databases along with Java, C#, and Visual Basic software applications.UModel 2011 accelerates database modeling with features that permits users to:

Import existing tables from all popular relational databases to create UML database diagrams

Import Existing Database Structures Users can import an existing relational database via a selection in the UModel 2011 Project menu. The Import SQL Database option opens the UModel 2011 Database Connection dialog, with the Database Connection Wizard and all the additional connection options available in DatabaseSpy and other Altova MissionKit tools that interact with popular relational databases. When importing a database, UModel 2011 also automatically adds a database profile to the project. UModel 2011 database diagrams are displayed in a special category in the Diagram Tree Helper window. Modifying Databases in the Model UModel 2011 database diagrams use a dedicated toolbar with icons indicating database elements that are shared with DatabaseSpy, easing the learning curve between tools. As editing proceeds in UModel 2011, the SQL Auto-completion helper window assists with creation of diagrams valid for the SQL database type. As an alternative to working directly in the diagram, users can also edit database elements in the Properties helper window. Database Change Scripts When a developer synchronizes program code from the UModel project, changes in any database diagram generate a Database Change Script with SQL commands to implement the revisions. Database Change Scripts created in UModel can be saved as SQL files, executed directly in the database, or opened in a DatabaseSpy SQL Editor window via a convenient button in the UModel Database Change Script dialog. Conversely, if another team member modifies a table directly in the database, a developer can update the UML model by merging the database changes. After synchronization of the UML model with the latest version of the database, the database diagram shows a new column in the Teachers table. Like all other UModel diagram types, UModel 2011 lets users save database diagrams as image files and include them in automatically-generated project documentation. Visit the Altova What’s New page to learn more about all the new features in the Altova MissionKit 2011. Model databases along with system requirements, business rules, and application code for your next development project – click here to download a free 30-day trial of UModel 2011 today!

Get the Most Advanced UML Features – And Save 50%, 70%, or Even 90% Over Competing Tools! For a limited time we’re offering special savings on Altova UModel. Combining a rich visual interface with superior usability features, UModel also includes high-end code engineering functionality to empower you with the maximum benefits of UML software development. Starting at just $149, Altova UModel delivers the most advanced UML modeling features in the industry – at a fraction of the cost of other UML tools.
The same powerful functionality and ease of use that you’ve experienced in other Altova tools is packed into an affordable, intuitive UML modeling tool. UModel supports: * All 14 UML 2.3 diagrams * SysML and BPMN * Code gen and reverse engineering of Java, C#, and VB .NET * Round-trip engineering * XMI import / export * Visual Studio and Eclipse integration * 32- and 64-bit versions * And much more Cool off with an additional 20% discount Enter code JULY10 during checkout in the Altova Online Shop for 20% off UModel. Act fast – this sizzling offer expires July 31, 2010. *Savings calculated by comparing published single-user prices of Sparx Enterprise Architect Engineering Edition, Magicdraw Professional Edition, and IBM Rational Software Architect Standard Edition including Rational Modeling Extension for Microsoft .NET, with equivalent UModel Enterprise Edition configured with comparable bundled software maintenance plans.