Author Topic: [EA 15.2] Activity diagram simulation  (Read 4041 times)

jack89

  • EA User
  • **
  • Posts: 49
  • Karma: +0/-1
    • View Profile
[EA 15.2] Activity diagram simulation
« on: September 08, 2021, 12:37:09 am »
Hi all,

I'm simulating an activity diagram using dynamic simulation with python code and I have few questions regarding this topic:

1) Which is the correct procedure in order to embed code inside an action? I know that I can define some behavior related to an action, but how can I invoke such behaviors during the simulations?
E.g. Action 1 has "increment()" function. How can I invoke increment function when the simulation token reaches such action?

2) Imagine this scenario:
- Activity diagram A
- Activity diagram B

Activity diagram B is invoked by Activity diagram A. How can I simulate this interaction by code? I mean, which is the code that I should write inside the diagram A in order to switch the simulation from the activity diagram A to the activity diagram B?

Once invoked the activity diagram B, is it also possible to continue to run also the activity diagram A? (I'm referring to model and simulate the synchronous/asynchronous call to other activity diagrams)


I appreciate some practical examples (also in other programming languages)  in order to understand better how to use code in simulation.

Thank you so much in advance.