How to use aliases in Activity BETA syntax.

+6 votes
asked Feb 3, 2016 in Wanted features by anonymous
In the stable activity diagram syntax, the as keyword can be used to set an alias which can be reused.

Is it possible to do this in the BETA activity syntax as well?

My use case is to have multiple if/endif blocks end up at the same point. I want to define "Callback with error" as error and then have several steps reach that same point. This doesn't seem possible without aliases in the beta syntax.

1 Answer

+1 vote
answered Nov 22, 2018 by anonymous
Any news on this? Makes it really painful when for e.g. including images and then referencing the same items:

`:"<img:somefile.png>A Thing\n(to test)";`

Preferably I could just add some sort of identifier to this and then just use `:thing;` to refer to it going forward?
commented Nov 22, 2018 by plantuml (295,000 points)
Not sure to understand the request here.
Could you post a simple but complete snipset that shows the issue ?
Thanks!
commented Dec 11, 2018 by Nica MLG
I have the same issue.
Several Decision ends should go to the same activity. Ex.:

start
if (option 1) then (yes)
   :Do something;
   ->NEXT_COMMON_STEP.
elseif (option 2) then (yep)
   ->Do something elseif;
   ->NEXT_COMMON_STEP.
elseif (option 3) then (OMG)
   ->Do something;
   ->NEXT_COMMON_STEP.
else
  ->Do Noghing;
endif

:"Continue Here" as NEXT_COMMON_STEP;
end

Arrows pointing to NEXT_COMMON_STEP I think make the intentions clear. End dot is just cosmetic

At some point, a grouped `stop` would be nice, too; but if it would be possible to alias any activity OR STOP, that would be perfect:

start
if (option 1) then (no)
   stop as OptionCheckStop
elseif (option 2) then (never)
   ->OptionCheckStop
elseif (option 3) then (no way)
   ->OptionCheckStop
else
  ->Do else;
endif

:Continue;
end


This CAN be done using the old activity syntax:

@startuml

(*) --> "First Activity"

if "Option 1" then
    -->[Yes] Continue
else
if "Option 2" then
    -->[Yes] Continue
else
if "Option 3" then
    -->[Yes] Continue
else
if "Option 4" then
    -->[Yes] Continue
else
    -->[No] End
endif

Continue --> End
End--> (*)

@enduml

It's not elegant, but it is more or less what it should do. But It would be nice to be able to do that using the new one.
...