有人能帮我在乳胶中绘制这个 BPMN 吗?

有人能帮我在乳胶中绘制这个 BPMN 吗?

我无法在 BPMN 中绘制池和消息。有人可以提供这个 BPMN 上的乳胶代码吗?我提供了我完成的代码。

\documentclass{article}
\usepackage{tikz-bpmn}
\usetikzlibrary{positioning}



\begin{document}

\center
\footnotesize

    

\begin{tikzpicture}[node distance=1.2em]
\tikzstyle{every task} = [thick,fill=white]
\tikzstyle{every sequence} = [thick]
\tikzstyle{every gateway} = [thick,fill=white]
\tikzstyle{every event} = [thick,fill=white]
\tikzstyle{end event} = [event,line width=2.5pt,fill=white]

\node[event] (start) {};
\node[task,node distance=3em,right=of start] (updglite) {as};
\draw[sequence,->] (start) -- (updglite);
\node[gateway, node distance=3em, right=of updglite] (pg2) {+};
\draw[sequence,->] (updglite) -- (pg2);
\node[task,node distance=3em,right=of pg2] (sp) {er};
\draw[sequence,->] (pg2) -- (sp);
\node[task,node distance=3em,below=of sp] (sp1) {df};
\draw[sequence,->] (pg2) |- (sp1);
\node[end event, ,node distance=3em, right=of sp] (end) {};
\draw[sequence,->] (sp) -- (end);


\end{tikzpicture}

\end{document}

答案1

手动定义样式,绘制无tikz-bpmn包装的框架。

\documentclass{article}
\usepackage{tikz}
\usepackage{fontawesome5}
\usetikzlibrary{shapes}
\usetikzlibrary{arrows}
\usetikzlibrary{positioning}
\usetikzlibrary{fit}
\usetikzlibrary{arrows.meta}

\tikzset{
task/.style = {
rectangle,
draw, 
black,
thick,
minimum width=2cm,
minimum height=1.75cm,
rounded corners,
align=center,
},
gateway/.style = {
diamond, 
draw, 
black,
thick,
inner sep=0pt,
minimum size=1.3cm
},
sequence/.style = {
->,
>=triangle 45,
thick
},
message/.style ={
{Circle[open,fill=white,scale=1.5]}->,
dashed,
>=open triangle 45
},
event/.style = {
circle,
thick,
minimum size=0.8cm,
draw
},
end event/.style= {
event,
line width=2.5pt
},
intermediate event/.style={
event, 
double
}
}



\begin{document}
{\centering
\footnotesize
\begin{tikzpicture}
\node[event] (start) {};
\node[task,node distance=3em,right=of start] (updglite) {as};
\draw[sequence] (start) -- (updglite);
\node[gateway, node distance=3em, right=of updglite] (pg2) {\huge\sffamily\bfseries X};
\draw[sequence,->] (updglite) -- (pg2);
\node[task,node distance=3em,right=of pg2] (sp) {er};
\draw[sequence] (pg2) -- (sp);
\node[task,node distance=3em,below=of sp] (sp1) {df};
\node[intermediate event,node distance=3em,right=of sp1] (IE) {\large\faEnvelope[regular]
};
\draw[sequence] (sp1) -- (IE);
\node[end event, ,node distance=3em, right=of IE] (end2) {};
\draw[sequence] (IE) -- (end2);
\draw[sequence] (pg2) |- (sp1);
\node[end event, ,node distance=3em, right=of sp] (end) {};
\draw[sequence] (sp) -- (end);

\draw ([shift={(-1cm,2cm)}]current bounding box.north west) rectangle ([shift={(1cm,-2cm)}]current bounding box.south east);

\draw ([shift={(0.5\pgflinewidth,-0.5\pgflinewidth)}]current bounding box.north west) rectangle node[rotate=90] {abc} ([shift={(-0.75cm,0.5\pgflinewidth)}]current bounding box.south west);

\draw ([shift={(0.5\pgflinewidth,-1cm)}]current bounding box.south west) coordinate (restl) rectangle node{res} ([shift={(-0.5\pgflinewidth,-1.5cm)}]current bounding box.south east) coordinate (resbr);

\node [fit=(restl) (resbr),inner sep=0pt] (res) {};

\path (sp1.south) |- coordinate (tppt1) (res.north);

\draw [message] ([yshift=3pt]sp1.south) -- (tppt1);

\path (IE.south) |- coordinate (tppt2) (res.north);

\draw [message] ([yshift=-3pt]tppt2) -- (IE.south);

\end{tikzpicture}\par}
\end{document}

在此处输入图片描述

相关内容