Question: 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

```

This is what I have:
[![enter image description here](https://i.stack.imgur.com/nfSQo.png)](https://i.stack.imgur.com/nfSQo.png)

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.

Answer: 
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:

[![enter image description here](https://i.stack.imgur.com/cL5bZ.png)](https://i.stack.imgur.com/cL5bZ.png)

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.
**NB** This is the answer for the previous question of the OP where he wanted a direct ControlFlow from `Perform tasks...` to `Archive document`

I don't know whether PlantUML would allow this, but if it does not it would be right. If you create the ControlFlow as you sketched this would cause the middle Action to create a deadlock. It would have two incoming ControlFlows and only one of them can deliver a token. So it would wait forever. Similarly the left Action would never be started.