One OO Approach to Business Modeling
I.Bider (IbisSoft, Stockholm), M.Khomyakov (M7, Moscow)
(Experience Report for Workshop on Business Modeling for OO systems attached to OOPSLA´97)
1. What’s Wrong with Object-Orientation - Requirements for Object-Oriented Business Process Model
There is no common definition of what object is which is accepted by all members of the software development community. The most general definition that everybody might agree is:
An object is a piece of software system that:
There can be many possible interpretations of this general definition, however there is one that is mostly spread, i.e.:
This definition was worked out in the field of object-oriented programming, and it is powerful enough to code any software system. In recent years, this definition has been also used for design of object-based application systems, technical, as well as nontechnical, i.e. business applications. Even if this definition might be acceptable for the technical system design, it’s not intuitive and hence is not appropriate for designing interactive business applications. In the latter, the software objects represent physical objects of the application domain (companies, people, etc.), and business processes. Behavior of those kind of objects doesn’t correspond to the one of objects from the object-oriented programming paradigm. The common result of using the above definition to business application design is an employee object that has a method of calculating it’s own wages, which doesn’t make any sense from the application domain point of view.
Objects that represent business processes posses some interesting features that require special consideration in an object-oriented model, e.g.:
2. OO Model Suitable for Business Modeling
The described below OO model was worked out in 1989-90 for the "DealDriver" project the objective of which was to build an application for supporting sales and marketing activities of a trading company. The systems was aimed to help office workers in organizing their everyday (routine) work that consisted of the following operations:
To build the application, we needed a model that would allow us to tie together different operations that could be performed by different people who might belong to different departments of the company (organization) they worked for. For this end, we considered the company's activity as a number of processes (such as "processing an order", "closing a deal", etc.) without regard to the way these processes were organized and managed within the particular company.
These business process were represented in our model as objects which we call organizing objects (or orgobjects for short) to stress their importance in organizing all activities of the business process The state of an orgobject reflects the current state of the business process, the difference between this state and the legitimate final one showing what further actions should be undertaken in order to reach the process goal.
In our model, object is a central notion. Not only are business processes represented as objects, but also all other entities of the application domain, such as customers, goods, patients, the company’s personnel, etc. Objects are complex and dynamic. The complex nature of objects is reflected by links that show the inclusion of one object into another. The dynamic properties of objects are represented with the help of:
History is the time-ordered sequence of all the previous states of objects. The history is most important for objects that represent business processes (orgobjects, as we call them) as it shows the evolution of the process in time. The history in some cases is used in addition to the current state of the orgobject to figure out what further steps should be completed to transfer the object to the final state.
Events are a special kind of objects that present additional information about transitions from one state of the object to another, like date and time when the transition had occurred in the real world, date and time when it was registered in the system (may differ from the previous one), the person whose actions caused changes in the object (if applicable), his comments on the event, etc. A new event object is born each time some other object in the system has been change. An event is a system object aimed to tie the transition of the orgobject from one state to another to the point in space and time of the real world, e.g., when, where, who, etc. However, it possesses all the properties of other objects in the model. In fact, it can be changed, for example, in order to add additional comments on the event later. Changing the event object, naturally, will cause the creation of a new event to describe who when and why tried to alter the history (no "1984" is allowed). The sequence of events that concern the particular object represent a written history (interpretation) of this object, as opposed to the real history, i.e. the sequence of the previous states.
Activities represent actions that take place in the world of application domain, like getting a sales order, shipping goods, administering a drug to a patient, performing a software module compilation, etc. In the model, the activity moves an orgobject to the next stipulated state. An activity may be planned first and executed later. This process is realized in our model by a notion of planned activity. A planned activity is an object that contains such information as type of activity (shipping, invoicing, etc.), planned date and time, deadline, reference to the person who is responsible for performing the activity, etc. Planned activities are included in the orgobjects which they will affect when executed. All planned activities included in the given orgobject compose the immediate plan of the process evolution. When executed, a planned activity changes the orgobject to which it belongs. This change may include adding new planned activities and deleting the old ones (for example, the one that is being performed) which will affect the object evolution in the future. When executed the planned activity becomes an event registered in the system.
Planned activities helps to realize the idea of dynamic and distributed planning. Dynamic planning involves planning only the first few activities at the first stage. As soon as one or several of these are completed, new activities are planned with regard to the emerging state of the relevant orgobject. Distributed planning implies that the worker who has completed a planned activity himself plans the subsequent activities, thus there is no central planning. Moreover, he/she can assign these new activities not only to himself, but to other people too.
Naturally, human beings that work with the system are also represented as objects, a kind of resource objects. As we’ve seen above this objects are referenced to at least in two places of our model, i.e., events, and planned activities. This references show two main characteristics of the persons’ works:
Note:
On the surface, our practical model is very much like a workflow diagrams, however internally it’ s quite different, from both theoretical and practical point of views, e.g.:3. Concluding Remarks.
During the DealDriver project, we created home-made development tools that included Hi-base - an object-oriented historical database, and Navi - an object oriented user-interface system. Hi-base is able to store all the previous states of the objects and show them on demand. Navi allows the end-user to easily navigate along the links connecting various objects to each-other in presence and past (history). The results of the project are summarized in brochures [1,2]. The model, and tools were later successfully used for building prototypes and working applications in other industries. One of those applications won the "Object Applications of the Year Awards 1997" in the group "Best object-based application developed using nonobject-oriented tools" (Object World Show in London, April 1997).
Actually, the business process model described in section 2 is a specialization of a more abstract model from our previous research work on the CHAOS project (CHAOS stands for Concurrent Human-Assisted Object Systems). The project's objective was to work out a formal model for describing distributed interactive systems. This model is based on the notions of objects and connectors.
Objects are used to represent the elements of the "real world", whereas connectors are the active elements of the system whose task is to make changes in the objects. A connector may be thought of as a little computer connected to one or several objects. As soon as some of these objects change, the connector changes all the other objects to restore the consistency of the system. Thus defined, our model has a purely reactive nature, i.e. changes in objects are made as a reaction to changes in other objects. But objects can be complex, i.e. they themselves can contain connectors, which means that a reaction can result in adjusting the system configuration to changes in the environment.
The specialization of the model for business purposes basically consisted in using another set of terms. Complex objects became orgobjects, connectors became planned activities, and the principle of reactive reconfiguration of the system became dynamic and distributed planning. This specialization gave us the possibility to both communicate with the future users, and built real applications. However, having a more abstract model in mind, gave us an additional level of testing different alternatives when working on the practical model.
References