Author Topic: Activity Parameters  (Read 6795 times)

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1137
  • Karma: +30/-8
    • View Profile
Activity Parameters
« on: March 23, 2022, 10:02:22 pm »
The following link refers to both input and output parameters, https://sparxsystems.com/enterprise_architect_user_guide/15.2/model_domains/activityparameternodes.html, is there a way to explicitly set parameters as input or output?

Also, when invoking an activity with parameters. Parameters appear as Param: instead of of :Param, this led me to believe that the parameter in the invocation had the activity parameter as its classifier. This does is not the case. Is it by design or a bug/feature? [Note: The issue with this is that I cannot get the name of the parameter in the invocation to display on the diagram like  Order : Number or Purchase Order Number]


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Activity Parameters
« Reply #1 on: March 23, 2022, 11:01:41 pm »
Yes, there is a property Direction you can set to
- in
- out
- inout
- return

If you give your parameter a type it will show up on the activity as "param: type"

Setting you argument on the Action, referencing the parameter will then result in: "argument: type"

Geert

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1137
  • Karma: +30/-8
    • View Profile
Re: Activity Parameters
« Reply #2 on: March 24, 2022, 12:50:09 am »
[SNIP]
Yes, there is a property Direction you can set to
- in
- out
- inout
- return
Where in v15 I can find these properties? I keep looking for them and cannot find them.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Activity Parameters
« Reply #3 on: March 24, 2022, 01:22:29 am »
If you click on the Activity in a diagram, you'll see a parameters section in the properties window

See https://imgur.com/a/LSvnyJW

Geert

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1137
  • Karma: +30/-8
    • View Profile
Re: Activity Parameters
« Reply #4 on: March 24, 2022, 01:47:51 am »
If you click on the Activity in a diagram, you'll see a parameters section in the properties window

See https://imgur.com/a/LSvnyJW

Geert
Thanks Geert, much appreciated. Is this documented anywhere? Somehow I keep looking at the online help and cannot find it; maybe I have gone selectively blind.

One other question. When an activity is invoked, is there a way to assign a value to the parameter? What do you suggest?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Activity Parameters
« Reply #5 on: March 24, 2022, 02:53:30 am »
I think I've seen it somewhere in the docs. Bu honstly, the EA documentation is best used as weight for loose papers so they don't fly around when the window is opened.

q.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1137
  • Karma: +30/-8
    • View Profile
Re: Activity Parameters
« Reply #6 on: March 24, 2022, 05:00:43 am »
This is a really annoying user interface, its designer was not thinking about usability. The properties Geert was referring to cannot be setup when and interaction point is created; setting those properties is a 2 step process: they have to be created as a feature of the activity, and then the "other" properties of the activities have to be used to set these properties.

Furthermore, for some mysterious reason I have now lost the "other" properties tab and cannot remember how to get it back (will try again tomorrow).

Note: there are of course 2 sets "properties" in Sparx, those you can access via right clicking in the element and selecting properties and the "other" properties, these typically appear as a tab on the right hand of my screen. I hope, probably in vain, the this would be sorted in version 16.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Activity Parameters
« Reply #7 on: March 24, 2022, 07:41:07 am »
Ha, user oriented design. You picked up my thread about SDs, didn't you?

q.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1137
  • Karma: +30/-8
    • View Profile
Re: Activity Parameters
« Reply #8 on: March 24, 2022, 07:41:56 pm »
Ha, user oriented design. You picked up my thread about SDs, didn't you?

q.
Yes, actually when I replied to your sequence diagram thread I was also thinking about activity diagrams.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1137
  • Karma: +30/-8
    • View Profile
Re: Activity Parameters
« Reply #9 on: March 24, 2022, 10:45:51 pm »
[SNIP]
One other question. When an activity is invoked, is there a way to assign a value to the parameter? What do you suggest?
Any takers for this.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Activity Parameters
« Reply #10 on: March 24, 2022, 10:51:49 pm »
In an Action that invokes your Activity, you have the arguments, that you map to the Activity parameters.

Geert


Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1137
  • Karma: +30/-8
    • View Profile
Re: Activity Parameters
« Reply #11 on: March 25, 2022, 02:19:01 am »
In an Action that invokes your Activity, you have the arguments, that you map to the Activity parameters.

Geert


Are you saying that in order to map arguments to Activity parameters an action has to be always used to call the activity - i.e., decision and fork/join cannot be used?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Activity Parameters
« Reply #12 on: March 25, 2022, 06:38:35 am »
Probably not. An activity parameter is mapped to an action pin. And that can be used "as usual".

q.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1137
  • Karma: +30/-8
    • View Profile
Re: Activity Parameters
« Reply #13 on: March 25, 2022, 09:22:42 pm »
Probably not. An activity parameter is mapped to an action pin. And that can be used "as usual".

q.
Thanks Thomas, just to clarify what I have in mind. Let's say I have
  • Activities A, B, and C
  • Activity C is invoked by both activities A & B
  • Activity C has a parameter Aparam
  • Aparam can take values 1 to 3
  • Activity C has a decision node executing different actions depending on the value of Aparam
What I trying to clarify is:
  • Does Activity C need 1 or 3 action pins (an action pin per execution branch)? I am assuming it only needs 1 action pin.
  • How do I internally represent the parameter? Using a variable?

P.S.: I am likely to have a similar question about action and actions calling activities.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Activity Parameters
« Reply #14 on: March 25, 2022, 10:17:29 pm »
Heed your words. An activitity has no action pin. Only an intantiated activity which is an action of type call behavior has action pins. You create as many invocations of your activity as needed. Each has the number of action pins that match the number of activity paramaters of their parent.

q.