How do I merge activity blocks in the Activity beta syntax

+1 vote
asked May 22, 2014 in Wanted features by anonymous

I have an Activity (beta) script

@startuml
start
if (sign off?) then (yes)
  if(process result?) then (ACCEPT)
    if(ship?) then (yes)
      :process 1;
      :complete;
    else (no)
      :rewind;
      :Failure;
    endif 
    stop
  else (REJECT)
    :rewind;
    :Failure;
  endif 
  stop
else (no)
  :Failure;
  stop
endif 
@enduml
 
I would like there to be one instance of rewind and one instance of Failure.
This would be similar to the sequence syntax where we define an alias for the participant
e.g. participant "The <b>Famous</b> Bob" as Bob
Then we can use Bob throughout the script and it refers to a single instance of Bob.
Can this be done with the current syntax and if not can you add this as a feature please?

1 Answer

0 votes
answered Feb 26, 2015 by anonymous

You should be able to write it like:

@startuml

start

if (sign off?) then (yes)

  if(process result?) then (ACCEPT)

    if(ship?) then (yes)

      :process 1;

      :complete;

      stop

    else (no)

    endif

  else (REJECT)

  endif

  :rewind;

  else (no)

endif

:Failure;

stop

@enduml

asked Aug 28, 2015 in Wanted features by anonymous what about this case?
...