Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » State machine animation(State machine animation)
State machine animation [message #1784430] Tue, 27 March 2018 19:54 Go to next message
Steve Zielinski is currently offline Steve ZielinskiFriend
Messages: 9
Registered: March 2018
Junior Member
I am trying to build a project with state machine animation.

I see that it is possible viewing this YouTube example:

Model Simulation and Animation
https://www.youtube.com/watch?v=zxQ-lcbIz7s

I have followed the tutorials and have successfully animated the Activity diagrams found in the BasicActiveObjectExample. However, when I add a simple 2 state state machine to the Increment class, it does not animate.

Animation of state machines seems to be a hole in the available documentation as well as in the available YouTube videos. If a detailed tutorial exists, please point me toward it.

I have attached the exported files. Perhaps I'm not initializing something I should?
Re: State machine animation [message #1784450 is a reply to message #1784430] Wed, 28 March 2018 07:05 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 172
Registered: May 2015
Location: Germany
Senior Member
Hi Steve,
do you have the Moka components installed?

And there is an issue starting the simulation working with the Moka debug perspective.
Please try to start the simulation within the Papyrus perspective and switch to the Moka perspective after the animation is running.

/Carsten
Re: State machine animation [message #1784521 is a reply to message #1784450] Wed, 28 March 2018 21:53 Go to previous messageGo to next message
Steve Zielinski is currently offline Steve ZielinskiFriend
Messages: 9
Registered: March 2018
Junior Member
Hi Carsten,

Yes, I do have the Moka components installed.

I seem to have gone backwards - the BasicActiveObjectExample is no longer executing reliably. I will have to reload and try again.

Steve

Re: State machine animation [message #1785090 is a reply to message #1784521] Mon, 09 April 2018 11:48 Go to previous messageGo to next message
THEOBALD Maurice is currently offline THEOBALD MauriceFriend
Messages: 23
Registered: February 2017
Junior Member
Hi Steve,

Did you select the org.eclipse.papyrus.moka.fuml.statemachines execution engine ?

Maurice
Re: State machine animation [message #1797879 is a reply to message #1785090] Wed, 07 November 2018 22:27 Go to previous messageGo to next message
Steve Zielinski is currently offline Steve ZielinskiFriend
Messages: 9
Registered: March 2018
Junior Member
After a long delay I finally returned to this project.

I now have the BasicActiveObjectExample running and animating. However, no breakpoints appear to work. I have tried setting breakpoints on items labeled [Activity Edge] and those labeled [Activity Node], yet Moka never hits the breakpoints.

I have attached an image of the incrementMethod showing multiple blue dots.

I do notice something interesting in the "Breakpoints" tab. Each breakpoint is listed as "BasicActiveObjectExample.uml". This is also shown in the attached image.

This is unlike the ModelExecution tutorial where the breakpoint tab shows things like " ObjectFlow5" and "read counter".

Ideas??
Re: State machine animation [message #1797881 is a reply to message #1797879] Wed, 07 November 2018 23:12 Go to previous messageGo to next message
Steve Zielinski is currently offline Steve ZielinskiFriend
Messages: 9
Registered: March 2018
Junior Member
I have now tried to add a very simple state machine.

See attached image.

I then re-generated the Increment_Factory.

I then created a new Debug Configuration using org.eclipse.papyrus.moka.fuml.statemachines

as the Execution Engine. See attached image.

The statemachine did not animate. Both the IncrementClassifierBehavior diagram and the incrementMethod did animate.


Re: State machine animation [message #1797928 is a reply to message #1797881] Thu, 08 November 2018 16:15 Go to previous messageGo to next message
Steve Zielinski is currently offline Steve ZielinskiFriend
Messages: 9
Registered: March 2018
Junior Member
Still having no luck animating the statemachine.

However, completely exiting Eclipse and re-starting now has breakpoints working. When I came back into the project, I noticed all the existing breakpoints had been removed. I created one and it worked.

I do continue to note, however, the "Breakpoints" tab lists the breakpoint as BasicActiveObjectExample.uml (nothing more specific than that).
Re: State machine animation [message #1804279 is a reply to message #1797928] Thu, 21 March 2019 17:20 Go to previous messageGo to next message
Jesús Gorroñogoitia is currently offline Jesús GorroñogoitiaFriend
Messages: 5
Registered: July 2018
Junior Member
Hi Steve,
I've been also struggling with Moka simulation for both activity and state machine diagrams. If you clone the Moka source code from its Eclipse Git repository:
git clone git://git.eclipse.org/gitroot/papyrus/org.eclipse.papyrus-moka.git

You can find therein in the directory ./bundles/core/engines/org.eclipse.papyrus.moka.fuml.statemachines/resources/tests/ the Papyrus model PSSM_TestSuite.di, which contains dozens of valid activity/statemachine test models.

I've tested those in model folder Behavior. You can run all them by executing the activity BehaviorTests or by individual cases. For both, create a Moka run configuration that uses as execution engine the org.eclipse.papyrus.moka.fuml.statemachines . To select the element to be executed you cannot rely on the drop-down combo box, since the huge number of behaviors in the model makes Eclipse to collapse, but you can transverse this list using the arrow keys up/down until you find the activity you want to simulate. Remember to have opened beforehand the activity/state machine models you want to visualized. It is not working the automatic opening of models option that you can configure in the Moka Animate view.

Hope this helps!.

Yosu

[Updated on: Thu, 21 March 2019 17:22]

Report message to a moderator

Re: State machine animation [message #1805780 is a reply to message #1804279] Tue, 23 April 2019 20:31 Go to previous messageGo to next message
Steve Zielinski is currently offline Steve ZielinskiFriend
Messages: 9
Registered: March 2018
Junior Member
Yosu,

Thank you for the reply.

Your directions did help. I did not clone the Git repository yet.

My simple 2 state statemachine did start to animate! However, not for long.

I see it follow the initial transition into State1. Then I get a java.lang.NullPointerException.

I don't know how to get further information about that exception in order to debug it. Is there a way to view the code itself?

Thanks for your help,

Steve

Re: State machine animation [message #1805891 is a reply to message #1805780] Fri, 26 April 2019 16:34 Go to previous messageGo to next message
Steve Zielinski is currently offline Steve ZielinskiFriend
Messages: 9
Registered: March 2018
Junior Member
I have made a short video showing the issue I'm having with creating a very simple animated state machine. Please see: https://youtu.be/eFprYBUCpvc

https://youtu.be/eFprYBUCpvc
Re: State machine animation [message #1805934 is a reply to message #1805891] Mon, 29 April 2019 05:21 Go to previous messageGo to next message
THEOBALD Maurice is currently offline THEOBALD MauriceFriend
Messages: 23
Registered: February 2017
Junior Member
Hi Steve,

Could you also post your simple model ?
Re: State machine animation [message #1805982 is a reply to message #1805934] Mon, 29 April 2019 17:56 Go to previous messageGo to next message
Steve Zielinski is currently offline Steve ZielinskiFriend
Messages: 9
Registered: March 2018
Junior Member
Thanks for the reply. Here is the exported model as requested ...
Re: State machine animation [message #1806233 is a reply to message #1805982] Mon, 06 May 2019 15:47 Go to previous message
Pauline Deville is currently offline Pauline DevilleFriend
Messages: 42
Registered: November 2016
Location: Paris Saclay, France
Member
Hello,

It seems that your model is not conform to the norm since you want to run a standalone state machine which is not active.

According to the PSSM norm, if the state machine is not active then the there is no object activation for this element and there is no way to receive events. This is a known bug that Moka should provide better error messages or at lease validate the model.

So to fix your problem, it seems that you should set the field "isActive" of your state machine to true.

HTH,
Pauline
Previous Topic:Arrows should mean dependency and not navigation association Papyrus
Next Topic:How to use SetCommand to set multiplicity
Goto Forum:
  


Current Time: Sat Dec 14 23:30:16 GMT 2019

Powered by FUDForum. Page generated in 0.02387 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top