I am trying to create a diagram in PlantUML and can't get my head around connecting two actons.
The source code looks like this:
@startuml
skinparam rectangleBorderThickness 1
|#orange|Registrar|
#lightgray:**Introduce document to the system**;
:Register Document;
if (Work on the document is required?) then (Yes)
repeat
:Work on incoming documents;
|#green|Performer|
:**Perform tasks for the document**;
repeat while (Completed?) is (No) not (Yes)
|#orange|Registrar|
else
#lightgray:**Archive document**;
end
@enduml
The diagram displays the document lifecycle. Action 1 is the final stage, this is the end, and it is performed by the orange person. Action 2 is performed by the green person. It can be done or not which is condition 3.
What I want to have is to say that if condition 3 is met (done), the document goes to its final stage which is 1 and it will finish the cycle. Can I do that?
I think I can remove condition 3 and turn action 2 into a condition, but I still wouldn't be able to link back the 2 and 1 which is my main problem.
Basically you can do that. A Decision is an ActivityNode and can behavior. Usually the behavior of a Decision is of limited nature. So in your case I'd guess it would be "document smells goot; fine" or "smells bad; do it again". However, this would not make the diagram much clearer or easier to read. I would just leave it as it is.
Edit From your comments I came up with this diagram:
I abbreviated a bit, but basically this is how it could look like. The merges are mandatory or else the model would not be valid. Also note that the guards are put in square brackets which is mandatory to make them guards and not some (meaningless) label.
Note that PlantUML is creating wrong decision nodes as they shall be diamond shaped only according to the UML specs. They render them as hexagon to make place for the inner label. Though not correct UML it's probably understandable by anyone.