OODM2CBDM

The rCOS Modeler for use case-driven development of component- and object systems features a new major transformation: the use of sequence diagrams to specify components. With the new transformation, we can easily transform an object-oriented sequence diagram into an rCOS component sequence diagram.  By using it,, we can transform an object-oriented model to a component-based model in an interactive, stepwise manner. Transformations are executed using the QVT-based model transformation using XSLT plugin.

To demonstrate the new features, as usual we use the CoCoME Example. Open the example/CoCoME/CoCoME_OO directory, double click on CoCoME_OO.rcosdi, and you will see the Process Sale usecase diagram. Right click on the usecase, select "Open component diagram", and then right click on the the provided interface, and select "Open sequence diagram". The following sequence diagram will open.

Seq

 

Seq

To do the first OO-SeqD to COM-SeqD transformation, select lifelines L_CashDeskL_Sale and L_LineItem, right click on them, choose "Lifelines to Component", andset L_CashDesk as the main lifeline.

 

Press "OK" to start the transformation. As the result, the orginal sequence diagram becomes the following one:

Seq

For the second transformation, we select the lifelines L_Store and L_Item from the above sequence diagram,  and indicate L_Store as the main lifeline. After this transformation, the sequence diagram is changed into the following one.

Seq

If we come to the component diagram view, we find the following component diagram:

Seq

Right click on the interface ConInter_L_Store, select "Open state diagram" or "Open sequence diagram", we can see the protocol for component COM_L_Store:

Seq Seq

Finally, for the third transformation, we select the lifeline L_Pay from the sequence diagram, and turn  into a component COM_L_Pay. Thus we get the final component sequence diagram,  in which all lifelines represent components, except the one representing the actor:

Seq

 

Meanwhile, in the component view, we get the final component diagram, which depicts the relationships among the three components of the model.

Seq