\RequirePackage{tikz}
\usetikzlibrary{automata,decorations.text,positioning}

% pour dessiner des design-process en tikz
\newcommand{\artifacticon}{%
  \draw (.5,.25) -- (1,.25) -- (1,.8125) coordinate (rl) -- (.8125,.8125)
  -- (.8125,1) coordinate (lu) -- (.5,1) -- cycle;
  \draw (rl) -- (lu);
}
\newcommand{\activityicon}[1]{%
  \draw[#1] (0,.25) -- (.75,.25) -- (1,.5) -- (.75,.75) -- (0,.75) -- cycle;
}
\newcommand{\ractivityicon}{%
  \draw (1,.25) -- (.25,.25) -- (0,.5) -- (.25,.75) -- (1,.75) -- cycle;
}

\newcommand{\nodecommand}[5][]{%
  \draw (#4) node (#3) {%
    \begin{tikzpicture}
      #2
    \end{tikzpicture}
  };
  \draw (#3) node[font=\small,text badly centered,#1] (#3 label) {#5};
}

\newcommand\activity[4]{\nodecommand[above=3mm,#4]{\activityicon{draw=blue!20,fill=blue!20}}{#1}{#2}{#3}}
\newcommand\artifact[4]{\nodecommand[below=4mm,#4]{\artifacticon}{#1}{#2}{#3}}
\newcommand\ractivity[4]{\nodecommand[#4]{\ractivityicon}{#1}{#2}{#3}}
\newcommand\artifactr[4]{\nodecommand[right=4mm,#4]{\artifacticon}{#1}{#2}{#3}}
