JohnyChew
JohnyChew

Reputation: 147

PlantUML Activity Diagram Go Back

I am using PlantUML to create an Activity diagram.

I want the arrow that comes out of Modify Details to go back to OP2 instead of the diamond.

I have this diagram:

@startuml
|Swimlane1|
start
:OP1;
|Swimlane2|
:OP2;
 if (Form Valid?) then (No)
|Swimlane1|
:Modify Details;  /' <-- This should point _back_ to OP2 '/
|Swimlane2|
  
  else (Yes)
    :Add Detals to System;
  endif
:OP3;
|Swimlane2|
:foo5;
stop
@enduml

Which gives this image:

graphviz diagram

Upvotes: 5

Views: 8124

Answers (1)

Mark
Mark

Reputation: 63

Can you express it with a while or repeat? Below is not quite your logic as OP2 would not always occur, but perhaps it will help you express your logic within the diagram constraints:

|Swimlane1|
start
:OP1;
|Swimlane2|
while (Form Valid) is (no)
:OP2;
|Swimlane1|
:Modify Details; 
endwhile (yes)
|Swimlane2|
:Add Detals to System;
:OP3;
:foo5;
stop
@enduml

graphviz diagram

Upvotes: 5

Related Questions