Page 1 of 1

Composite State

PostPosted: August 31st, 2010, 2:12 pm
by Tobias.Renner
Hi folks,

I have problem to create a composite state via the JavaAPI and I need help.

I want transform a normal state (without sub states) into a composite state with two regions/sub_states.

The first thing I do is to change the Statetype for the IRPState to "And" (command: Model_State.setStateType("And");). Afterwards I create two sub states (command: IRPState new_state1 = Model_State.addState("newname_1"); IRPState new_state2 = Model_State.addState(newname_2");). So far is everything fine and the composite state is displayed correctly inside the browser.

My problem is now, how to update the statechart diagram, i.e. the graphical view? I've tried to create a IRPGraphNode for each IRPState (inside the parent IRPGraphNode) - but unfortunately it didn't work. (Attached you can see a screenshot of my Rhapsody session)

If anyone has a hint for me, it would be great to me.

Thanks you very much for your help in advance

Tobias

Re: Composite State

PostPosted: November 26th, 2010, 1:14 pm
by andyl
Tobias and i have discussed this in the IBM Dev Works forum