2

I am using Plantuml diagramming for activity diagrams.

I want to have the a series of choices and on each choice 'diamond' I want to show the query.

However I also want to be able to link to the same activity shape from different result choice diamonds.

In the old activity diagram I can't get the query to show on the diamond, but I can share target activity shapes from different choice diamonds.

In new activity beta the opposite is true: I can show the question on the diamond choice but I can't get different choices to share targets!

NEW:

@startuml
header Minimum Reproducible Example
title Can't point two queries to same activity
start
!$shared = SHARED
!$nonShared = NON-SHARED

:Minimum Reproducible Example;
if (Test Question) then (yes)
:$shared;
else (no)
    if (Second Test Question) then (yes)
        :$shared;
    else
    :$nonShared;
stop
@enduml

enter image description here

OLD:

@startuml
header Minimum Reproducible Example
title "Can't put test query text in condition diamond"

!$shared = "SHARED"
!$nonShared = "NON-SHARED"

(*) -down-> "Minimum Reproducible Example:"
if "TEST QUESTION" then
-DOWN-> [yes] $shared
else
-RIGHT-> [no] if "SECOND TEST QUESTION" then
-DOWN-> [yes] $shared
else
-RIGHT-> [no] if "THIRD TEST QUERY" then
-DOWN-> [yes] $nonShared
-> (*)
@enduml

enter image description here

Post also at https://forum.plantuml.net/15026/want-to-show-test-query-in-diamond-and-share-target-activity

https://gist.github.com/systemsincode/591f86597efff9fd9cf279ab486ece0b

SystemsInCode
  • 629
  • 7
  • 19

1 Answers1

1

abusing labels fixed this for me:

@startuml
header Minimum Reproducible Example
title Can't point two queries to same activity
start
!$shared = SHARED
!$nonShared = NON-SHARED

:Minimum Reproducible Example;
if (Test Question) then (yes)
  label sp_lab0
  label lab
  :$shared;
else (no)
    if (Second Test Question) then (yes)
    label sp_lab
        goto lab
    else
    :$nonShared;
    endif
endif
stop
@enduml

enter image description here

Fuhrmanator
  • 11,459
  • 6
  • 62
  • 111
SystemsInCode
  • 629
  • 7
  • 19