Code Generation for UML 2 Activity Diagrams

Towards a Comprehensive Model-Driven Development Approach
  • Dominik Gessenharter
  • Martin Rauscher
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6698)


Modeling static structure and modeling behavior are often regarded as two distinct topics, however, in UML they are not. They are even tightly coupled as can be seen e.g. by looking at attributes: That an attribute holds values at runtime is defined within the Classes language unit whereas the act of setting or getting a concrete value of an attribute is defined in the Actions language unit.

Tool support for modeling static structure is far more advanced than for modeling behavior. In particular, further model processing for activities like transformations or code generation is in a rudimentary stage.

In this paper, we present an approach for code generation for activities preceded by model transformations. Besides advancing model-driven development to properly include behavior, our contribution also enhances structural modeling by providing generation of code for accessing structural features based on the UML semantics of Actions.


UML Actions Activities Code Generation 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Bhattacharjee, A., Shyamasundar, R.: Validated Code Generation for Activity Diagrams. In: Chakraborty, G. (ed.) ICDCIT 2005. LNCS, vol. 3816, pp. 508–521. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  2. 2.
    Bock, C.: UML 2 Activity and Action Models Part 2: Actions. Journal of Object Technology 2(5), 41–56 (2003)CrossRefGoogle Scholar
  3. 3.
    Broy, M.: Challenges in Automotive Software Engineering. Proceedings of the ICSE 2006, pp. 33–42 (2006)Google Scholar
  4. 4.
    Crane, M.L.: Slicing UML’s Three-layer Architecture: A Semantic Foundation for Behavioural Specification. PhD thesis, Queen’s University, Kingston, Ontario, Canada (January 2009)Google Scholar
  5. 5.
    Eclipse Foundation, Inc. Eclipse Model Development Tools (MDT) (2011),
  6. 6.
    Eichelberger, H., Eldogan, Y., Schmid, K.: A Comprehensive Analysis of UML Tools, their Capabilities and their Compliance. Software Systems Engineering, Institut für Informatik, Universität Hildesheim (2009)Google Scholar
  7. 7.
  8. 8.
    Gessenharter, D.: Implementing UML Associations in Java: A Slim Code Pattern for a Complex Modeling Concept. In: RAOOL 2009: Proceedings of the Workshop on Relationships and Associations in Object-Oriented Languages, pp. 17–24. ACM, New York (2009)CrossRefGoogle Scholar
  9. 9.
    Gessenharter, D.: Extending The UML Semantics for a Better Support of Model Driven Software Development. In: Software Engineering Research and Practice, pp. 45–51 (2010)Google Scholar
  10. 10.
    Gessenharter, D.: UML Activities at Runtime - Experiences of Using Interpreters and Running Generated Code. In: Trujillo, J., Dobbie, G., Kangassalo, H., Hartmann, S., Kirchberg, M., Rossi, M., Reinhartz-Berger, I., Zimányi, E., Frasincar, F. (eds.) ER 2010. LNCS, vol. 6413, pp. 275–284. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  11. 11.
    Harel, D.: From Play-In Scenarios to Code: An Achievable Dream. Computer 34, 53–60 (2001)CrossRefGoogle Scholar
  12. 12.
    Koch, N., Kraus, A.: The Expressive Power of UML-based Web Engineering (2002)Google Scholar
  13. 13.
    Koch, N., Zhang, G., Baumeister, H.: UML-Based Web Engineering: An Approach Based on Standards. In: Web Engineering: Modelling and Implementing Web Applications, pp. 157–191 (2008)Google Scholar
  14. 14.
    LMU: Ludwig-Maximilians-Universität München, Institute for Informatics Programming and Software Engineering. UWE Examples (December 2009),
  15. 15.
    Mellor, S.J., Balcer, M.: Executable UML: A Foundation for Model-Driven Architectures. Addison-Wesley Longman Publishing Co., Inc., Boston (2002); Foreword By-Jacoboson, IvarGoogle Scholar
  16. 16.
    Object Management Group. Introduction to OMG’s Unified Modeling Language (UML) (July 2005),
  17. 17.
    Object Management Group. Action Language for Foundational UML (Alf), Concrete Syntax for a UML Action Language, FTF Beta 1, OMG Document Number: ptc/2010-10-05 (2010)Google Scholar
  18. 18.
    Object Management Group. Unified Modeling Language (OMG UML), Superstructure Version 2.3 (2010), OMG Document Number: formal/2010-05-05Google Scholar
  19. 19.
    Object Management Group. Semantics of a Foundational Subset for Executable UML Models (fUML), v1.0 (2011), OMG Document Number: formal/2011-02-01Google Scholar
  20. 20.
    Sarstedt, S.: Semantic Foundation and Tool Support for Model-Driven Development with UML 2 Activity Diagrams. PhD thesis, Ulm University (2006)Google Scholar
  21. 21.
    Sulistyo, S., Prinz, A.: Recursive Modeling for Completed Code Generation. In: Proceedings of the 1st Workshop on Behaviour Modelling in Model-Driven Architecture, BM-MDA 2009, pp. 6:1–6:7. ACM, New York (2009)Google Scholar
  22. 22.
    Usman, M., Nadeem, A.: Automatic Generation of Java Code from UML Diagrams using UJECTOR. International Journal of Software Engineering and Its Applications 3(2), 21–37 (2009)Google Scholar
  23. 23.
    Blu Age Corp., Blu Age (2011),, §3.5.1
  24. 24.
    Mentor Graphics Corp., BridgePoint UML Suite (2010),
  25. 25.
    Fujaba Development Group, Fujaba Tool Suite 4.3.2 (2007),
  26. 26.
    Papyrus, Open Source Tool (2011),

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Dominik Gessenharter
    • 1
  • Martin Rauscher
    • 1
  1. 1.Institute of Software Engineering and Compiler ConstructionUlm UniversityUlmGermany

Personalised recommendations