I understand how to code an orthogonal component as described here: http://www.state-machine.com/resources/Pattern_Orthogonal.pdf. My problem is that QM only allows one statechart per active object. How do I best model the “component” statechart seeing as it is in the same active object as the “container” statechart.
Any takers?
You need to model the Component as a separate class (which it really is) derived from QHsm or QFsm. The rest is as described in the “Orthogonal Component” pattern description. That is, you need to (1) embed the Component instance inside the Container, (2) trigger the top-most initial transition of the Component from the top-most initial transition of the Container, and (3) explicitly dispatch events to the Component. Please remember that the Component needs to post (asynchronously) the events to the Container.