Author Topic: Activity Parameter Direction and Action Pin Kind  (Read 4093 times)

PeterHeintz

  • EA User
  • **
  • Posts: 887
  • Karma: +55/-18
    • View Profile
Activity Parameter Direction and Action Pin Kind
« on: October 10, 2019, 11:36:50 pm »
Any idea why an activity parameter can have a direction inout/return but an action pin can only have input or output?
Best regards,

Peter Heintz

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2847
  • Karma: +48/-3
    • View Profile
Re: Activity Parameter Direction and Action Pin Kind
« Reply #1 on: October 24, 2019, 09:47:12 am »
Because UML. Actions don't have parameters.
The Sparx Team
support@sparxsystems.com

PeterHeintz

  • EA User
  • **
  • Posts: 887
  • Karma: +55/-18
    • View Profile
Re: Activity Parameter Direction and Action Pin Kind
« Reply #2 on: October 24, 2019, 11:19:15 pm »
Hi KP,
yes actions do not have parameters but actions have pins.

And for call behaviour actions the parameters of the called activity become action pins.

But why can I specify a inout direction on parameter but not for the derived pins?

And why EA only derives the pins from the parameters and not the other parameter attributes like e.g. direction as well?

Any answer which make sense?
Best regards,

Peter Heintz

qwerty

  • EA Guru
  • *****
  • Posts: 12234
  • Karma: +346/-280
  • I'm no guru at all
    • View Profile
Re: Activity Parameter Direction and Action Pin Kind
« Reply #3 on: October 25, 2019, 12:36:39 am »
And putting one or two on top:
- Changing parameters on an activity does not influence instantiated call behavior actions.
- Stereotypes from activity parameters are not propagated to the pins.

q.

PeterHeintz

  • EA User
  • **
  • Posts: 887
  • Karma: +55/-18
    • View Profile
Re: Activity Parameter Direction and Action Pin Kind
« Reply #4 on: October 25, 2019, 12:45:39 am »
Yes, and multiplicity, ordering, stream, Control Type, ... is not propagated as well, just to support the user in creating inconsistent models. ;)
Best regards,

Peter Heintz

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2847
  • Karma: +48/-3
    • View Profile
Re: Activity Parameter Direction and Action Pin Kind
« Reply #5 on: October 25, 2019, 08:44:20 am »
But why can I specify a inout direction on parameter but not for the derived pins?

You would need to ask the authors of UML.

If a call behavior action calls a behavior with an inout parameter, I would expect that parameter to map to separate input and output pins on the action.
« Last Edit: October 25, 2019, 08:46:42 am by KP »
The Sparx Team
support@sparxsystems.com

freek

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Activity Parameter Direction and Action Pin Kind
« Reply #6 on: July 30, 2021, 11:54:06 pm »
This is a bug in EA's synchronise.  The Parameter (from Behavior) can be inout, but the ActivityParameterNode in the Activity cannot have two directions.  The ActivityParameterNodes are converted to ActionPins when you create an invocation Action. 

UML states:
1.  A Parameter with direction other than inout must have exactly one ActivityParameterNode in an Activity.
2.  A Parameter with direction inout must have exactly two ActivityParameterNodes in an Activity, at most one with incoming ActivityEdges and at most one with outgoing ActivityEdges.

This makes sense as getting a token from the node and putting a token to the node would cause a loop if you think about it.  In essence the inout parameter have two different nodes, the input and the output.  The fact that you write it to the same memory position in code (inout parameter), just not modify the fact that you hav an input and a different output.

EA only allows you to specify parameters (which can be inout), but it does not create two ActivityParameterNodes for the parameter if it is inout.