Executing Activity Diagrams

Moderator: Moderators

Executing Activity Diagrams

Postby nidal.eid@gmail.com » Tue Aug 13, 2013 7:16 pm

I am working on a system that consists of sub-systems with numerous critical functions , and need to model high-level activity diagrams to describe the entire system's behavior in a test environment. I started drawing an activity diagram for each of the key functions and tried to link them all together using the SendSignalAction and AcceptSignalAction, and also by calling activities from within actions. I have a problem when i run the main activity diagram in that it will execute the simple actions one by one but when it reaches an action that calls another activity, it just terminates before it's even initialized... what could be causing this???

Also, my goal is to use test data as predefined data , insert it into an activity diagram, call a MATLAB script to parse the data and read back an output text file, then use the returned data from MATLAB to check against guards/ conditions for each action and see if each Action executes based on the test data. This will allow me to pinpoint which action failed to execute based on real test data and will facilitate in failure analysis or verification and validation during testing. I want to know if this is feasible using just activity diagrams and cameo simulation toolkit before i even make the attempt, thanks!!!
nidal.eid@gmail.com
Forum Newbie
Forum Newbie
 
Posts: 5
Posts Rating:0
Joined: Tue Aug 13, 2013 6:53 pm

Re: Executing Activity Diagrams

Postby kritsana_u » Wed Aug 14, 2013 4:27 am

Hi,

Regards to your given information, it is quite difficult to identify the problem that Cameo Simulation Toolkit terminates when it executes the callBehaviorAction or callOperationAction. Mostly the problem is that there is no token flows to the pins of the action, e.g. target pin or arguments pins. Please make sure that all pins are connected with object flows, and they have token flow to them during simulation. It would be great if you could provide us the sample model that you found the problem. So, we can investigate on the problem.

For what you are trying to do as described in the second paragraph, we think it could be done by using just activity diagrams. (you may need to write some scripts)

Best regards,

Kritsana U.
kritsana_u
Forum Expert
Forum Expert
 
Posts: 116
Posts Rating:3
Joined: Wed Jan 27, 2010 3:02 am

Re: Executing Activity Diagrams

Postby nidal.eid@gmail.com » Wed Aug 14, 2013 7:53 am

OK, i uploaded 4 screen shots of example activity diagrams. i can go from the ActivateBattery diagram to the ElectronicsPowerUp, but i cant continue on to the ProcessData diagram. how do i make the connections so the activity diagrams flow from one to the next? thanks.
You do not have the required permissions to view the files attached to this post.
nidal.eid@gmail.com
Forum Newbie
Forum Newbie
 
Posts: 5
Posts Rating:0
Joined: Tue Aug 13, 2013 6:53 pm

Re: Executing Activity Diagrams

Postby nidal.eid@gmail.com » Wed Aug 14, 2013 9:12 am

From my understanding, constraint blocks can be used to call a MATLAB script and these are used in parametric diagrams....how can I call a MATLAB script from an activity diagram?

I am trying to develop data-driven activity diagrams, but this data must come out of a MATLAB script. I have the MATLAB script and the data file it needs to process, but i dont know how to call the script specifically from an activity diagram. I would then need to select specific values from the processed data and input those into the activity diagrams to check against pre-conditions/ post-conditions and guards.
nidal.eid@gmail.com
Forum Newbie
Forum Newbie
 
Posts: 5
Posts Rating:0
Joined: Tue Aug 13, 2013 6:53 pm

Re: Executing Activity Diagrams

Postby kampanath_p » Tue Aug 20, 2013 5:06 am

Hi,

According to the attached images, signal will be sent to the object which come out of result pin of the "transmitter turned on" action. However from the statement you provided, the problem is highly likely caused by the status of inactive of the object to which signal is sent. When object of the classifier whose "Is Active" property is set to false is created, the classifier behavior will not be initialized.

In your case the activity containing acceptSignalAction may be the classifier behavior of inactive object, as a result, it will not be initialized. Therefore,when the signal is sent to the object, there is nothing to receive that signal and the activity is terminated.

There are two solutions. The first one is to set the "Is Active" property of the classifier of the object which is the target of sendSignalAction to true. Another one is to use startClassifierBehaviorAction to start classifier behavior of the target object, that is going to accept the signal, before send signal is sent to it.

Ps. you can also see how to use sendSignalAction and acceptSignalAction in this topic : send-signal-action-reception-t2571.html

Best Regards,
Kampanath P.
kampanath_p
Customer Support
Customer Support
 
Posts: 5
Posts Rating:0
Joined: Sun Aug 05, 2012 9:26 pm

Re: Executing Activity Diagrams

Postby kritsana_u » Wed Aug 21, 2013 1:44 am

Hi,

From your attached pictures, the ProcessData activity must be started and it must be waiting for the signal before the the sendSignal action in ElectronicsPowerUp is activated. The object which will receive the signal must be specified to the target pin of the sendSignal action as well. However, all three activities belong to the BehaviorAnalysis package (
as I saw in the picture of the containment browser). So, I guess that they have no context classifier. Which means, you cannot set the object to the target pin.

To use send and receive signal action, you should define the activity within the classifier. Please see the attached sample model (test_signals_mod.mdzip).
Cameo Systems Modeler 17.0.4 - test_signals_mod.png


To evaluate the math expression using activity. Actually, we did not support such in Cameo Simulation Toolkit v17.0.4. However, you could use the script to call to the math engine directly. The attached sample also show you the script for calling to the math engine. It use an internal api. (You need to set the math engine to MATLAB before start simulation).

Best regards,

Kritsana U.
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