Decision nodes in the activity diagrams

Moderator: Moderators

Decision nodes in the activity diagrams

Postby esa.heikkinen@tut.fi » Tue Dec 02, 2014 4:13 pm

Hello

I have hard to understand how should the decisions nodes work in activity diagrams (with simulation).

I want to make the branching depends on value of certain class-variable (Boolean-type: True or False).

Are there exist some good example (*.mdzip) how to do that ?
I found there are lot of examples in samples/simulation-directory of magicdraw, but which one could be suitable for my case ?
esa.heikkinen@tut.fi
Forum Newbie
Forum Newbie
 
Posts: 5
Posts Rating:0
Joined: Tue Nov 18, 2014 8:21 am

Re: Decision nodes in the activity diagrams

Postby kritsana_u » Thu Dec 04, 2014 3:37 am

Dear Esa,

Here is the sample model which show you how to use the decision node in simulation.
In Cameo Simulation Toolkit, you can use the decision node both with and without the decision input.

- If the incoming edge of the decision node is a control flow and you use the decision node without the decision input, Cameo Simulation Toolkit will evaluate the guard condition of each outgoing edge. Cameo Simulation Toolkit will go to the first outgoing edge whose guard condition is true.
- If the incoming edge of the decision node is an object flow and if you use the decision node without the decision input, Cameo Simulation Toolkit will evaluate the guard condition on each outgoing edge (control flow) and it will go to the edge that the result of evaluation is equal to the token flowing through the incoming edge.
- If the incoming edge of the decision node is a control flow and you use the decision node with the decision input (decision input must have one return parameter), Cameo Simulation Toolkit will evaluate the decision input for the value of return parameter. Then, it will compare the value of the return parameter with the value specified on the guard of each outgoing edge. Cameo Simulation Toolkit will go to the edge whose guard condition has the same value as the value of return parameter of the decision input.

System.png


- You can also use the decision node with decision input when the incoming edge is an object flow. The token flowing through the incoming edge will be passed to the decision input as an argument. You can see more information about decision node, decision input and decision input flow in the OMG UML Superstructure Specification.

Best regards,

Kritsana U.

You can also use the decision node with the
You do not have the required permissions to view the files attached to this post.
kritsana_u
Forum Expert
Forum Expert
 
Posts: 116
Posts Rating:3
Joined: Wed Jan 27, 2010 3:02 am


Return to Cameo Simulation Toolkits

Who is online

Users browsing this forum: No registered users and 0 guests

cron