Commit b4b21a16 authored by Cedric CAFFY's avatar Cedric CAFFY
Browse files

Added Retrieve Request (User + Repack) workflow documentation

parent 0380c989
\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
\usepackage[left=1cm, right=1cm, top=1cm, bottom=0.5cm]{geometry}
\usetikzlibrary{shapes,shapes.geometric,arrows}
\begin{document}
\pagestyle{empty}
% Define block styles
\tikzstyle{decision} = [diamond, draw, fill=blue!20,
text width=4.5em, text badly centered, node distance=2.5cm, inner sep=0pt]
\tikzstyle{block} = [rectangle, draw, fill=blue!20,
text width=7em, text centered, rounded corners, minimum height=3em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
minimum height=2em]
\tikzstyle{endCircle} = [draw, circle, fill=black, minimum size = 0.5cm]
\tikzstyle{arrow} = [thin,->,>=stealth]
\begin{center}
\begin{tikzpicture}[node distance = 1.5cm, title/.style = {font=\bfseries, align=center}]
% Place nodes
\node [above, font=\bfseries] (b_title) {User Retrieve Request workflow};
\node [block, below of=b_title, text width=15em] (b_init) {Submission of the Retrieve Request by the user};
\node [block, below of=b_init, text width=15em] (b_statusTTFU) {Status RJS\_ToTransferForUser};
\node [block, below of=b_statusTTFU, text width=15em] (b_queueRQTTFU) {Queue in RetrieveQueueToTransferForUser};
\node [decision, below of=b_queueRQTTFU] (d_transferSucceeded) {Transfer succeeded ?};
\node [block, right of=d_transferSucceeded, node distance = 4cm] (b_requestDeleted) {Delete request};
\node [endCircle, right of=b_requestDeleted, node distance = 2.5cm] (cir_end1) {};
\node [block, below of=d_transferSucceeded, node distance = 2.5cm, text width=15em] (b_addTransferFailure) {Add transfer failure stats to Retrieve Job};
\node [decision, below of=b_addTransferFailure, text width = 6em, node distance = 2.7cm] (d_nbRetrieveRetries) {Number of retries {\textgreater =} max retries ?};
\node [block, below of=d_nbRetrieveRetries, node distance = 2.5cm] (b_statusFailed) {Status RJS\_Failed};
\node [block, below of=b_statusFailed, text width = 15em] (b_queueRQTRFU) {Queue in RetrieveQueueToReportForUser};
\node [block, below of=b_queueRQTRFU] (b_reportFailureEOS) {Report failure to EOS};
\node [decision, below of=b_reportFailureEOS] (d_reportSucceeded) {Report succeeded ?};
\node [block, right of=d_reportSucceeded, node distance = 4cm] (b_garbageCollect) {Garbage collect the Retrieve Request};
\node [block, right of=b_garbageCollect, node distance = 4cm] (b_queueRQF) {Queue in RetrieveQueueFailed};
\node [decision, below of=d_reportSucceeded, node distance = 4cm] (d_nbReportRetries) {Number of report retries {\textgreater =} max retries ?};
\node [block, right of=d_nbReportRetries, node distance = 4cm] (b_statusFailed2) {Status RJS\_Failed};
\node [block, left of=d_nbReportRetries, node distance = 4cm] (b_statusTRTUFF) {{Status RJS\_ToReport ToUserForFailure}};
\node [endCircle, right of=b_queueRQF, node distance = 2.5cm] (cir_end2) {};
% Draw edges
\path [line] (b_init) -- (b_statusTTFU);
\path [line] (b_statusTTFU) -- (b_queueRQTTFU);
\path [line] (b_queueRQTTFU) -- node [right, color=black] {Pop + Retrieve in progress}(d_transferSucceeded);
\path [line] (d_transferSucceeded) -- node [above] {yes} (b_requestDeleted);
\path [line] (b_requestDeleted) -- (cir_end1);
\path [line] (d_transferSucceeded) -- node [right] {no} (b_addTransferFailure);
\path [line] (b_addTransferFailure) -- (d_nbRetrieveRetries);
\draw [arrow] (d_nbRetrieveRetries.west) |- node[anchor=north east] {no} ([shift={(-2cm,0cm)}]d_nbRetrieveRetries.west) |- ([shift={(-0.8cm,0cm)}]b_queueRQTTFU.west) |- (b_queueRQTTFU.west);
\path [line] (d_nbRetrieveRetries.south) -- node[right] {yes} (b_statusFailed);
\path [line] (b_statusFailed) -- (b_queueRQTRFU);
\path [line] (b_queueRQTRFU) -- node [right] {pop} (b_reportFailureEOS);
\path [line] (b_reportFailureEOS) -- (d_reportSucceeded);
\path [line] (d_reportSucceeded) -- node [above] {yes} (b_garbageCollect);
\path [line] (b_garbageCollect) -- (b_queueRQF);
\path [line] (d_reportSucceeded) -- node [right] {no} (d_nbReportRetries);
\path [line] (d_nbReportRetries) -- node [above] {yes} (b_statusFailed2);
\path [line] (b_statusFailed2) -| (b_queueRQF);
\path [line] (d_nbReportRetries) -- node [above] {no} (b_statusTRTUFF);
\path [line] (b_statusTRTUFF) |- (b_queueRQTRFU);
\path [line] (b_queueRQF) -- (cir_end2);
\end {tikzpicture}
\end{center}
\newpage
\begin{center}
\begin{tikzpicture}[node distance = 1.5cm, title/.style = {font=\bfseries, align=center}]
% Place nodes
\node [above, font=\bfseries] (b_title) {Repack Retrieve Request workflow};
\node [block, below of=b_title, text width=15em] (b_init) {Retrieve subrequest created from the Repack Request expansion};
\node [block, below of=b_init, text width=15em] (b_statusTTFU) {Status RJS\_ToTransferForUser};
\node [block, below of=b_statusTTFU, text width=15em] (b_queueRQTTFU) {Queue in RetrieveQueueToTransferForUser};
\node [decision, below of=b_queueRQTTFU] (d_transferSucceeded) {Transfer succeeded ?};
\node [block, right of=d_transferSucceeded, node distance = 5cm, text width=15em] (b_queueInRQTRTRFS) {Queue in RetrieveQueueToReportToRepackForSuccess};
\node [block, right of=b_queueInRQTRTRFS,node distance = 5cm] (b_updateRepackRequestSuccess) {Update the Repack Request metadata with the successes};
\node [block, below of=b_updateRepackRequestSuccess,node distance = 3cm] (b_transformedIntoArchive) {Retrieve Request transformed into Archive Request};
\node [endCircle, below of=b_transformedIntoArchive, node distance = 2cm] (cir_end1) {};
\node [block, below of=d_transferSucceeded, node distance = 2.5cm, text width=15em] (b_addTransferFailure) {Add transfer failure stats to Retrieve Job};
\node [decision, below of=b_addTransferFailure, text width = 6em, node distance = 2.7cm] (d_nbRetrieveRetries) {Number of retries {\textgreater =} max retries ?};
\node [block, below of=d_nbRetrieveRetries, node distance = 2.7cm, text width = 15em] (b_statusTRTRFF) {Status RJS\_ToReport-ToRepackForFailure};
\node [block, below of=b_statusTRTRFF, text width = 15em, node distance = 2cm] (b_queueRQTRFU) {Queue in RetrieveQueueToReportToRepackForFailure};
\node [block, below of=b_queueRQTRFU, node distance = 2cm, text width = 15em] (b_updateRepackRequestFailures) {Update the repack request metadata with the failures};
\node [block, below of=b_updateRepackRequestFailures, node distance = 2cm, text width = 15em] (b_deleteRetrieveSubrequest) {Delete the failed retrieve subrequest};
\node [endCircle, below of=b_deleteRetrieveSubrequest, node distance = 1.5cm] (cir_end2) {};
% Draw edges
\path [line] (b_init) -- (b_statusTTFU);
\path [line] (b_statusTTFU) -- (b_queueRQTTFU);
\path [line] (b_queueRQTTFU) -- node [right, color=black] {Pop + Retrieve in progress}(d_transferSucceeded);
\path [line] (d_transferSucceeded) -- node [above] {yes} (b_queueInRQTRTRFS);
\path [line] (b_queueInRQTRTRFS) -- node [above] {pop} (b_updateRepackRequestSuccess);
\path [line] (b_updateRepackRequestSuccess) -- (b_transformedIntoArchive);
\path [line] (b_transformedIntoArchive) -- (cir_end1);
\path [line] (d_transferSucceeded) -- node [right] {no} (b_addTransferFailure);
\path [line] (b_addTransferFailure) -- (d_nbRetrieveRetries);
\draw [arrow] (d_nbRetrieveRetries.west) |- node[anchor=north east] {no} ([shift={(-2cm,0cm)}]d_nbRetrieveRetries.west) |- ([shift={(-0.8cm,0cm)}]b_queueRQTTFU.west) |- (b_queueRQTTFU.west);
\path [line] (d_nbRetrieveRetries.south) -- node[right] {yes} (b_statusTRTRFF);
\path [line] (b_statusTRTRFF) -- (b_queueRQTRFU);
\path [line] (b_queueRQTRFU) -- node [right] {pop} (b_updateRepackRequestFailures);
\path [line] (b_updateRepackRequestFailures) -- (b_deleteRetrieveSubrequest);
\path [line] (b_deleteRetrieveSubrequest) -- (cir_end2);
\end {tikzpicture}
\end{center}
\end{document}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment