[Tex/LaTex] Arrows position in Tikz

tikz-arrows

I want to drow the picture below, but I have a problem in drawing arrows, the ones in the right, I don't know how to do the positioning of the arrows. Could anyone help me with that?
enter image description here

Here is MWE:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,calc}
\tikzstyle{box} = [draw, rectangle, rounded corners, thick, node distance=5.3em, text width=8em, text centered, minimum height=3.5em]
\tikzstyle{container} = [draw, rectangle,thick, node distance=5.3em, text width=8em, text centered, minimum height=3.5em ]
\tikzstyle{line} = [draw, thick, -latex']

\begin{document}
\begin{tikzpicture}[auto]
    \node [box] (User) {User \\ Requirements};
    \node [container, below of=User] (Informal) {Informal \\ Specification};
    \node [container, below of=Informal] (Formal) {Formal \\ Specification};
    \node [container, below of=Formal] (Protocol) {Protocol \\ Verfication};
 \node [container, below of=Protocol] (Implementation) {Implementation \\ Development};
     \node [container, below of=Implementation] (Conformance) {Conformance \\ Testing};
  \node [container, below of=Conformance] (Interoperability) {Interoperability \\ Testing};
   \node [box, below of=Interoperability] (Maintenance) {Maintenance};

    \path [line] (User) -- (Informal);
    \path [line] (Informal) -- (Formal);
    \path [line] (Formal) -- (Protocol);
 \path [line] (Protocol) -- (Implementation);
 \path [line] (Implementation) -- (Conformance);
\path [line] (Conformance) -- (Interoperability);
  \path [line] (Interoperability) -- (Maintenance);

\end{tikzpicture}
\end{document}

Best Answer

your flowchart is relative simple ... therefore code of it can be simplified: with use of chains library which enables:

  • simple positioning of nodes in flowchart
  • use of node names provided by chains
  • use of macro join for drawing connection lines between nodes

beside this, in drawing are used:

  • for feedback loops arrows are defined two auxiliary coordinates
  • for positioning is used positioning library and it syntax
  • \tikzstyle is depreceated way to define style of eleents in tikz drawing. instead it is in mwe below used tikzset for definition of styles

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, calc, chains, positioning}
\tikzset{
base/.style = {rectangle, rounded corners, draw, thick,
               text width=8em, minimum height=3.5em, align=flush center,
               on chain=A, join=by LA},
 box/.style = {base, rounded corners},
  EL/.style = {% Edge Labels
               font=\footnotesize, align=left},
  LA/.style = {% Line with Arrowhead
               thick, -Stealth}
        }
\begin{document}
    \begin{tikzpicture}[
  node distance = 6mm and 15mm,
    start chain = A going below,
                        ]
\node [box]     {User Requirements};            % A-1
\node [base]    {Informal Specification};
\node [base]    {Formal Specification};
\node [base]    {Protocol Verfication};         % A-4
\node [base]    {Implementation Development};
\node [base]    {Conformance Testing};
\node [base]    {Interoperability Testing};
\node [box]     {Maintenance};                  % A-8
%
\draw [LA]  (A-4.east) -- ++ (1.5,0) |-
            ($(A-2)!0.45!(A-3)$) node[EL,pos=0.25,right]{Errors\\ Detected};
% auxilary coordinates
\coordinate[right=of $(A-4.east)!0.45!(A-5.east)$] (a1);
\coordinate[right=of a1] (a2);
\draw [LA]  (A-6) -| (a1) node[EL,pos=0.75,right] {Errors\\ Detected};
\draw [LA]  (A-7) -| (a2) node[EL,pos=0.75,right] {Errors\\ Detected};
\draw [LA]  (a2)  -- (a2 -| A-5);

\end{tikzpicture}
\end{document}

enter image description here

Related Question