R. Meersman, Z. Tari (Eds.): CoopIS/DOA/ODBASE 2002, LNCS 2519, pp. 948-964, 2002. © Springer-Verlag Berlin Heidelberg 2002 Adding Business Rules and Constraints in Component Based Applications 1 Antonio Coronato 1 , Marco Cinquegrani 1 , and Giuseppe De Pietro 2 Progetto Mezzogiorno, Consiglio Nazionale delle Ricerche, Via Castellino 111, 80131 Napoli, Italy {coronato.a, cinquegrani.m@irsip.na.cnr.it} 2 Centro di Ricerca sui Calcolatori Paralleli e i Supercalcolatori, Consiglio Nazionale delle Ricerche, Via Castellino 111, 80131 Napoli, Italy {depietro.g@cps.na.cnr.it} Abstract. Models have demonstrated to be the most efficient tool to formalize system properties that have to be developed. Currently, designers are able to accurately specify high-level as well as low-level system details by means of visual UML models. In the case of component based applications, after having produced UML visual models, designers have to describe component interfaces. This task is accomplished by means of the standard Interface Definition Language (IDL). Unfortunately, IDL does not allow designers to take into account system properties like object constraints, relations, and business rules, as reported by UML models. Therefore, no trace of such properties is kept into skeletons of source code automatically generated by idl compilers so that their implementation is completely in charge of software programmers. In this paper a process for adding object constraints and business rules in component based applications is presented. In particular, we provide: i) a constraint language to produce models, in addition to idl interfaces, for specifying object constrains and business rules; ii) some implementation patterns for turning constraints and rules in source code; and iii) a preliminary tool able to interpret the constraint language and then to add rules and constraints in the skeletons of software components generated by a commercial idl compiler. 1 Introduction From some years now, modeling activities have been assuming ever more relevance in software production processes. As matter of fact, models have resulted in the best way to handle the growing complexity of software systems. This has made the Unified Modeling Language (UML) [5] an essential tool for developing high quality, possibly error-free, complex systems or, from another point of view, the potentialities of the UML to produce highly accurate models have let modeling activities assume a crucial role in any software production processes. In addition, the OMG is defining a 1 This research has been partly supported by the “Nuove tecnologie per la conoscenza, lo studio e la gestione dei beni artistici e culturali: il patrimonio museale della Provincia di Catania” project.