Page 1 of 2

Send Signal Action reception

PostPosted: Fri Mar 08, 2013 7:55 am
by tpen3219
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

Re: Send Signal Action reception

PostPosted: Mon Mar 11, 2013 4:43 am
by kritsana_u
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.

Re: Send Signal Action reception

PostPosted: Sat Jun 15, 2013 1:00 pm
by userkhoa
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.

Re: Send Signal Action reception

PostPosted: Wed Aug 14, 2013 7:04 am
by tpen3219
Can you please share the working model you used?

Re: Send Signal Action reception

PostPosted: Wed Aug 21, 2013 2:58 am
by kritsana_u
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.

Re: Send Signal Action reception

PostPosted: Wed Nov 13, 2013 12:25 pm
by Olivier CASSE
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

Re: Send Signal Action reception

PostPosted: Thu Nov 14, 2013 8:23 pm
by kritsana_u
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.

Re: Send Signal Action reception

PostPosted: Fri Nov 15, 2013 12:39 am
by Olivier CASSE
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

Re: Send Signal Action reception

PostPosted: Fri Nov 15, 2013 1:16 am
by kritsana_u
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.

Re: Send Signal Action reception

PostPosted: Fri Nov 15, 2013 8:03 am
by Olivier CASSE
Hi,

it works far better :D

many thanks,

Olivier