Zurück zu Willert.de

Composite State

how to access or perform things by using the Rhapsody API (not how to use the UI)

Composite State

Postby Tobias.Renner » August 31st, 2010, 2:12 pm

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
Tobias.Renner
 
Posts: 1
Joined: August 31st, 2010, 1:36 pm

Re: Composite State

Postby andyl » November 26th, 2010, 1:14 pm

Tobias and i have discussed this in the IBM Dev Works forum
Get Rhapsody Tips, Tricks, Tutorials, Wizards and Sample Models here:

http://merlinscave.info/Merlins_Cave/Welcome.html
andyl
 
Posts: 23
Joined: March 3rd, 2008, 5:12 pm
Location: UK


Return to Rhapsody API

Who is online

Users browsing this forum: No registered users and 1 guest

cron