Repository Public MIT Research preview
1% MA01-F05 — Cycle de vie d'une tâche déléguée : huit états, dont cinq terminaux.2% Idée : une tâche finit TOUJOURS dans un état terminal nommé ; « réussie » n'est qu'une des cinq fins, et3% chaque autre fin a une cause distincte qu'on lit sur la transition. Machine à états de contrats.py (TRANSITIONS).4\begin{tikzpicture}[x=1mm, y=1mm]5 \path (0,0) rectangle (142,54);6 \node[ma etat] (cr) at (11,28) {créée};7 \node[ma etat] (pr) at (43,28) {prête};8 \node[ma etat actif, line width=1.4pt] (ec) at (79,28) {en cours};9 \node[ma etat terminal] (re) at (128,28) {réussie};10 \node[ma etat terminal=maRisque] (rf) at (43,47) {refusée};11 \node[ma etat terminal=maRisque] (an) at (11,8) {annulée};12 \node[ma etat terminal=maRisque] (ex) at (60,8) {expirée};13 \node[ma etat terminal=maRisque] (ech) at (100,8) {échouée};14 \fill[maTexte] (1.5,28) circle[radius=.9mm];15 \draw[ma transition] (2.4,28) -- (cr);16 \draw[atlas arrow] (cr) -- node[atlas note, above] {dépendances} node[atlas note, below] {réussies} (pr);17 \draw[atlas arrow] (pr) -- node[atlas note, above] {entrée valide,} node[atlas note, below] {agent autorisé} (ec);18 \draw[atlas arrow valid] (ec) -- node[atlas note, above, text=maTexte] {sortie conforme} node[atlas note, below] {au schéma, à temps} (re);19 \draw[atlas arrow hazard] (pr) -- node[atlas note, right, align=left] {entrée invalide,\\ aucun agent,\\ profondeur} (rf);20 \draw[atlas arrow hazard] (cr) -- node[atlas note, right, align=left] {une dépendance\\ n'a pas réussi,\\ ou budget épuisé} (an);21 \draw[atlas arrow hazard] (ec.south west) -- node[atlas note, left, align=right, pos=.3] {délai dépassé,\\ plus de tentative\enspace} (ex.north east);22 \draw[atlas arrow hazard] (ec.south east) -- node[atlas note, right, align=left, pos=.36] {\enspace sortie non conforme,\\ \enspace plus de tentative} (ech.north west);23 \draw[atlas arrow, draw=maDecision] (ec.north west) .. controls (72,41) and (86,41) .. node[atlas note, above, text=maDecision] {nouvelle tentative (bornée)} (ec.north east);24 \node[atlas tag=maValide, anchor=north east] at (141,54) {DOUBLE CONTOUR = ÉTAT TERMINAL};25 \node[atlas note, anchor=north east, align=right] at (141,48) {rien n'a été exécuté\\ pour « refusée » et « annulée »};26\end{tikzpicture}27