0

I'm currently trying to create a uml activity diagram using the tikz-uml package. However, I would like my uml activities to have a simple body instead of the "rectangle split"-like body they have now.

Desired style of activities: Desired style of activities

Current style: enter image description here

MWE:

\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-uml}

\begin{document}

\begin{tikzpicture}
    \umlbasicstate [y=-10, rectangle] {I am a state}
\end{tikzpicture}

\end{document}

I've tried changing line 2988 of tikz-uml.sty from

\tikzstyle{tikzuml state style}=[rectangle split, rectangle split parts=2, rounded corners, inner xsep=1.5ex]

to

\tikzstyle{tikzuml state style}=[rectangle, rounded corners, inner xsep=1.5ex]

but it doesn't seem to change anything.

1

You can mix tikz-uml nodes with regular, customizable tikz nodes. In the example below a style is defined for a simple state, to connect to the uml nodes.

Code:

\documentclass{article}
\usepackage{tikz-uml}
\tikzset{singlestate/.style={draw,fill=yellow!20, rounded corners}}

\begin{document}
\begin{tikzpicture}
\umlstateinitial[name=initial]
\node[singlestate] at (5,0) (create){Create ticket};
\umlstatedecision[y=-3,x=5,name=decision]
\node[singlestate] at (1,-3)(reproduce){Reproduce issue};
\node[singlestate] at (10,-3)(update){Update ticket};
\umltrans{initial}{create}
\umltrans{create}{decision}
\umltrans{update}{decision}
\umltrans{decision}{reproduce}
\end{tikzpicture}
\end{document}

Result:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.