Send Signal Action reception

Moderator: Moderators

Send Signal Action reception

Postby tpen3219 » Fri Mar 08, 2013 7:55 am

To what extent can a signal sent from one activity diagram be picked up by another activity diagram?
Do I need to model the signal event on a state machine that then defines and delegates to an activity diagram to handle the message?
Does the activity diagram need to include a signal receptor?

Urgent request
tpen3219
Forum Beginner
Forum Beginner
 
Posts: 93
Posts Rating:3
Joined: Fri Nov 04, 2011 11:57 am

Re: Send Signal Action reception

Postby kritsana_u » Mon Mar 11, 2013 4:43 am

Dear Tom,

The signal can be sent from one activity diagram to another activity diagram using SendSignalAction and AcceptSignalAction.
By using the SendSignalAction to send the signal to the specified target, but you have to make sure that the object_ that is the target is waiting for the sent signal with AcceptSignalAction.

Cameo Systems Modeler 17.0.4 beta - Untitled1.png


From the attached image, the context object sent the signal 'signal' to the object of type A. But, the object of type A must be waiting for the signal. So, the activity A of A object must be executed before the send signal to A with the activity Context.

Here the activity A of block A is a Classifier Behavior of the block. Therefore, it will be called after the initialization of the object A. By using AutoStartActiveObject = true, the run-time objects of the structural features of the context will be initiated with their classifier behaviors executed before the classifier behavior of the context object is executed. However, the execution of the classifier are asynchronous and we cannot guarantee that the AcceptSignalAction in activity A, will be activated before the SendSignalAction in activity Context. So, I would recommend to use state-machine to synchronize the send/accept signal between objects.

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

Re: Send Signal Action reception

Postby userkhoa » Sat Jun 15, 2013 1:00 pm

Krissana, '

I tried to recreate what you showed. But I could not get the SendSignalAction action to send the signal. The activity in the context terminated right before the SendSignalAction was called. Does your sample model actually work? Do you mind posting/sharing your sample model? Thanks.
userkhoa
Forum Newbie
Forum Newbie
 
Posts: 2
Posts Rating:0
Joined: Mon Mar 11, 2013 2:28 pm

Re: Send Signal Action reception

Postby tpen3219 » Wed Aug 14, 2013 7:04 am

Can you please share the working model you used?
tpen3219
Forum Beginner
Forum Beginner
 
Posts: 93
Posts Rating:3
Joined: Fri Nov 04, 2011 11:57 am

Re: Send Signal Action reception

Postby kritsana_u » Wed Aug 21, 2013 2:58 am

Hi,

I have posted the similar model on my last comment here: executing-activity-diagrams-t2689.html
Please see the attached model.

Best regards,

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

Re: Send Signal Action reception

Postby Olivier CASSE » Wed Nov 13, 2013 12:25 pm

tpen3219 wrote:Can you please share the working model you used?


Hello,

I'm also very interested to get this model, please could you put it here?
I tried to run it and got a "The StructuralFeature of a ReadStrcuturalFeatureAcction must be one of the attributes of the classifier specified in the source of an incoming object flow on the Object Input Pin"

getting this model will help me to get an executable project, or any other SysML model with a signal exchanged between 2 activities that can be simulated

thanks,
Olivier
User avatar
Olivier CASSE
Forum Newbie
Forum Newbie
 
Posts: 9
Posts Rating:0
Joined: Wed Nov 13, 2013 11:33 am

Re: Send Signal Action reception

Postby kritsana_u » Thu Nov 14, 2013 8:23 pm

Dear Olivier,

About the problem you got with the ReadStructuralFeatureAction: "The StructuralFeature of a ReadStructuralFeatureAction must be one of the attributes of the classifier specified in the source of an incoming object flow on the Object Input Pin", Please open the specification of the read structural feature action and check if the "structural feature" is the part/property owned by the classifier (or more general classifier - supertype) that is the type of the object pin of the action.

We have attached the sample project here. We hope that it can help.

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

Re: Send Signal Action reception

Postby Olivier CASSE » Fri Nov 15, 2013 12:39 am

many thanks for your feedback, I already tried the model but while I can execute it, there is no animation nor value traced
I'm using 17.0.4 and ran it right away with no change, using the "execute actuator" execution configuration from the main task bar.

could you please check if it runs fine on your setup or tell me what this is supposed to do while simulating?

Olivier
User avatar
Olivier CASSE
Forum Newbie
Forum Newbie
 
Posts: 9
Posts Rating:0
Joined: Wed Nov 13, 2013 11:33 am

Re: Send Signal Action reception

Postby kritsana_u » Fri Nov 15, 2013 1:16 am

Hi,

There is a bug on v17.0.4 GA. It works fine on v17.0.4 sp2.
But, if you have already used the version v17.0.4 sp2, please make sure that you press "Run Execution (F8)" button after you "Execute (Ctrl+Alt+X). Because, the "auto run" option of the execution config was set to "false".

Best regards,

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

Re: Send Signal Action reception

Postby Olivier CASSE » Fri Nov 15, 2013 8:03 am

Hi,

it works far better :D

many thanks,

Olivier
User avatar
Olivier CASSE
Forum Newbie
Forum Newbie
 
Posts: 9
Posts Rating:0
Joined: Wed Nov 13, 2013 11:33 am

Next

Return to Cameo Simulation Toolkits

Who is online

Users browsing this forum: No registered users and 1 guest