Synthesis State-machines from a communication diagram †Example1 describes a case where every communication is asynchronous. This example explains a case where synchronous communications coexists. Example †The choreography of this example is shown right. It is almost same with Example1; shipReq becomes a synchronous message and the reply message from Shipping is changed from shipInfo to shipReq. Draw Class Diagram †Draw a class diagram in the same way with Example1. Draw Communication Diagram †Draw a communication diagram in the same way with Example1. As shown in the figure right, the reply message to 3:shipReq is 4:shipReq. Define ordering relation among messages.
synthesis state machine †Synthesize state machines in the same way with Example1. Results †
The state machine of Vendor in Example1 sends &color(blue)(shipReq}; to shipping and then receives &color(blue){shipInfo}. In this example, the state machine calls shipReq() of shipping.
Shipping receives shipReq and replies to shipReq In cbUML, execution of caller process is suspended when the communication is synchronous. In this example, the execution of the region that is in the composite state V2 and has initial pseudo state V7 is suspended on the transition from V8 to V9. When shipping replies to shipReq and vendor receives it, the suspended region is released and state V9 becomes active. |