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

Beitragvon 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

Beiträge: 1
Registriert: August 31st, 2010, 1:36 pm

Re: Composite State

Beitragvon 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:

Beiträge: 23
Registriert: März 3rd, 2008, 5:12 pm
Wohnort: UK

Zurück zu Rhapsody API

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 2 Gäste