v2.1 extended analysis render update

This commit is contained in:
2026-06-14 22:14:47 +02:00
parent 38d708f85b
commit 71bcfe65d7
63 changed files with 1382 additions and 2394 deletions

3
lombok.config Normal file
View File

@@ -0,0 +1,3 @@
lombok.anyConstructor.addConstructorProperties = true
lombok.jacksonized.flagUsage = WARNING
config.stopBubbling = true

View File

@@ -1,101 +0,0 @@
# Interactive HTML Generator: Architecture & Flow Definition Format
Following the success of the interactive SVG PoC, this document outlines the proposed architecture for adding an **HTML Generator** to the State Machine Exporter, allowing users to define and visualize specific business flows dynamically.
## 1. The Flow Definition Format (JSON & JSON Schema)
To make the interactive HTML generator useful and intuitive, users need a way to define their business flows externally. Rather than reinventing the wheel, we looked at industry standards for defining graph paths, workflows, and execution traces:
* **Workflow Definitions:** Tools like *Amazon States Language (ASL)*, *SCXML*, and *XState* are highly structured but define the *entire* machine's logic. They are too heavy for simply defining a "path" through an existing machine.
* **Trace Formats:** *OpenTelemetry (OTel)* uses "Spans" to represent individual steps forming a "Trace". This is closer to what we want (a history of states).
* **Graph Formats:** The *JSON Graph Format (JGF)* standardizes graph nodes and edges representation but is geared towards raw data modeling rather than human-readable business flows.
**Conclusion on Format:** We will use a lightweight custom JSON format inspired by execution traces. It is designed to be highly readable for humans defining business flows, relying simply on ordered arrays of State names.
### JSON Schema for IDE Autocomplete
To make the format truly intuitive and prevent typos, we will publish a **JSON Schema** (`flow-schema.json`).
By referencing this schema, developers writing `flows.json` in IDEs like VS Code or IntelliJ will get **instant autocomplete, hover tooltips, and real-time validation** for fields like `id`, `title`, and `color`.
* *Future Enhancement:* The Java exporter could dynamically generate a project-specific JSON Schema on the fly that hardcodes the allowed `enum` values for the `path` array (e.g., restricted exactly to `"SUBMITTED"`, `"PAID"`, etc.), providing perfect autocomplete for state names!
### Proposed Schema (`flows.json`)
```json
{
"$schema": "./flow-schema.json",
"stateMachine": "click.kamil.examples.statemachine.simple.SimpleEnumStateMachineConfiguration",
"flows": [
{
"id": "flow-happy-path",
"title": "Happy Path (Success)",
"description": "The standard flow for a successful order: Submitted -> Paid -> Fulfilled.",
"color": "#32CD32",
"path": [
".start.",
"SUBMITTED",
"PAID",
"FULFILLED",
".end."
]
},
{
"id": "flow-cancel-post-pay",
"title": "Cancel Post-Payment",
"description": "Order is canceled after payment.",
"color": "#FF6347",
"path": [
".start.",
"SUBMITTED",
"PAID",
"CANCELED",
".end."
]
}
]
}
```
### Format Details:
* **`$schema`**: Points to the JSON schema for IDE tooling.
* **`stateMachine`**: Links these flows to a specific state machine configuration in the codebase.
* **`id`**: A unique identifier for the flow (used for DOM elements).
* **`title` & `description`**: Rendered in the HTML sidebar for the user.
* **`color` (Optional)**: Allows overriding the default highlight color (e.g., green for success, red for errors).
* **`path`**: An ordered array of **State Names** (acting like an OpenTelemetry trace).
* *Note on Edges:* The user only needs to define the *states* they pass through. The generator will automatically calculate the edges (transitions) between these states to highlight the lines. Special tokens like `.start.` and `.end.` map to the initial and terminal pseudo-states.
## 2. Robust Error Handling & Input Validation
Before generating the HTML, the exporter **must validate** that the provided `flows.json` is logically sound against the actual codebase AST. If a user defines a flow that isn't physically possible in the state machine, the tool must fail fast with highly descriptive errors.
### Validation Rules & Error Handling Strategy:
1. **Schema Validation (Syntax):**
* *Check:* Is the JSON structurally correct (required fields present, correct types)?
* *Error:* "Invalid format in flows.json: 'title' is required for flow 'flow-cancel-post-pay'."
2. **State Existence (Dangling Pointers):**
* *Check:* Every state listed in the `path` array must exist in the parsed `StateMachineModel`.
* *Error:* "Validation Error in 'Happy Path': State 'FULLFILLED' does not exist in StateMachine 'SimpleEnum'. Did you mean 'FULFILLED'?" (implementing a Levenshtein distance check for typos would be excellent here).
3. **Transition Validity (Impossible Paths):**
* *Check:* For every adjacent pair in the `path` array (e.g., `["SUBMITTED", "PAID"]`), the validator must check the `StateMachineModel.getTransitions()` to ensure a valid transition exists where `source == "SUBMITTED"` and `target == "PAID"`.
* *Error:* "Validation Error in 'Happy Path': No transition exists from 'PAID' to 'SUBMITTED'. Please check your state machine configuration."
4. **Ambiguous Transitions (Multiple Edges):**
* *Check:* If multiple transitions exist between the same two states (e.g., two different events trigger a move from A -> B).
* *Handling:* By default, highlight *all* edges between A and B to represent the general path.
* *Future Enhancement:* Expand the JSON format to allow specifying the exact `event` name in the path array (e.g., `["SUBMITTED", {"state": "PAID", "event": "PAY_CREDIT_CARD"}]`) to disambiguate.
## 3. HTML Generation Strategy
The HTML Exporter will be a new class implementing the `StateMachineExporter` interface (or a specialized decorator around the `PlantUml` exporter).
### Steps for Generation:
1. **Generate PlantUML SVG:** First, use the existing PlantUML engine to generate the raw SVG string in memory (using the modern CSS `<style>` approach we finalized).
2. **Parse `flows.json`:** Load the user-provided flow definitions.
3. **Validate Flows:** Run the "Flow Validator" against the AST `StateMachineModel`.
4. **Calculate Edges:** For each valid flow, convert the `path` array (States) into an `edges` array (Transitions) so the Javascript knows exactly which SVG arrows to highlight.
5. **Inject Template:** Load a base HTML template (similar to `interactive_poc2.html`).
6. **Data Binding:**
* Inject the raw `<svg>` string directly into the template (avoiding CORS issues).
* Inject the validated flow data into a `<script>` tag as a JSON object, or directly render the sidebar HTML elements with `data-*` attributes.
7. **Output:** Write the final standalone `.html` file to the output directory.
## 4. Advantages of this Architecture
* **Standalone Output:** The resulting HTML file is 100% self-contained. No server, no external CSS/JS, and no CORS issues. It can be directly emailed, attached to Jira tickets, or hosted on GitHub Pages.
* **CI/CD Integration:** Because validation is strictly tied to the AST, if a developer refactors the Java State Machine and breaks a documented "Flow", the CI pipeline will fail, ensuring interactive documentation never goes out of date.

View File

@@ -1,66 +0,0 @@
# Thought Experiment: Interactive SVG Flow Highlighting
## Overview
The goal of this thought experiment is to explore the feasibility and usefulness of animating or interactively highlighting specific "flows" (paths composed of states and transitions) within a generated state machine diagram. For example, hovering over a label like "Successful Payment Flow" would highlight the `SUBMITTED -> PAID -> FULFILLED` path, dimming the rest of the diagram.
## Usefulness
This feature would be **highly useful** and would significantly elevate the value of the State Machine Exporter:
1. **Comprehension of Complex Machines:** In large diagrams (like `ComplexStateMachineConfig`), a static image becomes a "spaghetti" of crossing lines. Interactive highlighting allows developers to visually isolate a single business transaction (e.g., "Cancellation Flow", "Refund Flow") without losing the context of the whole machine.
2. **Documentation & Onboarding:** It turns a static architectural diagram into an interactive documentation tool, making it much easier for new team members to trace how an entity moves through its lifecycle.
3. **Debugging:** By defining flows based on logged events, a developer could "replay" a sequence of events and see exactly what path the state machine took.
## Feasibility
This is **entirely feasible** using the tools currently available in the project.
### The Technical Reality of PlantUML SVGs
When PlantUML generates an SVG (`plantuml -tsvg`), it embeds highly predictable metadata into the DOM structure:
- **States (Nodes):** PlantUML creates `<g>` elements for states. They typically have an `id` matching the state name (e.g., `id="FULFILLED"`) or prefixed with entity (e.g., `id="entity_SUBMITTED"`).
- **Transitions (Links):** PlantUML creates `<g>` elements for arrows with predictable IDs and data attributes. For example: `<g class="link" data-entity-1="SUBMITTED" data-entity-2="PAID" id="link_SUBMITTED_PAID">`.
Because these identifiers match the semantic names of the states in the Java/JSON model, mapping a logical "Flow" to visual SVG elements is straightforward.
## Proposed Technical Approach
To realize this, we would build a lightweight **Interactive HTML Exporter** (or augment the JSON exporter to generate a companion HTML file).
### 1. Data Structure (The "Flow" Definition)
We need a way to define flows. This could be passed via configuration or inferred from the model. A flow is essentially an array of IDs:
```json
{
"name": "Successful Payment",
"elements": ["SUBMITTED", "link_SUBMITTED_PAID", "PAID", "link_PAID_FULFILLED", "FULFILLED"]
}
```
### 2. HTML/JS Wrapper
Instead of just outputting an `.svg` or `.png`, the exporter would output an `.html` file that contains:
1. **The inline SVG code** (generated via PlantUML).
2. **A Sidebar UI** containing a list of defined flows.
3. **Vanilla JavaScript** to handle the interactivity.
### 3. The JavaScript Logic (Proof of Concept)
The JS logic is remarkably simple. It listens for `mouseenter` events on the flow list:
1. **Dim Everything:** Add a class to the root SVG wrapper (e.g., `.flow-active`) that sets `opacity: 0.2` on all `<g>` tags.
2. **Highlight Flow:** Iterate through the `elements` array of the active flow. Find the SVG elements by their `id` (e.g., `document.getElementById('link_SUBMITTED_PAID')`) and add a `.highlighted` class.
3. **CSS Magic:**
```css
.diagram-container.flow-active svg g.highlighted {
opacity: 1 !important;
}
.diagram-container.flow-active svg g.highlighted path {
stroke: red !important;
stroke-width: 3px !important;
}
```
## Limitations & Challenges
While feasible, there are a few edge cases to handle:
1. **Multiple Transitions Between Same States:** If there are two distinct transitions from `A` to `B` (e.g., triggered by different events), PlantUML might generate IDs like `link_A_B` and `link_A_B_1`. The JS logic would need to rely on the event stereotypes we added recently (e.g., `<<e_PAY>>`) to distinguish them. We could parse the SVG text nodes to find the event label, or rely on the custom CSS classes if PlantUML supports passing them through to SVG (currently, PlantUML inlines styles rather than keeping CSS classes for transitions).
2. **Layout Shifts:** We must rely purely on CSS styling (colors, opacities, stroke widths). We cannot animate the *position* or layout of the arrows because PlantUML hardcodes the exact SVG path coordinates.
3. **Standalone vs. Hosted:** Generating a single `.html` file is easy and portable. However, if this is meant to be embedded in a documentation site (like Confluence or Backstage), injecting custom JS/CSS along with raw SVG can sometimes run into sanitization or iframe limitations.
4. **Maintenance:** Any changes to how PlantUML generates its internal SVG IDs in future versions would break the JS highlighting logic.
## Conclusion
The idea is brilliant. It transforms the output from a static image into an interactive, exploratory tool. Since the `StateMachineModel` is already cleanly exported as JSON, a standalone frontend script could easily marry that JSON data with the PlantUML SVG output to create dynamic, highlightable documentation flows without requiring heavy backend changes.

View File

@@ -1,90 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<style>
body { font-family: sans-serif; display: flex; }
#sidebar { width: 300px; padding: 20px; background: #f4f4f4; }
#diagram { flex-grow: 1; padding: 20px; }
.flow-btn { padding: 10px; margin-bottom: 5px; cursor: pointer; background: #ddd; border: 1px solid #ccc; border-radius: 4px;}
.flow-btn:hover { background: #bdf; }
/* Dim everything by default when a flow is active */
.diagram-container.flow-active svg g {
opacity: 0.2;
transition: opacity 0.3s;
}
/* Highlight active elements */
.diagram-container.flow-active svg g.highlighted {
opacity: 1 !important;
}
/* Make highlighted paths thicker/red */
.diagram-container.flow-active svg g.highlighted path,
.diagram-container.flow-active svg g.highlighted polygon {
stroke: red !important;
stroke-width: 3px !important;
}
.diagram-container.flow-active svg g.highlighted rect,
.diagram-container.flow-active svg g.highlighted ellipse {
stroke: red !important;
stroke-width: 3px !important;
}
</style>
</head>
<body>
<div id="sidebar">
<h3>Flows</h3>
<div class="flow-btn" data-flow='["SUBMITTED", "link_SUBMITTED_PAID", "PAID", "link_PAID_FULFILLED", "FULFILLED"]'>Flow: Successful Payment</div>
<div class="flow-btn" data-flow='["SUBMITTED", "link_SUBMITTED_CANCELED", "CANCELED"]'>Flow: Cancel Before Pay</div>
</div>
<div id="diagram" class="diagram-container">
<!-- SVG will be injected here -->
</div>
<script>
// Load SVG
fetch('SimpleEnumStateMachineConfiguration.svg')
.then(r => r.text())
.then(svg => {
document.getElementById('diagram').innerHTML = svg;
setupInteractivity();
});
function setupInteractivity() {
const container = document.getElementById('diagram');
document.querySelectorAll('.flow-btn').forEach(btn => {
btn.addEventListener('mouseenter', (e) => {
container.classList.add('flow-active');
const flowIds = JSON.parse(e.target.getAttribute('data-flow'));
flowIds.forEach(id => {
// PlantUML sometimes prepends entity_
let el = document.getElementById(id) || document.getElementById('entity_' + id);
if(el) {
el.classList.add('highlighted');
} else {
// For links, fallback to data-attributes if id parsing fails
if (id.startsWith('link_')) {
const parts = id.split('_');
let link = document.querySelector(`g[data-entity-1="${parts[1]}"][data-entity-2="${parts[2]}"]`);
if (link) link.classList.add('highlighted');
}
}
});
});
btn.addEventListener('mouseleave', () => {
container.classList.remove('flow-active');
document.querySelectorAll('.highlighted').forEach(el => el.classList.remove('highlighted'));
});
});
}
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -1,417 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Final PoC: Real Machine Explorer</title>
<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/tippy.js@6"></script>
<script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=JetBrains+Mono:wght@400;700&display=swap" rel="stylesheet">
<style>
:root {
--bg: #f8fafc;
--sidebar-bg: #ffffff;
--accent: #3b82f6; /* Modern Blue */
--accent-hover: #2563eb;
--text: #0f172a;
--text-muted: #64748b;
--border: #e2e8f0;
--highlight: #ef4444; /* Coral Red for Highlights */
--node-bg: #ffffff;
--node-border: #94a3b8;
}
body {
margin: 0;
display: flex;
height: 100vh;
font-family: 'Inter', -apple-system, sans-serif;
background: var(--bg);
color: var(--text);
overflow: hidden;
}
#sidebar {
width: 400px;
background: var(--sidebar-bg);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
padding: 25px;
overflow-y: auto;
box-shadow: 2px 0 15px rgba(0,0,0,0.03);
z-index: 10;
}
.ep-card {
padding: 16px;
background: #fff;
border: 1px solid var(--border);
border-radius: 8px;
margin-bottom: 12px;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
}
.ep-card::before {
content: '';
position: absolute;
left: 0; top: 0; bottom: 0; width: 4px;
background: transparent;
transition: background 0.2s;
}
.ep-card:hover {
border-color: var(--accent);
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}
.ep-card:hover::before {
background: var(--accent);
}
.ep-type {
font-size: 0.65rem;
font-weight: 800;
padding: 4px 8px;
border-radius: 4px;
display: inline-block;
margin-bottom: 8px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.type-rest { background: #eff6ff; color: #1d4ed8; }
.type-custom { background: #fef2f2; color: #b91c1c; }
.method { font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; }
.path { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-muted); }
#main { flex-grow: 1; position: relative; background: var(--bg); }
#svg-container { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
svg { width: 100%; height: 100%; max-width: none; }
/* --- SVG Styling --- */
.node circle { fill: var(--node-bg); stroke: var(--node-border); stroke-width: 2.5px; transition: all 0.3s; }
.node text { fill: var(--text); font-family: 'Inter', sans-serif; font-weight: 600; font-size: 14px; user-select: none; }
.transition-link path { stroke: #cbd5e1; stroke-width: 2.5px; fill: none; transition: all 0.3s; }
.transition-link text { fill: #64748b; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; transition: all 0.3s; cursor: pointer; user-select: none; }
.transition-link:hover path { stroke: var(--accent); stroke-width: 4px; }
.transition-link:hover text { fill: var(--accent); font-size: 12px; }
/* Animation & Highlighting */
.dimmed { opacity: 0.1; filter: grayscale(1); transition: all 0.4s ease; }
.active-path path {
stroke: var(--highlight) !important;
stroke-width: 4.5px !important;
filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.4));
transition: all 0.3s ease;
stroke-dasharray: 8;
animation: flow 1s linear infinite;
}
@keyframes flow {
from { stroke-dashoffset: 16; }
to { stroke-dashoffset: 0; }
}
.active-path text {
fill: #000 !important;
font-weight: 800 !important;
font-size: 12px !important;
paint-order: stroke;
stroke: #fff;
stroke-width: 4px;
transition: all 0.3s ease;
}
.active-node circle {
stroke: var(--highlight) !important;
stroke-width: 3.5px !important;
}
.active-node text {
font-weight: 800 !important;
}
/* Tippy Styling */
.tippy-box[data-theme~='modern'] {
background-color: #fff;
color: var(--text);
box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
border: 1px solid var(--border);
padding: 0;
border-radius: 12px;
text-align: left;
}
.chain-step {
display: flex;
align-items: center;
font-size: 0.8rem;
color: var(--text-muted);
margin-top: 6px;
}
.chain-step b { color: var(--accent); margin-right: 8px; width: 15px; }
.payload-box {
background: #0f172a;
color: #e2e8f0;
border-radius: 8px;
padding: 15px;
font-family: 'JetBrains Mono', monospace;
font-size: 0.75rem;
line-height: 1.6;
margin-top: 10px;
}
</style>
</head>
<body>
<div id="sidebar">
<div style="font-weight: 900; font-size: 1.4rem; margin-bottom: 5px; color: var(--text);">Machine Explorer</div>
<div style="font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--border);">ExtendedStateMachineConfig</div>
<div id="ep-list"></div>
</div>
<div id="main">
<div id="svg-container">
<svg id="viz" viewBox="0 0 900 500" xmlns="http://www.w3.org/2000/svg">
<defs>
<marker id="arrow-default" markerWidth="8" markerHeight="8" refX="5" refY="4" orientation="auto-start-reverse">
<path d="M0,0 L8,4 L0,8 Z" fill="#94a3b8" />
</marker>
<marker id="arrow-active" markerWidth="8" markerHeight="8" refX="5" refY="4" orientation="auto-start-reverse">
<path d="M0,0 L8,4 L0,8 Z" fill="#ef4444" />
</marker>
</defs>
<!-- Nodes -->
<g class="node" id="node-START">
<circle cx="150" cy="250" r="45" />
<text x="150" y="255" text-anchor="middle">START</text>
</g>
<g class="node" id="node-PROCESSING">
<circle cx="450" cy="250" r="45" />
<text x="450" y="255" text-anchor="middle">PROCESSING</text>
</g>
<g class="node" id="node-COMPLETED">
<circle cx="750" cy="150" r="45" />
<text x="750" y="155" text-anchor="middle">COMPLETED</text>
</g>
<g class="node" id="node-CANCELLED">
<circle cx="750" cy="350" r="45" />
<text x="750" y="355" text-anchor="middle">CANCELLED</text>
</g>
<!-- Transitions - Paths end exactly at radius (45px) from target center -->
<g class="transition-link" id="link_AUDIT_EVENT" data-source="node-START" data-target="node-START">
<path d="M 125 215 C 80 160, 40 200, 105 240" marker-end="url(#arrow-default)" />
<text x="75" y="165" text-anchor="middle">AUDIT_EVENT</text>
</g>
<g class="transition-link" id="link_SUBMIT_EVENT" data-source="node-START" data-target="node-PROCESSING">
<path d="M 195 250 L 405 250" marker-end="url(#arrow-default)" />
<text x="300" y="248" text-anchor="middle">SUBMIT_EVENT</text>
</g>
<g class="transition-link" id="link_REACTIVE_EVENT" data-source="node-START" data-target="node-PROCESSING">
<path d="M 185 220 Q 300 140 415 220" marker-end="url(#arrow-default)" />
<text x="300" y="174" text-anchor="middle">REACTIVE_EVENT</text>
</g>
<g class="transition-link" id="link_EXTERNAL_TRIGGER" data-source="node-START" data-target="node-PROCESSING">
<path d="M 185 280 Q 300 360 415 280" marker-end="url(#arrow-default)" />
<text x="300" y="329" text-anchor="middle">EXTERNAL_TRIGGER</text>
</g>
<g class="transition-link" id="link_FINISH" data-source="node-PROCESSING" data-target="node-COMPLETED">
<path d="M 485 230 L 715 170" marker-end="url(#arrow-default)" />
<text x="600" y="198" text-anchor="middle">FINISH</text>
</g>
<g class="transition-link" id="link_CANCEL_EVENT" data-source="node-PROCESSING" data-target="node-CANCELLED">
<path d="M 485 270 L 715 330" marker-end="url(#arrow-default)" />
<text x="600" y="303" text-anchor="middle">CANCEL_EVENT</text>
</g>
</svg>
</div>
</div>
<script>
// Exact Metadata from ExtendedStateMachineConfig (Hardcoded for PoC)
const metadata = {
"metadata": {
"entryPoints": [
{ "type": "REST", "name": "POST /api/orders/submit", "className": "OrderController", "methodName": "submitOrder" },
{ "type": "REST", "name": "POST /api/orders/cancel", "className": "OrderController", "methodName": "cancelOrder" },
{ "type": "REST", "name": "POST /api/orders/finish", "className": "OrderController", "methodName": "finishOrder" },
{ "type": "REST", "name": "POST /api/orders/resume", "className": "OrderController", "methodName": "resumeOrder" },
{ "type": "REST", "name": "POST /api/orders/reactive", "className": "OrderController", "methodName": "reactiveOrder" },
{ "type": "CUSTOM", "name": "AuditInterceptor", "className": "AuditInterceptor", "methodName": "preHandle" }
],
"callChains": [
{ "entryPoint": { "name": "POST /api/orders/submit" }, "methodChain": ["OrderController.submitOrder", "OrderService.processSubmit"], "triggerPoint": { "event": "SUBMIT_EVENT" } },
{ "entryPoint": { "name": "POST /api/orders/submit" }, "methodChain": ["OrderController.submitOrder", "OrderService.processSubmit"], "triggerPoint": { "event": "EXTERNAL_TRIGGER" } },
{ "entryPoint": { "name": "POST /api/orders/cancel" }, "methodChain": ["OrderController.cancelOrder", "OrderService.processCancel"], "triggerPoint": { "event": "CANCEL_EVENT" } },
{ "entryPoint": { "name": "POST /api/orders/finish" }, "methodChain": ["OrderController.finishOrder"], "triggerPoint": { "event": "FINISH" } },
{ "entryPoint": { "name": "POST /api/orders/reactive" }, "methodChain": ["OrderController.reactiveOrder", "ReactiveOrderService.processReactive"], "triggerPoint": { "event": "REACTIVE_EVENT" } },
{ "entryPoint": { "name": "AuditInterceptor" }, "methodChain": ["AuditInterceptor.preHandle"], "triggerPoint": { "event": "AUDIT_EVENT" } }
]
},
"transitions": [
{ "event": "SUBMIT_EVENT", "guard": "isNewOrder()", "actions": ["initOrder"] },
{ "event": "FINISH", "actions": ["markDone"] },
{ "event": "AUDIT_EVENT", "actions": ["logAudit"] }
]
};
document.addEventListener('DOMContentLoaded', () => {
// Setup Pan & Zoom
svgPanZoom('#viz', { zoomEnabled: true, controlIconsEnabled: true, fit: true, center: true, minZoom: 0.5, maxZoom: 5 });
populateSidebar();
attachInteractivity();
});
function populateSidebar() {
const list = document.getElementById('ep-list');
metadata.metadata.entryPoints.forEach(ep => {
const card = document.createElement('div');
card.className = 'ep-card';
card.innerHTML = `
<div class="ep-type type-${ep.type.toLowerCase()}">${ep.type}</div>
<div class="method">${ep.name}</div>
<div class="path">${ep.className}.${ep.methodName}</div>
`;
card.onmouseenter = () => highlightPaths(ep.name);
card.onmouseleave = clearHighlights;
list.appendChild(card);
});
}
function highlightPaths(epName) {
clearHighlights();
const relevantEvents = metadata.metadata.callChains
.filter(c => c.entryPoint.name === epName)
.map(c => c.triggerPoint.event);
if (relevantEvents.length === 0) return;
// Dim everything
document.querySelectorAll('.node, .transition-link').forEach(el => el.classList.add('dimmed'));
// Highlight matching paths and their connected nodes
relevantEvents.forEach(evt => {
const link = document.getElementById('link_' + evt);
if (link) {
link.classList.remove('dimmed');
link.classList.add('active-path');
// Swap marker to active (red)
const path = link.querySelector('path');
if(path) path.setAttribute('marker-end', 'url(#arrow-active)');
// Highlight source and target nodes
const sourceId = link.getAttribute('data-source');
const targetId = link.getAttribute('data-target');
if (sourceId) {
const node = document.getElementById(sourceId);
node.classList.remove('dimmed');
node.classList.add('active-node');
}
if (targetId) {
const node = document.getElementById(targetId);
node.classList.remove('dimmed');
node.classList.add('active-node');
}
}
});
}
function clearHighlights() {
document.querySelectorAll('.dimmed, .active-path, .active-node').forEach(el => {
el.classList.remove('dimmed', 'active-path', 'active-node');
});
// Reset markers
document.querySelectorAll('.transition-link path').forEach(path => {
path.setAttribute('marker-end', 'url(#arrow-default)');
});
}
function attachInteractivity() {
document.querySelectorAll('.transition-link').forEach(link => {
const eventName = link.id.replace('link_', '');
const metaTrans = metadata.transitions.find(t => t.event === eventName);
const chains = metadata.metadata.callChains.filter(c => c.triggerPoint.event === eventName);
tippy(link, {
content: createTooltip(eventName, metaTrans, chains),
allowHTML: true,
theme: 'modern',
interactive: true,
appendTo: document.body,
placement: 'auto',
delay: [100, 50],
maxWidth: 450
});
});
}
function createTooltip(name, trans, chains) {
let html = `<div style="padding:20px; min-width:350px;">
<div style="font-weight:900; color:var(--text); font-size:1.2rem; margin-bottom:15px;">
Event: <span style="color:var(--highlight)">${name}</span>
</div>`;
if (trans) {
if (trans.guard) {
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:6px; letter-spacing:0.5px">Guard</div>
<div style="background:#f1f5f9; padding:8px 10px; border-radius:6px; font-family:'JetBrains Mono',monospace; font-size:0.85rem; margin-bottom:15px; color:#334155; border:1px solid #e2e8f0;">${trans.guard}</div>`;
}
if (trans.actions && trans.actions.length > 0) {
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:6px; letter-spacing:0.5px">Actions</div>
<div style="display:flex; gap:8px; flex-wrap:wrap; margin-bottom:15px">
${trans.actions.map(a => `<span style="background:#dbeafe; color:#1d4ed8; padding:4px 10px; border-radius:6px; font-size:0.8rem; font-weight:700; font-family:'JetBrains Mono',monospace; border:1px solid #bfdbfe;">${a}()</span>`).join('')}
</div>`;
}
}
if (chains && chains.length > 0) {
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:10px; border-top:1px solid #f1f5f9; padding-top:15px; letter-spacing:0.5px">Triggered by Endpoint</div>`;
chains.forEach(c => {
html += `<div style="margin-bottom:15px">
<div style="font-weight:800; font-size:0.9rem; color:#0f172a;">${c.entryPoint.name}</div>
<div style="margin-left:12px; border-left:2px solid #e2e8f0; padding-left:15px; margin-top:10px">
${c.methodChain.map((m, i) => `<div class="chain-step"><b>${i+1}</b> <span style="font-family:'JetBrains Mono',monospace;">${m}()</span></div>`).join('')}
</div>
</div>`;
});
}
// The Placeholder for POJO Data (as requested)
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:8px; border-top:1px solid #f1f5f9; padding-top:15px; letter-spacing:0.5px">Data Payload (Planned)</div>
<div class="payload-box">
<span style="color:#f43f5e">@RequestBody</span> <span style="color:#38bdf8">OrderRequest</span> {<br>
&nbsp;&nbsp;<span style="color:#64748b; font-style:italic;">// Real AST parsing logic to map</span><br>
&nbsp;&nbsp;<span style="color:#64748b; font-style:italic;">// endpoint payload to this event</span><br>
&nbsp;&nbsp;<span style="color:#38bdf8">String</span> id: <span style="color:#a3e635">"ORD-123"</span>,<br>
&nbsp;&nbsp;<span style="color:#38bdf8">int</span> quantity: <span style="color:#fbbf24">5</span><br>
}
</div>`;
html += `</div>`;
return html;
}
</script>
</body>
</html>

View File

@@ -55,6 +55,10 @@ public class ExportService {
} }
public void runExporter(Path inputDir, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<String> activeProfiles) throws IOException { public void runExporter(Path inputDir, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<String> activeProfiles) throws IOException {
runExporter(inputDir, outputDir, selectedFormats, renderChoicesAsDiamonds, activeProfiles, null, null);
}
public void runExporter(Path inputDir, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<String> activeProfiles, Path flowsOverride, String machineFilter) throws IOException {
CodebaseContext context = new CodebaseContext(); CodebaseContext context = new CodebaseContext();
context.setActiveProfiles(activeProfiles); context.setActiveProfiles(activeProfiles);
context.setSourcepath(List.of(inputDir.toString())); context.setSourcepath(List.of(inputDir.toString()));
@@ -71,10 +75,11 @@ public class ExportService {
} }
List<BusinessFlow> flows = new ArrayList<>(); List<BusinessFlow> flows = new ArrayList<>();
Path flowsFile = inputDir.resolve("flows.json"); Path flowsFile = flowsOverride != null ? flowsOverride : inputDir.resolve("flows.json");
if (!Files.exists(flowsFile)) { if (flowsOverride == null && !Files.exists(flowsFile)) {
flowsFile = inputDir.resolve("src/main/resources/flows.json"); flowsFile = inputDir.resolve("src/main/resources/flows.json");
} }
if (Files.exists(flowsFile)) { if (Files.exists(flowsFile)) {
log.info("Loading business flows from {}", flowsFile.toAbsolutePath()); log.info("Loading business flows from {}", flowsFile.toAbsolutePath());
try { try {
@@ -88,7 +93,7 @@ public class ExportService {
context.scan(inputDir); context.scan(inputDir);
CodebaseIntelligenceProvider intelligence = new JdtIntelligenceProvider(context, inputDir); CodebaseIntelligenceProvider intelligence = new JdtIntelligenceProvider(context, inputDir);
exportAll(context, intelligence, outputDir, selectedFormats, renderChoicesAsDiamonds, flows); exportAll(context, intelligence, outputDir, selectedFormats, renderChoicesAsDiamonds, flows, machineFilter);
} }
public void runJsonExporter(Path jsonFile, Path outputDir, List<String> selectedFormats) throws IOException { public void runJsonExporter(Path jsonFile, Path outputDir, List<String> selectedFormats) throws IOException {
@@ -98,13 +103,14 @@ public class ExportService {
generateOutputs(outputDir, result, selectedFormats); generateOutputs(outputDir, result, selectedFormats);
} }
private void exportAll(CodebaseContext context, CodebaseIntelligenceProvider intelligence, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<BusinessFlow> flows) throws IOException { private void exportAll(CodebaseContext context, CodebaseIntelligenceProvider intelligence, Path outputDir, List<String> selectedFormats, boolean renderChoicesAsDiamonds, List<BusinessFlow> flows, String machineFilter) throws IOException {
Set<String> processedLocations = new HashSet<>(); Set<String> processedLocations = new HashSet<>();
// 1. Find entry point classes (annotated or extending adapter) // 1. Find entry point classes (annotated or extending adapter)
List<TypeDeclaration> entryPoints = context.findEntryPointClasses(TARGET_ANNOTATIONS); List<TypeDeclaration> entryPoints = context.findEntryPointClasses(TARGET_ANNOTATIONS);
for (TypeDeclaration td : entryPoints) { for (TypeDeclaration td : entryPoints) {
String fqn = context.getFqn(td); String fqn = context.getFqn(td);
if (machineFilter != null && !fqn.contains(machineFilter)) continue;
if (processedLocations.add(fqn)) { if (processedLocations.add(fqn)) {
processEntryPoint(td, outputDir, context, intelligence, selectedFormats, renderChoicesAsDiamonds, flows); processEntryPoint(td, outputDir, context, intelligence, selectedFormats, renderChoicesAsDiamonds, flows);
} }
@@ -118,6 +124,7 @@ public class ExportService {
String methodName = m.getName().getIdentifier(); String methodName = m.getName().getIdentifier();
String uniqueId = parentFqn + "#" + methodName; String uniqueId = parentFqn + "#" + methodName;
if (machineFilter != null && !uniqueId.contains(machineFilter)) continue;
if (processedLocations.add(uniqueId)) { if (processedLocations.add(uniqueId)) {
processBeanMethod(m, outputDir, context, intelligence, selectedFormats, renderChoicesAsDiamonds, flows); processBeanMethod(m, outputDir, context, intelligence, selectedFormats, renderChoicesAsDiamonds, flows);
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 KiB

After

Width:  |  Height:  |  Size: 173 KiB

View File

@@ -2,134 +2,95 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
state STATE1 skinparam state {
state STATE2 BackgroundColor white
state STATE3 BorderColor #94a3b8
state STATE4 BorderThickness 1
state STATE5 FontName Inter
state STATE6 FontSize 9
state STATE7 FontStyle bold
state STATE8 RoundCorner 20
state STATE9 Padding 1
state STATE10 }
state STATE11 skinparam shadowing false
state STATE12 skinparam ArrowFontName JetBrains Mono
state STATE13 skinparam ArrowFontSize 8
state STATE14 skinparam ArrowColor #cbd5e1
state STATE15 skinparam ArrowThickness 1
state STATE16 skinparam dpi 110
state STATE17 skinparam svgLinkTarget _self
state STATE18 state StatesSTATE1
state STATE19 state StatesSTATE2
state STATE20 state StatesSTATE3
state StatesSTATE4
state StatesSTATE5
state StatesSTATE6
state StatesSTATE7
state StatesSTATE8
state StatesSTATE9
state StatesSTATE10
state StatesSTATE11
state StatesSTATE12
state StatesSTATE13
state StatesSTATE14
state StatesSTATE15
state StatesSTATE16
state StatesSTATE17
state StatesSTATE18
state StatesSTATE19
state StatesSTATE20
<style> [*] --> StatesSTATE1
state {
.choice {
BackgroundColor LightYellow
}
}
arrow {
LineThickness 1
.external { LineColor #1E90FF }
.internal { LineColor #32CD32 }
.local { LineColor #FFA500 }
.junction { LineColor #FF69B4 }
.join { LineColor #8A2BE2 }
.fork { LineColor #20B2AA }
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
} state StatesSTATE16 <<choice>>
/* Example: Highlight all transitions for a specific event */ state StatesSTATE17 <<choice>>
/* .e_MY_EVENT { LineColor red } */ state StatesSTATE18 <<choice>>
</style> state StatesSTATE19 <<choice>>
state StatesSTATE20 <<choice>>
state StatesSTATE11 <<choice>>
state StatesSTATE12 <<choice>>
state StatesSTATE14 <<choice>>
state StatesSTATE9 <<choice>>
state StatesSTATE8 <<choice>>
hide <<external>> stereotype StatesSTATE1 -[#1E90FF,bold]-> StatesSTATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
hide <<internal>> stereotype StatesSTATE2 -[#1E90FF,bold]-> StatesSTATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
hide <<local>> stereotype StatesSTATE3 -[#1E90FF,bold]-> StatesSTATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
hide <<junction>> stereotype StatesSTATE4 -[#1E90FF,bold]-> StatesSTATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
hide <<join>> stereotype StatesSTATE5 -[#1E90FF,bold]-> StatesSTATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
hide <<fork>> stereotype StatesSTATE6 -[#1E90FF,bold]-> StatesSTATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
hide <<choice_type>> stereotype StatesSTATE7 -[#1E90FF,bold]-> StatesSTATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
hide <<choice_color_0>> stereotype StatesSTATE8 -[#1E90FF,bold]-> StatesSTATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
hide <<choice_color_1>> stereotype StatesSTATE9 -[#1E90FF,bold]-> StatesSTATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
hide <<choice_color_2>> stereotype StatesSTATE10 -[#1E90FF,bold]-> StatesSTATE11 <<external>> <<e_Events_EVENT10>> : Events.EVENT10
hide <<choice_color_3>> stereotype StatesSTATE11 -[#1E90FF,bold]-> StatesSTATE12 <<external>> <<e_Events_EVENT11>> : Events.EVENT11
hide <<choice_color_4>> stereotype StatesSTATE12 -[#1E90FF,bold]-> StatesSTATE13 <<external>> <<e_Events_EVENT12>> : Events.EVENT12
hide <<choice_color_5>> stereotype StatesSTATE13 -[#1E90FF,bold]-> StatesSTATE14 <<external>> <<e_Events_EVENT13>> : Events.EVENT13
StatesSTATE14 -[#1E90FF,bold]-> StatesSTATE15 <<external>> <<e_Events_EVENT14>> : Events.EVENT14
[*] --> STATE1 StatesSTATE15 -[#1E90FF,bold]-> StatesSTATE16 <<external>> <<e_Events_EVENT15>> : Events.EVENT15
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
state STATE16 <<choice>> StatesSTATE16 -[#FF6347,bold]-> StatesSTATE18 <<choice_type>> : [guardVarEquals("value2")] (order=1)
state STATE17 <<choice>> StatesSTATE16 -[#FF6347,bold]-> StatesSTATE19 <<choice_type>> : (order=2)
state STATE18 <<choice>> StatesSTATE17 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
state STATE19 <<choice>> StatesSTATE17 -[#FF6347,bold]-> StatesSTATE16 <<choice_type>> : (order=1)
state STATE20 <<choice>> StatesSTATE18 -[#FF6347,bold]-> StatesSTATE19 <<choice_type>> : [guardVarEquals("value3")] (order=0)
state STATE11 <<choice>> StatesSTATE18 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : (order=1)
state STATE12 <<choice>> StatesSTATE19 -[#FF6347,bold]-> StatesSTATE1 <<choice_type>> : [guardVarEquals("reset")] (order=0)
state STATE14 <<choice>> StatesSTATE19 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : (order=1)
state STATE9 <<choice>> StatesSTATE20 -[#FF6347,bold]-> StatesSTATE5 <<choice_type>> : [guardEventHeaderEquals("header2","bar")] (order=0)
state STATE8 <<choice>> StatesSTATE20 -[#FF6347,bold]-> StatesSTATE1 <<choice_type>> : (order=1)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE13 <<choice_type>> : [guardVarEquals("goTo13")] (order=0)
STATE1 -[#1E90FF,bold]-> STATE2 <<external>> <<e_Events_EVENT1>> : EVENT1 StatesSTATE11 -[#FF6347,bold]-> StatesSTATE14 <<choice_type>> : [guardVarEquals("goTo14")] (order=1)
STATE2 -[#1E90FF,bold]-> STATE3 <<external>> <<e_Events_EVENT2>> : EVENT2 StatesSTATE11 -[#FF6347,bold]-> StatesSTATE15 <<choice_type>> : (order=2)
STATE3 -[#1E90FF,bold]-> STATE4 <<external>> <<e_Events_EVENT3>> : EVENT3 StatesSTATE12 -[#FF6347,bold]-> StatesSTATE10 <<choice_type>> : [guardVarEquals("goBack10")] (order=0)
STATE4 -[#1E90FF,bold]-> STATE5 <<external>> <<e_Events_EVENT4>> : EVENT4 StatesSTATE12 -[#FF6347,bold]-> StatesSTATE11 <<choice_type>> : (order=1)
STATE5 -[#1E90FF,bold]-> STATE6 <<external>> <<e_Events_EVENT5>> : EVENT5 StatesSTATE14 -[#FF6347,bold]-> StatesSTATE12 <<choice_type>> : [guardVarEquals("loop12")] (order=0)
STATE6 -[#1E90FF,bold]-> STATE7 <<external>> <<e_Events_EVENT6>> : EVENT6 StatesSTATE14 -[#FF6347,bold]-> StatesSTATE16 <<choice_type>> : (order=1)
STATE7 -[#1E90FF,bold]-> STATE8 <<external>> <<e_Events_EVENT7>> : EVENT7 StatesSTATE9 -[#FF6347,bold]-> StatesSTATE8 <<choice_type>> : [guardVarEquals("stepBack")] (order=0)
STATE8 -[#1E90FF,bold]-> STATE9 <<external>> <<e_Events_EVENT8>> : EVENT8 StatesSTATE9 -[#FF6347,bold]-> StatesSTATE7 <<choice_type>> : [guardVarEquals("stepBackMore")] (order=1)
STATE9 -[#1E90FF,bold]-> STATE10 <<external>> <<e_Events_EVENT9>> : EVENT9 StatesSTATE9 -[#FF6347,bold]-> StatesSTATE6 <<choice_type>> : (order=2)
STATE10 -[#1E90FF,bold]-> STATE11 <<external>> <<e_Events_EVENT10>> : EVENT10 StatesSTATE8 -[#FF6347,bold]-> StatesSTATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
STATE11 -[#1E90FF,bold]-> STATE12 <<external>> <<e_Events_EVENT11>> : EVENT11 StatesSTATE8 -[#FF6347,bold]-> StatesSTATE10 <<choice_type>> : (order=1)
STATE12 -[#1E90FF,bold]-> STATE13 <<external>> <<e_Events_EVENT12>> : EVENT12
STATE13 -[#1E90FF,bold]-> STATE14 <<external>> <<e_Events_EVENT13>> : EVENT13
STATE14 -[#1E90FF,bold]-> STATE15 <<external>> <<e_Events_EVENT14>> : EVENT14
STATE15 -[#1E90FF,bold]-> STATE16 <<external>> <<e_Events_EVENT15>> : EVENT15
STATE16 -[#FF6347,bold]-> STATE17 <<choice_color_0>> : [guardVarEquals("value1")] (order=0)
STATE16 -[#FF6347,bold]-> STATE18 <<choice_color_0>> : [guardVarEquals("value2")] (order=1)
STATE16 -[#FF6347,bold]-> STATE19 <<choice_color_0>> : (order=2)
STATE17 -[#4682B4,bold]-> STATE20 <<choice_color_1>> : [guardEventHeaderEquals("header1","foo")] (order=0)
STATE17 -[#4682B4,bold]-> STATE16 <<choice_color_1>> : (order=1)
STATE18 -[#32CD32,bold]-> STATE19 <<choice_color_2>> : [guardVarEquals("value3")] (order=0)
STATE18 -[#32CD32,bold]-> STATE20 <<choice_color_2>> : (order=1)
STATE19 -[#FFD700,bold]-> STATE1 <<choice_color_3>> : [guardVarEquals("reset")] (order=0)
STATE19 -[#FFD700,bold]-> STATE20 <<choice_color_3>> : (order=1)
STATE20 -[#6A5ACD,bold]-> STATE5 <<choice_color_4>> : [guardEventHeaderEquals("header2","bar")] (order=0)
STATE20 -[#6A5ACD,bold]-> STATE1 <<choice_color_4>> : (order=1)
STATE11 -[#FF69B4,bold]-> STATE13 <<choice_color_5>> : [guardVarEquals("goTo13")] (order=0)
STATE11 -[#FF69B4,bold]-> STATE14 <<choice_color_5>> : [guardVarEquals("goTo14")] (order=1)
STATE11 -[#FF69B4,bold]-> STATE15 <<choice_color_5>> : (order=2)
STATE12 -[#FF6347,bold]-> STATE10 <<choice_color_0>> : [guardVarEquals("goBack10")] (order=0)
STATE12 -[#FF6347,bold]-> STATE11 <<choice_color_0>> : (order=1)
STATE14 -[#4682B4,bold]-> STATE12 <<choice_color_1>> : [guardVarEquals("loop12")] (order=0)
STATE14 -[#4682B4,bold]-> STATE16 <<choice_color_1>> : (order=1)
STATE9 -[#32CD32,bold]-> STATE8 <<choice_color_2>> : [guardVarEquals("stepBack")] (order=0)
STATE9 -[#32CD32,bold]-> STATE7 <<choice_color_2>> : [guardVarEquals("stepBackMore")] (order=1)
STATE9 -[#32CD32,bold]-> STATE6 <<choice_color_2>> : (order=2)
STATE8 -[#FFD700,bold]-> STATE9 <<choice_color_3>> : [guardVarEquals("forward9")] (order=0)
STATE8 -[#FFD700,bold]-> STATE10 <<choice_color_3>> : (order=1)
hide <<e_Events_EVENT1>> stereotype
hide <<e_Events_EVENT2>> stereotype
hide <<e_Events_EVENT3>> stereotype
hide <<e_Events_EVENT4>> stereotype
hide <<e_Events_EVENT5>> stereotype
hide <<e_Events_EVENT6>> stereotype
hide <<e_Events_EVENT7>> stereotype
hide <<e_Events_EVENT8>> stereotype
hide <<e_Events_EVENT9>> stereotype
hide <<e_Events_EVENT10>> stereotype
hide <<e_Events_EVENT11>> stereotype
hide <<e_Events_EVENT12>> stereotype
hide <<e_Events_EVENT13>> stereotype
hide <<e_Events_EVENT14>> stereotype
hide <<e_Events_EVENT15>> stereotype
@enduml @enduml

View File

@@ -51,7 +51,8 @@
"metadata" : { "metadata" : {
"path" : "/api/enterprise/orders/place", "path" : "/api/enterprise/orders/place",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, { }, {
"type" : "REST", "type" : "REST",
"name" : "POST /api/enterprise/orders/{id}/cancel", "name" : "POST /api/enterprise/orders/{id}/cancel",
@@ -60,7 +61,12 @@
"metadata" : { "metadata" : {
"path" : "/api/enterprise/orders/{id}/cancel", "path" : "/api/enterprise/orders/{id}/cancel",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ {
"name" : "id",
"type" : "String",
"annotations" : [ "PathVariable" ]
} ]
}, { }, {
"type" : "CUSTOM", "type" : "CUSTOM",
"name" : "INTERCEPTOR: SecurityInterceptor.preHandle", "name" : "INTERCEPTOR: SecurityInterceptor.preHandle",
@@ -68,7 +74,8 @@
"methodName" : "preHandle", "methodName" : "preHandle",
"metadata" : { "metadata" : {
"interceptorType" : "Spring MVC Interceptor" "interceptorType" : "Spring MVC Interceptor"
} },
"parameters" : [ ]
}, { }, {
"type" : "REST", "type" : "REST",
"name" : "POST /api/enterprise/payments", "name" : "POST /api/enterprise/payments",
@@ -77,7 +84,40 @@
"metadata" : { "metadata" : {
"path" : "/api/enterprise/payments", "path" : "/api/enterprise/payments",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ {
"name" : "orderId",
"type" : "String",
"annotations" : [ "RequestBody" ]
} ]
}, {
"type" : "JMS",
"name" : "JMS: shipping.queue",
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
"methodName" : "onShippingReady",
"metadata" : {
"protocol" : "JMS",
"destination" : "shipping.queue"
},
"parameters" : [ {
"name" : "orderId",
"type" : "String",
"annotations" : [ ]
} ]
}, {
"type" : "RABBIT",
"name" : "RABBIT: returns.queue",
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
"methodName" : "onReturn",
"metadata" : {
"protocol" : "RABBIT",
"destination" : "returns.queue"
},
"parameters" : [ {
"name" : "orderId",
"type" : "String",
"annotations" : [ ]
} ]
} ], } ],
"callChains" : [ { "callChains" : [ {
"entryPoint" : { "entryPoint" : {
@@ -88,7 +128,8 @@
"metadata" : { "metadata" : {
"path" : "/api/enterprise/orders/place", "path" : "/api/enterprise/orders/place",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, },
"methodChain" : [ "click.kamil.examples.enterprise.api.OrderController.placeOrder", "click.kamil.examples.enterprise.service.OrderServiceImpl.place" ], "methodChain" : [ "click.kamil.examples.enterprise.api.OrderController.placeOrder", "click.kamil.examples.enterprise.service.OrderServiceImpl.place" ],
"triggerPoint" : { "triggerPoint" : {
@@ -108,7 +149,12 @@
"metadata" : { "metadata" : {
"path" : "/api/enterprise/orders/{id}/cancel", "path" : "/api/enterprise/orders/{id}/cancel",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ {
"name" : "id",
"type" : "String",
"annotations" : [ "PathVariable" ]
} ]
}, },
"methodChain" : [ "click.kamil.examples.enterprise.api.OrderController.cancelOrder", "click.kamil.examples.enterprise.service.OrderServiceImpl.cancel" ], "methodChain" : [ "click.kamil.examples.enterprise.api.OrderController.cancelOrder", "click.kamil.examples.enterprise.service.OrderServiceImpl.cancel" ],
"triggerPoint" : { "triggerPoint" : {
@@ -127,7 +173,8 @@
"methodName" : "preHandle", "methodName" : "preHandle",
"metadata" : { "metadata" : {
"interceptorType" : "Spring MVC Interceptor" "interceptorType" : "Spring MVC Interceptor"
} },
"parameters" : [ ]
}, },
"methodChain" : [ "click.kamil.examples.enterprise.api.SecurityInterceptor.preHandle" ], "methodChain" : [ "click.kamil.examples.enterprise.api.SecurityInterceptor.preHandle" ],
"triggerPoint" : { "triggerPoint" : {
@@ -147,7 +194,12 @@
"metadata" : { "metadata" : {
"path" : "/api/enterprise/payments", "path" : "/api/enterprise/payments",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ {
"name" : "orderId",
"type" : "String",
"annotations" : [ "RequestBody" ]
} ]
}, },
"methodChain" : [ "click.kamil.examples.enterprise.api.ReactivePaymentController.pay", "click.kamil.examples.enterprise.service.ReactivePaymentService.processPayment" ], "methodChain" : [ "click.kamil.examples.enterprise.api.ReactivePaymentController.pay", "click.kamil.examples.enterprise.service.ReactivePaymentService.processPayment" ],
"triggerPoint" : { "triggerPoint" : {
@@ -158,6 +210,56 @@
"stateMachineId" : null, "stateMachineId" : null,
"lineNumber" : 18 "lineNumber" : 18
} }
}, {
"entryPoint" : {
"type" : "JMS",
"name" : "JMS: shipping.queue",
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
"methodName" : "onShippingReady",
"metadata" : {
"protocol" : "JMS",
"destination" : "shipping.queue"
},
"parameters" : [ {
"name" : "orderId",
"type" : "String",
"annotations" : [ ]
} ]
},
"methodChain" : [ "click.kamil.examples.enterprise.messaging.ShippingJmsListener.onShippingReady" ],
"triggerPoint" : {
"event" : "SHIP_ORDER",
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
"methodName" : "onShippingReady",
"sourceModule" : null,
"stateMachineId" : null,
"lineNumber" : 17
}
}, {
"entryPoint" : {
"type" : "RABBIT",
"name" : "RABBIT: returns.queue",
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
"methodName" : "onReturn",
"metadata" : {
"protocol" : "RABBIT",
"destination" : "returns.queue"
},
"parameters" : [ {
"name" : "orderId",
"type" : "String",
"annotations" : [ ]
} ]
},
"methodChain" : [ "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener.onReturn" ],
"triggerPoint" : {
"event" : "RETURN_ORDER",
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
"methodName" : "onReturn",
"sourceModule" : null,
"stateMachineId" : null,
"lineNumber" : 17
}
} ], } ],
"properties" : { } "properties" : { }
}, },

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -2,6 +2,23 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
skinparam state {
BackgroundColor white
BorderColor #94a3b8
BorderThickness 1
FontName Inter
FontSize 9
FontStyle bold
RoundCorner 20
Padding 1
}
skinparam shadowing false
skinparam ArrowFontName JetBrains Mono
skinparam ArrowFontSize 8
skinparam ArrowColor #cbd5e1
skinparam ArrowThickness 1
skinparam dpi 110
skinparam svgLinkTarget _self
state NEW state NEW
state CHECK_AVAILABILITY state CHECK_AVAILABILITY
state PENDING_PAYMENT state PENDING_PAYMENT
@@ -11,65 +28,18 @@ state SHIPPED
state DELIVERED state DELIVERED
state RETURNED state RETURNED
<style>
state {
.choice {
BackgroundColor LightYellow
}
}
arrow {
LineThickness 1
.external { LineColor #1E90FF }
.internal { LineColor #32CD32 }
.local { LineColor #FFA500 }
.junction { LineColor #FF69B4 }
.join { LineColor #8A2BE2 }
.fork { LineColor #20B2AA }
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
}
/* Example: Highlight all transitions for a specific event */
/* .e_MY_EVENT { LineColor red } */
</style>
hide <<external>> stereotype
hide <<internal>> stereotype
hide <<local>> stereotype
hide <<junction>> stereotype
hide <<join>> stereotype
hide <<fork>> stereotype
hide <<choice_type>> stereotype
hide <<choice_color_0>> stereotype
hide <<choice_color_1>> stereotype
hide <<choice_color_2>> stereotype
hide <<choice_color_3>> stereotype
hide <<choice_color_4>> stereotype
hide <<choice_color_5>> stereotype
[*] --> NEW [*] --> NEW
state CHECK_AVAILABILITY <<choice>> state CHECK_AVAILABILITY <<choice>>
NEW -[#1E90FF,bold]-> CHECK_AVAILABILITY <<external>> <<e_PLACE_ORDER>> : PLACE_ORDER NEW -[#1E90FF,bold]-> CHECK_AVAILABILITY <<external>> <<e_PLACE_ORDER>> : PLACE_ORDER
CHECK_AVAILABILITY -[#FF6347,bold]-> PENDING_PAYMENT <<choice_color_0>> : [λ] (order=0) CHECK_AVAILABILITY -[#FF6347,bold]-> PENDING_PAYMENT <<choice_type>> : [λ] (order=0)
CHECK_AVAILABILITY -[#FF6347,bold]-> CANCELLED <<choice_color_0>> : (order=1) CHECK_AVAILABILITY -[#FF6347,bold]-> CANCELLED <<choice_type>> : (order=1)
PENDING_PAYMENT -[#1E90FF,bold]-> PAID <<external>> <<e_PAY_ORDER>> : PAY_ORDER PENDING_PAYMENT -[#1E90FF,bold]-> PAID <<external>> <<e_PAY_ORDER>> : PAY_ORDER
PAID -[#1E90FF,bold]-> SHIPPED <<external>> <<e_SHIP_ORDER>> : SHIP_ORDER PAID -[#1E90FF,bold]-> SHIPPED <<external>> <<e_SHIP_ORDER>> : SHIP_ORDER
SHIPPED -[#1E90FF,bold]-> DELIVERED <<external>> <<e_FINALIZE>> : FINALIZE SHIPPED -[#1E90FF,bold]-> DELIVERED <<external>> <<e_FINALIZE>> : FINALIZE
PAID -[#1E90FF,bold]-> CANCELLED <<external>> <<e_CANCEL_ORDER>> : CANCEL_ORDER PAID -[#1E90FF,bold]-> CANCELLED <<external>> <<e_CANCEL_ORDER>> : CANCEL_ORDER
DELIVERED -[#1E90FF,bold]-> RETURNED <<external>> <<e_RETURN_ORDER>> : RETURN_ORDER DELIVERED -[#1E90FF,bold]-> RETURNED <<external>> <<e_RETURN_ORDER>> : RETURN_ORDER
hide <<e_PLACE_ORDER>> stereotype
hide <<e_PAY_ORDER>> stereotype
hide <<e_SHIP_ORDER>> stereotype
hide <<e_FINALIZE>> stereotype
hide <<e_CANCEL_ORDER>> stereotype
hide <<e_RETURN_ORDER>> stereotype
CANCELLED --> [*] CANCELLED --> [*]
DELIVERED --> [*] DELIVERED --> [*]

View File

@@ -58,7 +58,8 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/submit", "path" : "/api/orders/submit",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, { }, {
"type" : "REST", "type" : "REST",
"name" : "POST /api/orders/cancel", "name" : "POST /api/orders/cancel",
@@ -67,7 +68,8 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/cancel", "path" : "/api/orders/cancel",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, { }, {
"type" : "REST", "type" : "REST",
"name" : "POST /api/orders/finish", "name" : "POST /api/orders/finish",
@@ -76,7 +78,8 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/finish", "path" : "/api/orders/finish",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, { }, {
"type" : "REST", "type" : "REST",
"name" : "POST /api/orders/resume", "name" : "POST /api/orders/resume",
@@ -85,7 +88,12 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/resume", "path" : "/api/orders/resume",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ {
"name" : "orderId",
"type" : "String",
"annotations" : [ ]
} ]
}, { }, {
"type" : "REST", "type" : "REST",
"name" : "POST /api/orders/reactive", "name" : "POST /api/orders/reactive",
@@ -94,7 +102,12 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/reactive", "path" : "/api/orders/reactive",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ {
"name" : "orderId",
"type" : "String",
"annotations" : [ ]
} ]
}, { }, {
"type" : "CUSTOM", "type" : "CUSTOM",
"name" : "INTERCEPTOR: AuditInterceptor.preHandle", "name" : "INTERCEPTOR: AuditInterceptor.preHandle",
@@ -102,7 +115,8 @@
"methodName" : "preHandle", "methodName" : "preHandle",
"metadata" : { "metadata" : {
"interceptorType" : "Spring MVC Interceptor" "interceptorType" : "Spring MVC Interceptor"
} },
"parameters" : [ ]
} ], } ],
"callChains" : [ { "callChains" : [ {
"entryPoint" : { "entryPoint" : {
@@ -113,7 +127,8 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/submit", "path" : "/api/orders/submit",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.submitOrder", "click.kamil.examples.statemachine.extended.service.OrderService.processSubmit" ], "methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.submitOrder", "click.kamil.examples.statemachine.extended.service.OrderService.processSubmit" ],
"triggerPoint" : { "triggerPoint" : {
@@ -133,7 +148,8 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/submit", "path" : "/api/orders/submit",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.submitOrder", "click.kamil.examples.statemachine.extended.service.OrderService.processSubmit" ], "methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.submitOrder", "click.kamil.examples.statemachine.extended.service.OrderService.processSubmit" ],
"triggerPoint" : { "triggerPoint" : {
@@ -153,7 +169,8 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/cancel", "path" : "/api/orders/cancel",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.cancelOrder", "click.kamil.examples.statemachine.extended.service.OrderService.processCancel" ], "methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.cancelOrder", "click.kamil.examples.statemachine.extended.service.OrderService.processCancel" ],
"triggerPoint" : { "triggerPoint" : {
@@ -173,7 +190,8 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/finish", "path" : "/api/orders/finish",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.finishOrder" ], "methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.finishOrder" ],
"triggerPoint" : { "triggerPoint" : {
@@ -193,7 +211,12 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/resume", "path" : "/api/orders/resume",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ {
"name" : "orderId",
"type" : "String",
"annotations" : [ ]
} ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.resumeOrder", "click.kamil.examples.statemachine.extended.service.OrderService.resumeOrder" ], "methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.resumeOrder", "click.kamil.examples.statemachine.extended.service.OrderService.resumeOrder" ],
"triggerPoint" : { "triggerPoint" : {
@@ -213,7 +236,12 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/reactive", "path" : "/api/orders/reactive",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ {
"name" : "orderId",
"type" : "String",
"annotations" : [ ]
} ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.reactiveOrder", "click.kamil.examples.statemachine.extended.service.ReactiveOrderService.processReactive" ], "methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.reactiveOrder", "click.kamil.examples.statemachine.extended.service.ReactiveOrderService.processReactive" ],
"triggerPoint" : { "triggerPoint" : {
@@ -232,7 +260,8 @@
"methodName" : "preHandle", "methodName" : "preHandle",
"metadata" : { "metadata" : {
"interceptorType" : "Spring MVC Interceptor" "interceptorType" : "Spring MVC Interceptor"
} },
"parameters" : [ ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.extended.web.AuditInterceptor.preHandle" ], "methodChain" : [ "click.kamil.examples.statemachine.extended.web.AuditInterceptor.preHandle" ],
"triggerPoint" : { "triggerPoint" : {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -2,52 +2,28 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
skinparam state {
BackgroundColor white
BorderColor #94a3b8
BorderThickness 1
FontName Inter
FontSize 9
FontStyle bold
RoundCorner 20
Padding 1
}
skinparam shadowing false
skinparam ArrowFontName JetBrains Mono
skinparam ArrowFontSize 8
skinparam ArrowColor #cbd5e1
skinparam ArrowThickness 1
skinparam dpi 110
skinparam svgLinkTarget _self
state START state START
state PROCESSING state PROCESSING
state COMPLETED state COMPLETED
state CANCELLED state CANCELLED
<style>
state {
.choice {
BackgroundColor LightYellow
}
}
arrow {
LineThickness 1
.external { LineColor #1E90FF }
.internal { LineColor #32CD32 }
.local { LineColor #FFA500 }
.junction { LineColor #FF69B4 }
.join { LineColor #8A2BE2 }
.fork { LineColor #20B2AA }
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
}
/* Example: Highlight all transitions for a specific event */
/* .e_MY_EVENT { LineColor red } */
</style>
hide <<external>> stereotype
hide <<internal>> stereotype
hide <<local>> stereotype
hide <<junction>> stereotype
hide <<join>> stereotype
hide <<fork>> stereotype
hide <<choice_type>> stereotype
hide <<choice_color_0>> stereotype
hide <<choice_color_1>> stereotype
hide <<choice_color_2>> stereotype
hide <<choice_color_3>> stereotype
hide <<choice_color_4>> stereotype
hide <<choice_color_5>> stereotype
[*] --> INIT_STATE [*] --> INIT_STATE
@@ -57,12 +33,6 @@ PROCESSING -[#1E90FF,bold]-> CANCELLED <<external>> <<e_CANCEL_EVENT>> : CANCEL_
START -[#1E90FF,bold]-> PROCESSING <<external>> <<e_REACTIVE_EVENT>> : REACTIVE_EVENT START -[#1E90FF,bold]-> PROCESSING <<external>> <<e_REACTIVE_EVENT>> : REACTIVE_EVENT
START -[#1E90FF,bold]-> START <<external>> <<e_AUDIT_EVENT>> : AUDIT_EVENT START -[#1E90FF,bold]-> START <<external>> <<e_AUDIT_EVENT>> : AUDIT_EVENT
START -[#1E90FF,bold]-> PROCESSING <<external>> <<e_EXTERNAL_TRIGGER>> : EXTERNAL_TRIGGER START -[#1E90FF,bold]-> PROCESSING <<external>> <<e_EXTERNAL_TRIGGER>> : EXTERNAL_TRIGGER
hide <<e_SUBMIT_EVENT>> stereotype
hide <<e_FINISH>> stereotype
hide <<e_CANCEL_EVENT>> stereotype
hide <<e_REACTIVE_EVENT>> stereotype
hide <<e_AUDIT_EVENT>> stereotype
hide <<e_EXTERNAL_TRIGGER>> stereotype
CANCELLED --> [*] CANCELLED --> [*]
COMPLETED --> [*] COMPLETED --> [*]

View File

@@ -58,7 +58,8 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/submit", "path" : "/api/orders/submit",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, { }, {
"type" : "REST", "type" : "REST",
"name" : "POST /api/orders/cancel", "name" : "POST /api/orders/cancel",
@@ -67,7 +68,8 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/cancel", "path" : "/api/orders/cancel",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, { }, {
"type" : "REST", "type" : "REST",
"name" : "POST /api/orders/finish", "name" : "POST /api/orders/finish",
@@ -76,7 +78,8 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/finish", "path" : "/api/orders/finish",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, { }, {
"type" : "REST", "type" : "REST",
"name" : "POST /api/orders/resume", "name" : "POST /api/orders/resume",
@@ -85,7 +88,12 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/resume", "path" : "/api/orders/resume",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ {
"name" : "orderId",
"type" : "String",
"annotations" : [ ]
} ]
}, { }, {
"type" : "REST", "type" : "REST",
"name" : "POST /api/orders/reactive", "name" : "POST /api/orders/reactive",
@@ -94,7 +102,12 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/reactive", "path" : "/api/orders/reactive",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ {
"name" : "orderId",
"type" : "String",
"annotations" : [ ]
} ]
}, { }, {
"type" : "CUSTOM", "type" : "CUSTOM",
"name" : "INTERCEPTOR: AuditInterceptor.preHandle", "name" : "INTERCEPTOR: AuditInterceptor.preHandle",
@@ -102,7 +115,8 @@
"methodName" : "preHandle", "methodName" : "preHandle",
"metadata" : { "metadata" : {
"interceptorType" : "Spring MVC Interceptor" "interceptorType" : "Spring MVC Interceptor"
} },
"parameters" : [ ]
} ], } ],
"callChains" : [ { "callChains" : [ {
"entryPoint" : { "entryPoint" : {
@@ -113,7 +127,8 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/submit", "path" : "/api/orders/submit",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.submitOrder", "click.kamil.examples.statemachine.extended.service.OrderService.processSubmit" ], "methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.submitOrder", "click.kamil.examples.statemachine.extended.service.OrderService.processSubmit" ],
"triggerPoint" : { "triggerPoint" : {
@@ -133,7 +148,8 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/submit", "path" : "/api/orders/submit",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.submitOrder", "click.kamil.examples.statemachine.extended.service.OrderService.processSubmit" ], "methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.submitOrder", "click.kamil.examples.statemachine.extended.service.OrderService.processSubmit" ],
"triggerPoint" : { "triggerPoint" : {
@@ -153,7 +169,8 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/cancel", "path" : "/api/orders/cancel",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.cancelOrder", "click.kamil.examples.statemachine.extended.service.OrderService.processCancel" ], "methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.cancelOrder", "click.kamil.examples.statemachine.extended.service.OrderService.processCancel" ],
"triggerPoint" : { "triggerPoint" : {
@@ -173,7 +190,8 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/finish", "path" : "/api/orders/finish",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.finishOrder" ], "methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.finishOrder" ],
"triggerPoint" : { "triggerPoint" : {
@@ -193,7 +211,12 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/resume", "path" : "/api/orders/resume",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ {
"name" : "orderId",
"type" : "String",
"annotations" : [ ]
} ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.resumeOrder", "click.kamil.examples.statemachine.extended.service.OrderService.resumeOrder" ], "methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.resumeOrder", "click.kamil.examples.statemachine.extended.service.OrderService.resumeOrder" ],
"triggerPoint" : { "triggerPoint" : {
@@ -213,7 +236,12 @@
"metadata" : { "metadata" : {
"path" : "/api/orders/reactive", "path" : "/api/orders/reactive",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ {
"name" : "orderId",
"type" : "String",
"annotations" : [ ]
} ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.reactiveOrder", "click.kamil.examples.statemachine.extended.service.ReactiveOrderService.processReactive" ], "methodChain" : [ "click.kamil.examples.statemachine.extended.web.OrderController.reactiveOrder", "click.kamil.examples.statemachine.extended.service.ReactiveOrderService.processReactive" ],
"triggerPoint" : { "triggerPoint" : {
@@ -232,7 +260,8 @@
"methodName" : "preHandle", "methodName" : "preHandle",
"metadata" : { "metadata" : {
"interceptorType" : "Spring MVC Interceptor" "interceptorType" : "Spring MVC Interceptor"
} },
"parameters" : [ ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.extended.web.AuditInterceptor.preHandle" ], "methodChain" : [ "click.kamil.examples.statemachine.extended.web.AuditInterceptor.preHandle" ],
"triggerPoint" : { "triggerPoint" : {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -2,52 +2,28 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
skinparam state {
BackgroundColor white
BorderColor #94a3b8
BorderThickness 1
FontName Inter
FontSize 9
FontStyle bold
RoundCorner 20
Padding 1
}
skinparam shadowing false
skinparam ArrowFontName JetBrains Mono
skinparam ArrowFontSize 8
skinparam ArrowColor #cbd5e1
skinparam ArrowThickness 1
skinparam dpi 110
skinparam svgLinkTarget _self
state START state START
state PROCESSING state PROCESSING
state COMPLETED state COMPLETED
state CANCELLED state CANCELLED
<style>
state {
.choice {
BackgroundColor LightYellow
}
}
arrow {
LineThickness 1
.external { LineColor #1E90FF }
.internal { LineColor #32CD32 }
.local { LineColor #FFA500 }
.junction { LineColor #FF69B4 }
.join { LineColor #8A2BE2 }
.fork { LineColor #20B2AA }
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
}
/* Example: Highlight all transitions for a specific event */
/* .e_MY_EVENT { LineColor red } */
</style>
hide <<external>> stereotype
hide <<internal>> stereotype
hide <<local>> stereotype
hide <<junction>> stereotype
hide <<join>> stereotype
hide <<fork>> stereotype
hide <<choice_type>> stereotype
hide <<choice_color_0>> stereotype
hide <<choice_color_1>> stereotype
hide <<choice_color_2>> stereotype
hide <<choice_color_3>> stereotype
hide <<choice_color_4>> stereotype
hide <<choice_color_5>> stereotype
[*] --> PROD_INITIAL [*] --> PROD_INITIAL
@@ -57,12 +33,6 @@ PROCESSING -[#1E90FF,bold]-> CANCELLED <<external>> <<e_CANCEL_EVENT>> : CANCEL_
START -[#1E90FF,bold]-> PROCESSING <<external>> <<e_REACTIVE_EVENT>> : REACTIVE_EVENT START -[#1E90FF,bold]-> PROCESSING <<external>> <<e_REACTIVE_EVENT>> : REACTIVE_EVENT
START -[#1E90FF,bold]-> START <<external>> <<e_AUDIT_EVENT>> : AUDIT_EVENT START -[#1E90FF,bold]-> START <<external>> <<e_AUDIT_EVENT>> : AUDIT_EVENT
START -[#1E90FF,bold]-> PROCESSING <<external>> <<e_EXTERNAL_TRIGGER>> : EXTERNAL_TRIGGER START -[#1E90FF,bold]-> PROCESSING <<external>> <<e_EXTERNAL_TRIGGER>> : EXTERNAL_TRIGGER
hide <<e_SUBMIT_EVENT>> stereotype
hide <<e_FINISH>> stereotype
hide <<e_CANCEL_EVENT>> stereotype
hide <<e_REACTIVE_EVENT>> stereotype
hide <<e_AUDIT_EVENT>> stereotype
hide <<e_EXTERNAL_TRIGGER>> stereotype
CANCELLED --> [*] CANCELLED --> [*]
COMPLETED --> [*] COMPLETED --> [*]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 223 KiB

View File

@@ -2,162 +2,119 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
state STATE1 skinparam state {
state STATE2 BackgroundColor white
state STATE3 BorderColor #94a3b8
state STATE4 BorderThickness 1
state STATE5 FontName Inter
state STATE6 FontSize 9
state STATE7 FontStyle bold
state STATE8 RoundCorner 20
state STATE9 Padding 1
state STATE10 }
state STATE11 skinparam shadowing false
state STATE12 skinparam ArrowFontName JetBrains Mono
state STATE13 skinparam ArrowFontSize 8
state STATE14 skinparam ArrowColor #cbd5e1
state STATE15 skinparam ArrowThickness 1
state STATE16 skinparam dpi 110
state CANCEL skinparam svgLinkTarget _self
state STATEY state StatesSTATE1
state STATEX state StatesSTATE2
state STATEZ state StatesSTATE3
state STATE17 state StatesSTATE4
state STATE18 state StatesSTATE5
state STATE19 state StatesSTATE6
state STATE20 state StatesSTATE7
state STATE_EXTRA_1 state StatesSTATE8
state STATE_EXTRA_3 state StatesSTATE9
state STATE_EXTRA_2 state StatesSTATE10
state StatesSTATE11
state StatesSTATE12
state StatesSTATE13
state StatesSTATE14
state StatesSTATE15
state StatesSTATE16
state StatesCANCEL
state StatesSTATEY
state StatesSTATEX
state StatesSTATEZ
state StatesSTATE17
state StatesSTATE18
state StatesSTATE19
state StatesSTATE20
state StatesSTATE_EXTRA_1
state StatesSTATE_EXTRA_3
state StatesSTATE_EXTRA_2
<style> [*] --> StatesSTATE1
state {
.choice {
BackgroundColor LightYellow
}
}
arrow {
LineThickness 1
.external { LineColor #1E90FF }
.internal { LineColor #32CD32 }
.local { LineColor #FFA500 }
.junction { LineColor #FF69B4 }
.join { LineColor #8A2BE2 }
.fork { LineColor #20B2AA }
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
} state StatesSTATEY <<choice>>
/* Example: Highlight all transitions for a specific event */ state StatesSTATE16 <<choice>>
/* .e_MY_EVENT { LineColor red } */ state StatesSTATE17 <<choice>>
</style> state StatesSTATE18 <<choice>>
state StatesSTATE19 <<choice>>
state StatesSTATE20 <<choice>>
state StatesSTATE11 <<choice>>
state StatesSTATE12 <<choice>>
state StatesSTATE14 <<choice>>
state StatesSTATE9 <<choice>>
state StatesSTATE8 <<choice>>
state StatesSTATE2 <<choice>>
hide <<external>> stereotype StatesSTATE1 -[#1E90FF,bold]-> StatesSTATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
hide <<internal>> stereotype StatesSTATE2 -[#1E90FF,bold]-> StatesSTATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
hide <<local>> stereotype StatesSTATE3 -[#1E90FF,bold]-> StatesSTATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
hide <<junction>> stereotype StatesSTATE4 -[#1E90FF,bold]-> StatesSTATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
hide <<join>> stereotype StatesSTATE5 -[#1E90FF,bold]-> StatesSTATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
hide <<fork>> stereotype StatesSTATE6 -[#1E90FF,bold]-> StatesSTATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
hide <<choice_type>> stereotype StatesSTATE7 -[#1E90FF,bold]-> StatesSTATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
hide <<choice_color_0>> stereotype StatesSTATE8 -[#1E90FF,bold]-> StatesSTATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
hide <<choice_color_1>> stereotype StatesSTATE9 -[#1E90FF,bold]-> StatesSTATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
hide <<choice_color_2>> stereotype StatesSTATE10 -[#1E90FF,bold]-> StatesSTATE11 <<external>> <<e_Events_EVENT10>> : Events.EVENT10
hide <<choice_color_3>> stereotype StatesSTATE11 -[#1E90FF,bold]-> StatesSTATE12 <<external>> <<e_Events_EVENT11>> : Events.EVENT11
hide <<choice_color_4>> stereotype StatesSTATE12 -[#1E90FF,bold]-> StatesSTATE13 <<external>> <<e_Events_EVENT12>> : Events.EVENT12
hide <<choice_color_5>> stereotype StatesSTATE13 -[#1E90FF,bold]-> StatesSTATE14 <<external>> <<e_Events_EVENT13>> : Events.EVENT13
StatesSTATE14 -[#1E90FF,bold]-> StatesSTATE15 <<external>> <<e_Events_EVENT14>> : Events.EVENT14
StatesSTATE15 -[#1E90FF,bold]-> StatesSTATE16 <<external>> <<e_Events_EVENT15>> : Events.EVENT15
StatesSTATE1 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE2 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE3 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE4 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE5 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE4 -[#1E90FF,bold]-> StatesSTATEY <<external>> <<e_Events_EVENTY>> : Events.EVENTY
StatesSTATEY -[#FF6347,bold]-> StatesSTATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
StatesSTATEY -[#FF6347,bold]-> StatesSTATEZ <<choice_type>> : (order=1)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE18 <<choice_type>> : [guardVarEquals("value2")] (order=1)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE19 <<choice_type>> : (order=2)
StatesSTATE17 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
StatesSTATE17 -[#FF6347,bold]-> StatesSTATE16 <<choice_type>> : (order=1)
StatesSTATE18 -[#FF6347,bold]-> StatesSTATE19 <<choice_type>> : [guardVarEquals("value3")] (order=0)
StatesSTATE18 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : (order=1)
StatesSTATE19 -[#FF6347,bold]-> StatesSTATE1 <<choice_type>> : [guardVarEquals("reset")] (order=0)
StatesSTATE19 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : (order=1)
StatesSTATE20 -[#FF6347,bold]-> StatesSTATE5 <<choice_type>> : [guardEventHeaderEquals("header2","bar")] (order=0)
StatesSTATE20 -[#FF6347,bold]-> StatesSTATE1 <<choice_type>> : (order=1)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE13 <<choice_type>> : [guardVarEquals("goTo13")] (order=0)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE14 <<choice_type>> : [guardVarEquals("goTo14")] (order=1)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE15 <<choice_type>> : (order=2)
StatesSTATE12 -[#FF6347,bold]-> StatesSTATE10 <<choice_type>> : [guardVarEquals("goBack10")] (order=0)
StatesSTATE12 -[#FF6347,bold]-> StatesSTATE11 <<choice_type>> : (order=1)
StatesSTATE14 -[#FF6347,bold]-> StatesSTATE12 <<choice_type>> : [guardVarEquals("loop12")] (order=0)
StatesSTATE14 -[#FF6347,bold]-> StatesSTATE16 <<choice_type>> : (order=1)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE8 <<choice_type>> : [guardVarEquals("stepBack")] (order=0)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE7 <<choice_type>> : [guardVarEquals("stepBackMore")] (order=1)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE6 <<choice_type>> : (order=2)
StatesSTATE8 -[#FF6347,bold]-> StatesSTATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
StatesSTATE8 -[#FF6347,bold]-> StatesSTATE10 <<choice_type>> : (order=1)
StatesSTATE2 -[#1E90FF,bold]-> StatesSTATE_EXTRA_1 <<external>> <<e_Events_EVENTX>> : Events.EVENTX
StatesSTATE2 -[#FF6347,bold]-> StatesSTATE1 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
StatesSTATE2 -[#FF6347,bold]-> StatesSTATE_EXTRA_1 <<choice_type>> : (order=1)
StatesSTATE_EXTRA_1 -[#1E90FF,bold]-> StatesSTATE_EXTRA_3 <<external>> <<e_Events_EVENTY>> : Events.EVENTY
StatesSTATE_EXTRA_1 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : Events.EVENT_CANCEL_2
StatesSTATE_EXTRA_2 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : Events.EVENT_CANCEL_2
[*] --> STATE1 StatesSTATEZ --> [*]
state STATEY <<choice>>
state STATE16 <<choice>>
state STATE17 <<choice>>
state STATE18 <<choice>>
state STATE19 <<choice>>
state STATE20 <<choice>>
state STATE11 <<choice>>
state STATE12 <<choice>>
state STATE14 <<choice>>
state STATE9 <<choice>>
state STATE8 <<choice>>
state STATE2 <<choice>>
STATE1 -[#1E90FF,bold]-> STATE2 <<external>> <<e_Events_EVENT1>> : EVENT1
STATE2 -[#1E90FF,bold]-> STATE3 <<external>> <<e_Events_EVENT2>> : EVENT2
STATE3 -[#1E90FF,bold]-> STATE4 <<external>> <<e_Events_EVENT3>> : EVENT3
STATE4 -[#1E90FF,bold]-> STATE5 <<external>> <<e_Events_EVENT4>> : EVENT4
STATE5 -[#1E90FF,bold]-> STATE6 <<external>> <<e_Events_EVENT5>> : EVENT5
STATE6 -[#1E90FF,bold]-> STATE7 <<external>> <<e_Events_EVENT6>> : EVENT6
STATE7 -[#1E90FF,bold]-> STATE8 <<external>> <<e_Events_EVENT7>> : EVENT7
STATE8 -[#1E90FF,bold]-> STATE9 <<external>> <<e_Events_EVENT8>> : EVENT8
STATE9 -[#1E90FF,bold]-> STATE10 <<external>> <<e_Events_EVENT9>> : EVENT9
STATE10 -[#1E90FF,bold]-> STATE11 <<external>> <<e_Events_EVENT10>> : EVENT10
STATE11 -[#1E90FF,bold]-> STATE12 <<external>> <<e_Events_EVENT11>> : EVENT11
STATE12 -[#1E90FF,bold]-> STATE13 <<external>> <<e_Events_EVENT12>> : EVENT12
STATE13 -[#1E90FF,bold]-> STATE14 <<external>> <<e_Events_EVENT13>> : EVENT13
STATE14 -[#1E90FF,bold]-> STATE15 <<external>> <<e_Events_EVENT14>> : EVENT14
STATE15 -[#1E90FF,bold]-> STATE16 <<external>> <<e_Events_EVENT15>> : EVENT15
STATE1 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE2 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE3 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE4 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE5 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE4 -[#1E90FF,bold]-> STATEY <<external>> <<e_Events_EVENTY>> : EVENTY
STATEY -[#FF6347,bold]-> STATEX <<choice_color_0>> : [guardVarEquals("value1")] (order=0)
STATEY -[#FF6347,bold]-> STATEZ <<choice_color_0>> : (order=1)
STATE16 -[#4682B4,bold]-> STATE17 <<choice_color_1>> : [guardVarEquals("value1")] (order=0)
STATE16 -[#4682B4,bold]-> STATE18 <<choice_color_1>> : [guardVarEquals("value2")] (order=1)
STATE16 -[#4682B4,bold]-> STATE19 <<choice_color_1>> : (order=2)
STATE17 -[#32CD32,bold]-> STATE20 <<choice_color_2>> : [guardEventHeaderEquals("header1","foo")] (order=0)
STATE17 -[#32CD32,bold]-> STATE16 <<choice_color_2>> : (order=1)
STATE18 -[#FFD700,bold]-> STATE19 <<choice_color_3>> : [guardVarEquals("value3")] (order=0)
STATE18 -[#FFD700,bold]-> STATE20 <<choice_color_3>> : (order=1)
STATE19 -[#6A5ACD,bold]-> STATE1 <<choice_color_4>> : [guardVarEquals("reset")] (order=0)
STATE19 -[#6A5ACD,bold]-> STATE20 <<choice_color_4>> : (order=1)
STATE20 -[#FF69B4,bold]-> STATE5 <<choice_color_5>> : [guardEventHeaderEquals("header2","bar")] (order=0)
STATE20 -[#FF69B4,bold]-> STATE1 <<choice_color_5>> : (order=1)
STATE11 -[#FF6347,bold]-> STATE13 <<choice_color_0>> : [guardVarEquals("goTo13")] (order=0)
STATE11 -[#FF6347,bold]-> STATE14 <<choice_color_0>> : [guardVarEquals("goTo14")] (order=1)
STATE11 -[#FF6347,bold]-> STATE15 <<choice_color_0>> : (order=2)
STATE12 -[#4682B4,bold]-> STATE10 <<choice_color_1>> : [guardVarEquals("goBack10")] (order=0)
STATE12 -[#4682B4,bold]-> STATE11 <<choice_color_1>> : (order=1)
STATE14 -[#32CD32,bold]-> STATE12 <<choice_color_2>> : [guardVarEquals("loop12")] (order=0)
STATE14 -[#32CD32,bold]-> STATE16 <<choice_color_2>> : (order=1)
STATE9 -[#FFD700,bold]-> STATE8 <<choice_color_3>> : [guardVarEquals("stepBack")] (order=0)
STATE9 -[#FFD700,bold]-> STATE7 <<choice_color_3>> : [guardVarEquals("stepBackMore")] (order=1)
STATE9 -[#FFD700,bold]-> STATE6 <<choice_color_3>> : (order=2)
STATE8 -[#6A5ACD,bold]-> STATE9 <<choice_color_4>> : [guardVarEquals("forward9")] (order=0)
STATE8 -[#6A5ACD,bold]-> STATE10 <<choice_color_4>> : (order=1)
STATE2 -[#1E90FF,bold]-> STATE_EXTRA_1 <<external>> <<e_Events_EVENTX>> : EVENTX
STATE2 -[#FF69B4,bold]-> STATE1 <<choice_color_5>> : [guardEventHeaderEquals("header1","foo")] (order=0)
STATE2 -[#FF69B4,bold]-> STATE_EXTRA_1 <<choice_color_5>> : (order=1)
STATE_EXTRA_1 -[#1E90FF,bold]-> STATE_EXTRA_3 <<external>> <<e_Events_EVENTY>> : EVENTY
STATE_EXTRA_1 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : EVENT_CANCEL_2
STATE_EXTRA_2 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : EVENT_CANCEL_2
hide <<e_Events_EVENT1>> stereotype
hide <<e_Events_EVENT2>> stereotype
hide <<e_Events_EVENT3>> stereotype
hide <<e_Events_EVENT4>> stereotype
hide <<e_Events_EVENT5>> stereotype
hide <<e_Events_EVENT6>> stereotype
hide <<e_Events_EVENT7>> stereotype
hide <<e_Events_EVENT8>> stereotype
hide <<e_Events_EVENT9>> stereotype
hide <<e_Events_EVENT10>> stereotype
hide <<e_Events_EVENT11>> stereotype
hide <<e_Events_EVENT12>> stereotype
hide <<e_Events_EVENT13>> stereotype
hide <<e_Events_EVENT14>> stereotype
hide <<e_Events_EVENT15>> stereotype
hide <<e_Events_EVENT_CANCEL>> stereotype
hide <<e_Events_EVENTY>> stereotype
hide <<e_Events_EVENTX>> stereotype
hide <<e_Events_EVENT_CANCEL_2>> stereotype
STATEZ --> [*]
@enduml @enduml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 KiB

After

Width:  |  Height:  |  Size: 275 KiB

View File

@@ -2,165 +2,121 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
state STATE1 skinparam state {
state STATE2 BackgroundColor white
state STATE3 BorderColor #94a3b8
state STATE4 BorderThickness 1
state STATE5 FontName Inter
state STATE6 FontSize 9
state STATE7 FontStyle bold
state STATE8 RoundCorner 20
state STATE9 Padding 1
state STATE10 }
state STATE11 skinparam shadowing false
state STATE12 skinparam ArrowFontName JetBrains Mono
state STATE13 skinparam ArrowFontSize 8
state STATE14 skinparam ArrowColor #cbd5e1
state STATE15 skinparam ArrowThickness 1
state STATE16 skinparam dpi 110
state CANCEL skinparam svgLinkTarget _self
state STATEY state StatesSTATE1
state STATEX state StatesSTATE2
state STATEZ state StatesSTATE3
state STATE17 state StatesSTATE4
state STATE18 state StatesSTATE5
state STATE19 state StatesSTATE6
state STATE20 state StatesSTATE7
state STATE_EXTRA_1_1 state StatesSTATE8
state STATE_EXTRA_1_2 state StatesSTATE9
state STATE_EXTRA_1_3 state StatesSTATE10
state STATE_EXTRA_1 state StatesSTATE11
state StatesSTATE12
state StatesSTATE13
state StatesSTATE14
state StatesSTATE15
state StatesSTATE16
state StatesCANCEL
state StatesSTATEY
state StatesSTATEX
state StatesSTATEZ
state StatesSTATE17
state StatesSTATE18
state StatesSTATE19
state StatesSTATE20
state StatesSTATE_EXTRA_1_1
state StatesSTATE_EXTRA_1_2
state StatesSTATE_EXTRA_1_3
state StatesSTATE_EXTRA_1
<style> [*] --> StatesSTATE1
state {
.choice {
BackgroundColor LightYellow
}
}
arrow {
LineThickness 1
.external { LineColor #1E90FF }
.internal { LineColor #32CD32 }
.local { LineColor #FFA500 }
.junction { LineColor #FF69B4 }
.join { LineColor #8A2BE2 }
.fork { LineColor #20B2AA }
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
} state StatesSTATEY <<choice>>
/* Example: Highlight all transitions for a specific event */ state StatesSTATE16 <<choice>>
/* .e_MY_EVENT { LineColor red } */ state StatesSTATE17 <<choice>>
</style> state StatesSTATE18 <<choice>>
state StatesSTATE19 <<choice>>
state StatesSTATE20 <<choice>>
state StatesSTATE11 <<choice>>
state StatesSTATE12 <<choice>>
state StatesSTATE14 <<choice>>
state StatesSTATE9 <<choice>>
state StatesSTATE8 <<choice>>
state StatesSTATE_EXTRA_1_2 <<choice>>
hide <<external>> stereotype StatesSTATE1 -[#1E90FF,bold]-> StatesSTATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
hide <<internal>> stereotype StatesSTATE2 -[#1E90FF,bold]-> StatesSTATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
hide <<local>> stereotype StatesSTATE3 -[#1E90FF,bold]-> StatesSTATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
hide <<junction>> stereotype StatesSTATE4 -[#1E90FF,bold]-> StatesSTATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
hide <<join>> stereotype StatesSTATE5 -[#1E90FF,bold]-> StatesSTATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
hide <<fork>> stereotype StatesSTATE6 -[#1E90FF,bold]-> StatesSTATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
hide <<choice_type>> stereotype StatesSTATE7 -[#1E90FF,bold]-> StatesSTATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
hide <<choice_color_0>> stereotype StatesSTATE8 -[#1E90FF,bold]-> StatesSTATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
hide <<choice_color_1>> stereotype StatesSTATE9 -[#1E90FF,bold]-> StatesSTATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
hide <<choice_color_2>> stereotype StatesSTATE10 -[#1E90FF,bold]-> StatesSTATE11 <<external>> <<e_Events_EVENT10>> : Events.EVENT10
hide <<choice_color_3>> stereotype StatesSTATE11 -[#1E90FF,bold]-> StatesSTATE12 <<external>> <<e_Events_EVENT11>> : Events.EVENT11
hide <<choice_color_4>> stereotype StatesSTATE12 -[#1E90FF,bold]-> StatesSTATE13 <<external>> <<e_Events_EVENT12>> : Events.EVENT12
hide <<choice_color_5>> stereotype StatesSTATE13 -[#1E90FF,bold]-> StatesSTATE14 <<external>> <<e_Events_EVENT13>> : Events.EVENT13
StatesSTATE14 -[#1E90FF,bold]-> StatesSTATE15 <<external>> <<e_Events_EVENT14>> : Events.EVENT14
StatesSTATE15 -[#1E90FF,bold]-> StatesSTATE16 <<external>> <<e_Events_EVENT15>> : Events.EVENT15
StatesSTATE1 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE2 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE3 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE4 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE5 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE4 -[#1E90FF,bold]-> StatesSTATEY <<external>> <<e_Events_EVENTY>> : Events.EVENTY
StatesSTATEY -[#FF6347,bold]-> StatesSTATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
StatesSTATEY -[#FF6347,bold]-> StatesSTATEZ <<choice_type>> : (order=1)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE18 <<choice_type>> : [guardVarEquals("value2")] (order=1)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE19 <<choice_type>> : (order=2)
StatesSTATE17 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
StatesSTATE17 -[#FF6347,bold]-> StatesSTATE16 <<choice_type>> : (order=1)
StatesSTATE18 -[#FF6347,bold]-> StatesSTATE19 <<choice_type>> : [guardVarEquals("value3")] (order=0)
StatesSTATE18 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : (order=1)
StatesSTATE19 -[#FF6347,bold]-> StatesSTATE1 <<choice_type>> : [guardVarEquals("reset")] (order=0)
StatesSTATE19 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : (order=1)
StatesSTATE20 -[#FF6347,bold]-> StatesSTATE5 <<choice_type>> : [guardEventHeaderEquals("header2","bar")] (order=0)
StatesSTATE20 -[#FF6347,bold]-> StatesSTATE1 <<choice_type>> : (order=1)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE13 <<choice_type>> : [guardVarEquals("goTo13")] (order=0)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE14 <<choice_type>> : [guardVarEquals("goTo14")] (order=1)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE15 <<choice_type>> : (order=2)
StatesSTATE12 -[#FF6347,bold]-> StatesSTATE10 <<choice_type>> : [guardVarEquals("goBack10")] (order=0)
StatesSTATE12 -[#FF6347,bold]-> StatesSTATE11 <<choice_type>> : (order=1)
StatesSTATE14 -[#FF6347,bold]-> StatesSTATE12 <<choice_type>> : [guardVarEquals("loop12")] (order=0)
StatesSTATE14 -[#FF6347,bold]-> StatesSTATE16 <<choice_type>> : (order=1)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE8 <<choice_type>> : [guardVarEquals("stepBack")] (order=0)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE7 <<choice_type>> : [guardVarEquals("stepBackMore")] (order=1)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE6 <<choice_type>> : (order=2)
StatesSTATE8 -[#FF6347,bold]-> StatesSTATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
StatesSTATE8 -[#FF6347,bold]-> StatesSTATE10 <<choice_type>> : (order=1)
StatesSTATE9 -[#1E90FF,bold]-> StatesSTATE_EXTRA_1_1 <<external>> <<e_Events_EVENT_1_1>> : Events.EVENT_1_1
StatesSTATE_EXTRA_1_2 -[#FF6347,bold]-> StatesSTATE_EXTRA_1_1 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
StatesSTATE_EXTRA_1_2 -[#FF6347,bold]-> StatesSTATE_EXTRA_1_3 <<choice_type>> : (order=1)
StatesSTATE_EXTRA_1_3 -[#1E90FF,bold]-> StatesSTATE_EXTRA_1 <<external>> <<e_Events_EVENT_1_2>> : Events.EVENT_1_2
StatesSTATE_EXTRA_1_1 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : Events.EVENT_CANCEL_2
StatesSTATE_EXTRA_1_2 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : Events.EVENT_CANCEL_2
StatesSTATE_EXTRA_1 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : Events.EVENT_CANCEL_2
[*] --> STATE1 StatesSTATEZ --> [*]
state STATEY <<choice>>
state STATE16 <<choice>>
state STATE17 <<choice>>
state STATE18 <<choice>>
state STATE19 <<choice>>
state STATE20 <<choice>>
state STATE11 <<choice>>
state STATE12 <<choice>>
state STATE14 <<choice>>
state STATE9 <<choice>>
state STATE8 <<choice>>
state STATE_EXTRA_1_2 <<choice>>
STATE1 -[#1E90FF,bold]-> STATE2 <<external>> <<e_Events_EVENT1>> : EVENT1
STATE2 -[#1E90FF,bold]-> STATE3 <<external>> <<e_Events_EVENT2>> : EVENT2
STATE3 -[#1E90FF,bold]-> STATE4 <<external>> <<e_Events_EVENT3>> : EVENT3
STATE4 -[#1E90FF,bold]-> STATE5 <<external>> <<e_Events_EVENT4>> : EVENT4
STATE5 -[#1E90FF,bold]-> STATE6 <<external>> <<e_Events_EVENT5>> : EVENT5
STATE6 -[#1E90FF,bold]-> STATE7 <<external>> <<e_Events_EVENT6>> : EVENT6
STATE7 -[#1E90FF,bold]-> STATE8 <<external>> <<e_Events_EVENT7>> : EVENT7
STATE8 -[#1E90FF,bold]-> STATE9 <<external>> <<e_Events_EVENT8>> : EVENT8
STATE9 -[#1E90FF,bold]-> STATE10 <<external>> <<e_Events_EVENT9>> : EVENT9
STATE10 -[#1E90FF,bold]-> STATE11 <<external>> <<e_Events_EVENT10>> : EVENT10
STATE11 -[#1E90FF,bold]-> STATE12 <<external>> <<e_Events_EVENT11>> : EVENT11
STATE12 -[#1E90FF,bold]-> STATE13 <<external>> <<e_Events_EVENT12>> : EVENT12
STATE13 -[#1E90FF,bold]-> STATE14 <<external>> <<e_Events_EVENT13>> : EVENT13
STATE14 -[#1E90FF,bold]-> STATE15 <<external>> <<e_Events_EVENT14>> : EVENT14
STATE15 -[#1E90FF,bold]-> STATE16 <<external>> <<e_Events_EVENT15>> : EVENT15
STATE1 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE2 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE3 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE4 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE5 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE4 -[#1E90FF,bold]-> STATEY <<external>> <<e_Events_EVENTY>> : EVENTY
STATEY -[#FF6347,bold]-> STATEX <<choice_color_0>> : [guardVarEquals("value1")] (order=0)
STATEY -[#FF6347,bold]-> STATEZ <<choice_color_0>> : (order=1)
STATE16 -[#4682B4,bold]-> STATE17 <<choice_color_1>> : [guardVarEquals("value1")] (order=0)
STATE16 -[#4682B4,bold]-> STATE18 <<choice_color_1>> : [guardVarEquals("value2")] (order=1)
STATE16 -[#4682B4,bold]-> STATE19 <<choice_color_1>> : (order=2)
STATE17 -[#32CD32,bold]-> STATE20 <<choice_color_2>> : [guardEventHeaderEquals("header1","foo")] (order=0)
STATE17 -[#32CD32,bold]-> STATE16 <<choice_color_2>> : (order=1)
STATE18 -[#FFD700,bold]-> STATE19 <<choice_color_3>> : [guardVarEquals("value3")] (order=0)
STATE18 -[#FFD700,bold]-> STATE20 <<choice_color_3>> : (order=1)
STATE19 -[#6A5ACD,bold]-> STATE1 <<choice_color_4>> : [guardVarEquals("reset")] (order=0)
STATE19 -[#6A5ACD,bold]-> STATE20 <<choice_color_4>> : (order=1)
STATE20 -[#FF69B4,bold]-> STATE5 <<choice_color_5>> : [guardEventHeaderEquals("header2","bar")] (order=0)
STATE20 -[#FF69B4,bold]-> STATE1 <<choice_color_5>> : (order=1)
STATE11 -[#FF6347,bold]-> STATE13 <<choice_color_0>> : [guardVarEquals("goTo13")] (order=0)
STATE11 -[#FF6347,bold]-> STATE14 <<choice_color_0>> : [guardVarEquals("goTo14")] (order=1)
STATE11 -[#FF6347,bold]-> STATE15 <<choice_color_0>> : (order=2)
STATE12 -[#4682B4,bold]-> STATE10 <<choice_color_1>> : [guardVarEquals("goBack10")] (order=0)
STATE12 -[#4682B4,bold]-> STATE11 <<choice_color_1>> : (order=1)
STATE14 -[#32CD32,bold]-> STATE12 <<choice_color_2>> : [guardVarEquals("loop12")] (order=0)
STATE14 -[#32CD32,bold]-> STATE16 <<choice_color_2>> : (order=1)
STATE9 -[#FFD700,bold]-> STATE8 <<choice_color_3>> : [guardVarEquals("stepBack")] (order=0)
STATE9 -[#FFD700,bold]-> STATE7 <<choice_color_3>> : [guardVarEquals("stepBackMore")] (order=1)
STATE9 -[#FFD700,bold]-> STATE6 <<choice_color_3>> : (order=2)
STATE8 -[#6A5ACD,bold]-> STATE9 <<choice_color_4>> : [guardVarEquals("forward9")] (order=0)
STATE8 -[#6A5ACD,bold]-> STATE10 <<choice_color_4>> : (order=1)
STATE9 -[#1E90FF,bold]-> STATE_EXTRA_1_1 <<external>> <<e_Events_EVENT_1_1>> : EVENT_1_1
STATE_EXTRA_1_2 -[#FF69B4,bold]-> STATE_EXTRA_1_1 <<choice_color_5>> : [guardEventHeaderEquals("header1","foo")] (order=0)
STATE_EXTRA_1_2 -[#FF69B4,bold]-> STATE_EXTRA_1_3 <<choice_color_5>> : (order=1)
STATE_EXTRA_1_3 -[#1E90FF,bold]-> STATE_EXTRA_1 <<external>> <<e_Events_EVENT_1_2>> : EVENT_1_2
STATE_EXTRA_1_1 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : EVENT_CANCEL_2
STATE_EXTRA_1_2 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : EVENT_CANCEL_2
STATE_EXTRA_1 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : EVENT_CANCEL_2
hide <<e_Events_EVENT1>> stereotype
hide <<e_Events_EVENT2>> stereotype
hide <<e_Events_EVENT3>> stereotype
hide <<e_Events_EVENT4>> stereotype
hide <<e_Events_EVENT5>> stereotype
hide <<e_Events_EVENT6>> stereotype
hide <<e_Events_EVENT7>> stereotype
hide <<e_Events_EVENT8>> stereotype
hide <<e_Events_EVENT9>> stereotype
hide <<e_Events_EVENT10>> stereotype
hide <<e_Events_EVENT11>> stereotype
hide <<e_Events_EVENT12>> stereotype
hide <<e_Events_EVENT13>> stereotype
hide <<e_Events_EVENT14>> stereotype
hide <<e_Events_EVENT15>> stereotype
hide <<e_Events_EVENT_CANCEL>> stereotype
hide <<e_Events_EVENTY>> stereotype
hide <<e_Events_EVENT_1_1>> stereotype
hide <<e_Events_EVENT_1_2>> stereotype
hide <<e_Events_EVENT_CANCEL_2>> stereotype
STATEZ --> [*]
@enduml @enduml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -2,72 +2,44 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
state START skinparam state {
state FORK BackgroundColor white
state REGION1_STATE1 BorderColor #94a3b8
state REGION2_STATE1 BorderThickness 1
state REGION1_STATE2 FontName Inter
state REGION2_STATE2 FontSize 9
state JOIN FontStyle bold
state END RoundCorner 20
Padding 1
}
skinparam shadowing false
skinparam ArrowFontName JetBrains Mono
skinparam ArrowFontSize 8
skinparam ArrowColor #cbd5e1
skinparam ArrowThickness 1
skinparam dpi 110
skinparam svgLinkTarget _self
state StatesSTART
state StatesFORK
state StatesREGION1_STATE1
state StatesREGION2_STATE1
state StatesREGION1_STATE2
state StatesREGION2_STATE2
state StatesJOIN
state StatesEND
<style> [*] --> StatesSTART
state {
.choice {
BackgroundColor LightYellow
}
}
arrow {
LineThickness 1
.external { LineColor #1E90FF }
.internal { LineColor #32CD32 }
.local { LineColor #FFA500 }
.junction { LineColor #FF69B4 }
.join { LineColor #8A2BE2 }
.fork { LineColor #20B2AA }
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
}
/* Example: Highlight all transitions for a specific event */
/* .e_MY_EVENT { LineColor red } */
</style>
hide <<external>> stereotype
hide <<internal>> stereotype
hide <<local>> stereotype
hide <<junction>> stereotype
hide <<join>> stereotype
hide <<fork>> stereotype
hide <<choice_type>> stereotype
hide <<choice_color_0>> stereotype
hide <<choice_color_1>> stereotype
hide <<choice_color_2>> stereotype
hide <<choice_color_3>> stereotype
hide <<choice_color_4>> stereotype
hide <<choice_color_5>> stereotype
[*] --> START
START -[#1E90FF,bold]-> FORK <<external>> <<e_Events_TO_FORK>> : TO_FORK StatesSTART -[#1E90FF,bold]-> StatesFORK <<external>> <<e_Events_TO_FORK>> : Events.TO_FORK
FORK -[#20B2AA,bold]-> REGION1_STATE1 <<fork>> StatesFORK -[#20B2AA,bold]-> StatesREGION1_STATE1 <<fork>>
FORK -[#20B2AA,bold]-> REGION2_STATE1 <<fork>> StatesFORK -[#20B2AA,bold]-> StatesREGION2_STATE1 <<fork>>
REGION1_STATE1 -[#1E90FF,bold]-> REGION1_STATE2 <<external>> <<e_Events_R1_NEXT>> : R1_NEXT StatesREGION1_STATE1 -[#1E90FF,bold]-> StatesREGION1_STATE2 <<external>> <<e_Events_R1_NEXT>> : Events.R1_NEXT
REGION2_STATE1 -[#1E90FF,bold]-> REGION2_STATE2 <<external>> <<e_Events_R2_NEXT>> : R2_NEXT StatesREGION2_STATE1 -[#1E90FF,bold]-> StatesREGION2_STATE2 <<external>> <<e_Events_R2_NEXT>> : Events.R2_NEXT
REGION1_STATE2 -[#8A2BE2,bold]-> JOIN <<join>> StatesREGION1_STATE2 -[#8A2BE2,bold]-> StatesJOIN <<join>>
REGION2_STATE2 -[#8A2BE2,bold]-> JOIN <<join>> StatesREGION2_STATE2 -[#8A2BE2,bold]-> StatesJOIN <<join>>
JOIN -[#1E90FF,bold]-> END <<external>> <<e_Events_TO_END>> : TO_END StatesJOIN -[#1E90FF,bold]-> StatesEND <<external>> <<e_Events_TO_END>> : Events.TO_END
hide <<e_Events_TO_FORK>> stereotype
hide <<e_Events_R1_NEXT>> stereotype
hide <<e_Events_R2_NEXT>> stereotype
hide <<e_Events_TO_END>> stereotype
END --> [*] StatesEND --> [*]
@enduml @enduml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 103 KiB

View File

@@ -2,108 +2,72 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
state STATE1 skinparam state {
state STATE2 BackgroundColor white
state STATE3 BorderColor #94a3b8
state STATE4 BorderThickness 1
state STATE5 FontName Inter
state STATE6 FontSize 9
state STATE7 FontStyle bold
state STATE8 RoundCorner 20
state STATE9 Padding 1
state STATE10 }
state CANCEL skinparam shadowing false
state STATEY skinparam ArrowFontName JetBrains Mono
state STATEX skinparam ArrowFontSize 8
state STATEZ skinparam ArrowColor #cbd5e1
state STATE_EXTRA_2 skinparam ArrowThickness 1
state STATE_EXTRA_3 skinparam dpi 110
skinparam svgLinkTarget _self
state StatesSTATE1
state StatesSTATE2
state StatesSTATE3
state StatesSTATE4
state StatesSTATE5
state StatesSTATE6
state StatesSTATE7
state StatesSTATE8
state StatesSTATE9
state StatesSTATE10
state StatesCANCEL
state StatesSTATEY
state StatesSTATEX
state StatesSTATEZ
state StatesSTATE_EXTRA_2
state StatesSTATE_EXTRA_3
<style> [*] --> StatesSTATE1
state {
.choice {
BackgroundColor LightYellow
}
}
arrow {
LineThickness 1
.external { LineColor #1E90FF }
.internal { LineColor #32CD32 }
.local { LineColor #FFA500 }
.junction { LineColor #FF69B4 }
.join { LineColor #8A2BE2 }
.fork { LineColor #20B2AA }
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
} state StatesSTATEY <<choice>>
/* Example: Highlight all transitions for a specific event */ state StatesSTATE9 <<choice>>
/* .e_MY_EVENT { LineColor red } */ state StatesSTATE8 <<choice>>
</style>
hide <<external>> stereotype StatesSTATE1 -[#1E90FF,bold]-> StatesSTATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
hide <<internal>> stereotype StatesSTATE2 -[#1E90FF,bold]-> StatesSTATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
hide <<local>> stereotype StatesSTATE3 -[#1E90FF,bold]-> StatesSTATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
hide <<junction>> stereotype StatesSTATE4 -[#1E90FF,bold]-> StatesSTATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
hide <<join>> stereotype StatesSTATE5 -[#1E90FF,bold]-> StatesSTATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
hide <<fork>> stereotype StatesSTATE6 -[#1E90FF,bold]-> StatesSTATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
hide <<choice_type>> stereotype StatesSTATE7 -[#1E90FF,bold]-> StatesSTATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
hide <<choice_color_0>> stereotype StatesSTATE8 -[#1E90FF,bold]-> StatesSTATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
hide <<choice_color_1>> stereotype StatesSTATE9 -[#1E90FF,bold]-> StatesSTATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
hide <<choice_color_2>> stereotype StatesSTATE1 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
hide <<choice_color_3>> stereotype StatesSTATE2 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
hide <<choice_color_4>> stereotype StatesSTATE3 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
hide <<choice_color_5>> stereotype StatesSTATE4 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE5 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE4 -[#1E90FF,bold]-> StatesSTATEY <<external>> <<e_Events_EVENTY>> : Events.EVENTY
StatesSTATEY -[#FF6347,bold]-> StatesSTATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
StatesSTATEY -[#FF6347,bold]-> StatesSTATEZ <<choice_type>> : (order=1)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE8 <<choice_type>> : [guardVarEquals("stepBack")] (order=0)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE7 <<choice_type>> : [guardVarEquals("stepBackMore")] (order=1)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE6 <<choice_type>> : (order=2)
StatesSTATE8 -[#FF6347,bold]-> StatesSTATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
StatesSTATE8 -[#FF6347,bold]-> StatesSTATE10 <<choice_type>> : (order=1)
StatesSTATE3 -[#1E90FF,bold]-> StatesSTATE_EXTRA_2 <<external>> <<e_Events_EVENT_1_2>> : Events.EVENT_1_2
StatesSTATE_EXTRA_2 -[#1E90FF,bold]-> StatesSTATE_EXTRA_3 <<external>> <<e_Events_EVENT_1_2>> : Events.EVENT_1_2
StatesSTATE_EXTRA_3 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
[*] --> STATE1 StatesSTATEZ --> [*]
state STATEY <<choice>>
state STATE9 <<choice>>
state STATE8 <<choice>>
STATE1 -[#1E90FF,bold]-> STATE2 <<external>> <<e_Events_EVENT1>> : EVENT1
STATE2 -[#1E90FF,bold]-> STATE3 <<external>> <<e_Events_EVENT2>> : EVENT2
STATE3 -[#1E90FF,bold]-> STATE4 <<external>> <<e_Events_EVENT3>> : EVENT3
STATE4 -[#1E90FF,bold]-> STATE5 <<external>> <<e_Events_EVENT4>> : EVENT4
STATE5 -[#1E90FF,bold]-> STATE6 <<external>> <<e_Events_EVENT5>> : EVENT5
STATE6 -[#1E90FF,bold]-> STATE7 <<external>> <<e_Events_EVENT6>> : EVENT6
STATE7 -[#1E90FF,bold]-> STATE8 <<external>> <<e_Events_EVENT7>> : EVENT7
STATE8 -[#1E90FF,bold]-> STATE9 <<external>> <<e_Events_EVENT8>> : EVENT8
STATE9 -[#1E90FF,bold]-> STATE10 <<external>> <<e_Events_EVENT9>> : EVENT9
STATE1 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE2 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE3 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE4 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE5 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE4 -[#1E90FF,bold]-> STATEY <<external>> <<e_Events_EVENTY>> : EVENTY
STATEY -[#FF6347,bold]-> STATEX <<choice_color_0>> : [guardVarEquals("value1")] (order=0)
STATEY -[#FF6347,bold]-> STATEZ <<choice_color_0>> : (order=1)
STATE9 -[#4682B4,bold]-> STATE8 <<choice_color_1>> : [guardVarEquals("stepBack")] (order=0)
STATE9 -[#4682B4,bold]-> STATE7 <<choice_color_1>> : [guardVarEquals("stepBackMore")] (order=1)
STATE9 -[#4682B4,bold]-> STATE6 <<choice_color_1>> : (order=2)
STATE8 -[#32CD32,bold]-> STATE9 <<choice_color_2>> : [guardVarEquals("forward9")] (order=0)
STATE8 -[#32CD32,bold]-> STATE10 <<choice_color_2>> : (order=1)
STATE3 -[#1E90FF,bold]-> STATE_EXTRA_2 <<external>> <<e_Events_EVENT_1_2>> : EVENT_1_2
STATE_EXTRA_2 -[#1E90FF,bold]-> STATE_EXTRA_3 <<external>> <<e_Events_EVENT_1_2>> : EVENT_1_2
STATE_EXTRA_3 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
hide <<e_Events_EVENT1>> stereotype
hide <<e_Events_EVENT2>> stereotype
hide <<e_Events_EVENT3>> stereotype
hide <<e_Events_EVENT4>> stereotype
hide <<e_Events_EVENT5>> stereotype
hide <<e_Events_EVENT6>> stereotype
hide <<e_Events_EVENT7>> stereotype
hide <<e_Events_EVENT8>> stereotype
hide <<e_Events_EVENT9>> stereotype
hide <<e_Events_EVENT_CANCEL>> stereotype
hide <<e_Events_EVENTY>> stereotype
hide <<e_Events_EVENT_1_2>> stereotype
STATEZ --> [*]
@enduml @enduml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View File

@@ -2,110 +2,73 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
state STATE1 skinparam state {
state STATE2 BackgroundColor white
state STATE3 BorderColor #94a3b8
state STATE4 BorderThickness 1
state STATE5 FontName Inter
state STATE6 FontSize 9
state STATE7 FontStyle bold
state STATE8 RoundCorner 20
state STATE9 Padding 1
state STATE10 }
state CANCEL skinparam shadowing false
state STATEY skinparam ArrowFontName JetBrains Mono
state STATEX skinparam ArrowFontSize 8
state STATEZ skinparam ArrowColor #cbd5e1
state STATE_EXTRA_1 skinparam ArrowThickness 1
state STATE_EXTRA_2 skinparam dpi 110
skinparam svgLinkTarget _self
state StatesSTATE1
state StatesSTATE2
state StatesSTATE3
state StatesSTATE4
state StatesSTATE5
state StatesSTATE6
state StatesSTATE7
state StatesSTATE8
state StatesSTATE9
state StatesSTATE10
state StatesCANCEL
state StatesSTATEY
state StatesSTATEX
state StatesSTATEZ
state StatesSTATE_EXTRA_1
state StatesSTATE_EXTRA_2
<style> [*] --> StatesSTATE1
state {
.choice {
BackgroundColor LightYellow
}
}
arrow {
LineThickness 1
.external { LineColor #1E90FF }
.internal { LineColor #32CD32 }
.local { LineColor #FFA500 }
.junction { LineColor #FF69B4 }
.join { LineColor #8A2BE2 }
.fork { LineColor #20B2AA }
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
} state StatesSTATEY <<choice>>
/* Example: Highlight all transitions for a specific event */ state StatesSTATE9 <<choice>>
/* .e_MY_EVENT { LineColor red } */ state StatesSTATE8 <<choice>>
</style>
hide <<external>> stereotype StatesSTATE1 -[#1E90FF,bold]-> StatesSTATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
hide <<internal>> stereotype StatesSTATE2 -[#1E90FF,bold]-> StatesSTATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
hide <<local>> stereotype StatesSTATE3 -[#1E90FF,bold]-> StatesSTATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
hide <<junction>> stereotype StatesSTATE4 -[#1E90FF,bold]-> StatesSTATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
hide <<join>> stereotype StatesSTATE5 -[#1E90FF,bold]-> StatesSTATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
hide <<fork>> stereotype StatesSTATE6 -[#1E90FF,bold]-> StatesSTATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
hide <<choice_type>> stereotype StatesSTATE7 -[#1E90FF,bold]-> StatesSTATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
hide <<choice_color_0>> stereotype StatesSTATE8 -[#1E90FF,bold]-> StatesSTATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
hide <<choice_color_1>> stereotype StatesSTATE9 -[#1E90FF,bold]-> StatesSTATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
hide <<choice_color_2>> stereotype StatesSTATE1 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
hide <<choice_color_3>> stereotype StatesSTATE2 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
hide <<choice_color_4>> stereotype StatesSTATE3 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
hide <<choice_color_5>> stereotype StatesSTATE4 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE5 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE4 -[#1E90FF,bold]-> StatesSTATEY <<external>> <<e_Events_EVENTY>> : Events.EVENTY
StatesSTATEY -[#FF6347,bold]-> StatesSTATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
StatesSTATEY -[#FF6347,bold]-> StatesSTATEZ <<choice_type>> : (order=1)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE8 <<choice_type>> : [guardVarEquals("stepBack")] (order=0)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE7 <<choice_type>> : [guardVarEquals("stepBackMore")] (order=1)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE6 <<choice_type>> : (order=2)
StatesSTATE8 -[#FF6347,bold]-> StatesSTATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
StatesSTATE8 -[#FF6347,bold]-> StatesSTATE10 <<choice_type>> : (order=1)
StatesSTATE3 -[#1E90FF,bold]-> StatesSTATE_EXTRA_1 <<external>> <<e_Events_EVENT_1_2>> : Events.EVENT_1_2
StatesSTATE_EXTRA_1 -[#1E90FF,bold]-> StatesSTATE_EXTRA_2 <<external>> <<e_Events_EVENT_1_3>> : Events.EVENT_1_3
StatesSTATE_EXTRA_1 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE_EXTRA_2 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
[*] --> STATE1 StatesSTATEZ --> [*]
state STATEY <<choice>>
state STATE9 <<choice>>
state STATE8 <<choice>>
STATE1 -[#1E90FF,bold]-> STATE2 <<external>> <<e_Events_EVENT1>> : EVENT1
STATE2 -[#1E90FF,bold]-> STATE3 <<external>> <<e_Events_EVENT2>> : EVENT2
STATE3 -[#1E90FF,bold]-> STATE4 <<external>> <<e_Events_EVENT3>> : EVENT3
STATE4 -[#1E90FF,bold]-> STATE5 <<external>> <<e_Events_EVENT4>> : EVENT4
STATE5 -[#1E90FF,bold]-> STATE6 <<external>> <<e_Events_EVENT5>> : EVENT5
STATE6 -[#1E90FF,bold]-> STATE7 <<external>> <<e_Events_EVENT6>> : EVENT6
STATE7 -[#1E90FF,bold]-> STATE8 <<external>> <<e_Events_EVENT7>> : EVENT7
STATE8 -[#1E90FF,bold]-> STATE9 <<external>> <<e_Events_EVENT8>> : EVENT8
STATE9 -[#1E90FF,bold]-> STATE10 <<external>> <<e_Events_EVENT9>> : EVENT9
STATE1 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE2 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE3 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE4 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE5 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE4 -[#1E90FF,bold]-> STATEY <<external>> <<e_Events_EVENTY>> : EVENTY
STATEY -[#FF6347,bold]-> STATEX <<choice_color_0>> : [guardVarEquals("value1")] (order=0)
STATEY -[#FF6347,bold]-> STATEZ <<choice_color_0>> : (order=1)
STATE9 -[#4682B4,bold]-> STATE8 <<choice_color_1>> : [guardVarEquals("stepBack")] (order=0)
STATE9 -[#4682B4,bold]-> STATE7 <<choice_color_1>> : [guardVarEquals("stepBackMore")] (order=1)
STATE9 -[#4682B4,bold]-> STATE6 <<choice_color_1>> : (order=2)
STATE8 -[#32CD32,bold]-> STATE9 <<choice_color_2>> : [guardVarEquals("forward9")] (order=0)
STATE8 -[#32CD32,bold]-> STATE10 <<choice_color_2>> : (order=1)
STATE3 -[#1E90FF,bold]-> STATE_EXTRA_1 <<external>> <<e_Events_EVENT_1_2>> : EVENT_1_2
STATE_EXTRA_1 -[#1E90FF,bold]-> STATE_EXTRA_2 <<external>> <<e_Events_EVENT_1_3>> : EVENT_1_3
STATE_EXTRA_1 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE_EXTRA_2 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
hide <<e_Events_EVENT1>> stereotype
hide <<e_Events_EVENT2>> stereotype
hide <<e_Events_EVENT3>> stereotype
hide <<e_Events_EVENT4>> stereotype
hide <<e_Events_EVENT5>> stereotype
hide <<e_Events_EVENT6>> stereotype
hide <<e_Events_EVENT7>> stereotype
hide <<e_Events_EVENT8>> stereotype
hide <<e_Events_EVENT9>> stereotype
hide <<e_Events_EVENT_CANCEL>> stereotype
hide <<e_Events_EVENTY>> stereotype
hide <<e_Events_EVENT_1_2>> stereotype
hide <<e_Events_EVENT_1_3>> stereotype
STATEZ --> [*]
@enduml @enduml

View File

@@ -16,7 +16,8 @@
"metadata" : { "metadata" : {
"path" : "/api/v2/orders/submit", "path" : "/api/v2/orders/submit",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
} ], } ],
"callChains" : [ { "callChains" : [ {
"entryPoint" : { "entryPoint" : {
@@ -27,7 +28,8 @@
"metadata" : { "metadata" : {
"path" : "/api/v2/orders/submit", "path" : "/api/v2/orders/submit",
"verb" : "POST" "verb" : "POST"
} },
"parameters" : [ ]
}, },
"methodChain" : [ "click.kamil.examples.statemachine.inheritance.api.OrderControllerImpl.submitOrder", "click.kamil.examples.statemachine.inheritance.service.ProcessingServiceImpl.doProcess" ], "methodChain" : [ "click.kamil.examples.statemachine.inheritance.api.OrderControllerImpl.submitOrder", "click.kamil.examples.statemachine.inheritance.service.ProcessingServiceImpl.doProcess" ],
"triggerPoint" : { "triggerPoint" : {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -2,55 +2,30 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
skinparam state {
BackgroundColor white
BorderColor #94a3b8
BorderThickness 1
FontName Inter
FontSize 9
FontStyle bold
RoundCorner 20
Padding 1
}
skinparam shadowing false
skinparam ArrowFontName JetBrains Mono
skinparam ArrowFontSize 8
skinparam ArrowColor #cbd5e1
skinparam ArrowThickness 1
skinparam dpi 110
skinparam svgLinkTarget _self
state START state START
state WORKING state WORKING
<style>
state {
.choice {
BackgroundColor LightYellow
}
}
arrow {
LineThickness 1
.external { LineColor #1E90FF }
.internal { LineColor #32CD32 }
.local { LineColor #FFA500 }
.junction { LineColor #FF69B4 }
.join { LineColor #8A2BE2 }
.fork { LineColor #20B2AA }
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
}
/* Example: Highlight all transitions for a specific event */
/* .e_MY_EVENT { LineColor red } */
</style>
hide <<external>> stereotype
hide <<internal>> stereotype
hide <<local>> stereotype
hide <<junction>> stereotype
hide <<join>> stereotype
hide <<fork>> stereotype
hide <<choice_type>> stereotype
hide <<choice_color_0>> stereotype
hide <<choice_color_1>> stereotype
hide <<choice_color_2>> stereotype
hide <<choice_color_3>> stereotype
hide <<choice_color_4>> stereotype
hide <<choice_color_5>> stereotype
[*] --> START [*] --> START
START -[#1E90FF,bold]-> WORKING <<external>> <<e_INHERITED_SUBMIT>> : INHERITED_SUBMIT START -[#1E90FF,bold]-> WORKING <<external>> <<e_INHERITED_SUBMIT>> : INHERITED_SUBMIT
hide <<e_INHERITED_SUBMIT>> stereotype
WORKING --> [*] WORKING --> [*]
@enduml @enduml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

@@ -2,79 +2,70 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
state SUBMITTED skinparam state {
state PAID BackgroundColor white
state FULFILLED BorderColor #94a3b8
state CANCELED BorderThickness 1
state PAID1 FontName Inter
state PAID2 FontSize 9
state PAID3 FontStyle bold
state HAPPEN RoundCorner 20
Padding 1
}
skinparam shadowing false
skinparam ArrowFontName JetBrains Mono
skinparam ArrowFontSize 8
skinparam ArrowColor #cbd5e1
skinparam ArrowThickness 1
skinparam dpi 110
skinparam svgLinkTarget _self
state OrderStatesSUBMITTED
state OrderStatesPAID
state OrderStatesFULFILLED
state OrderStatesCANCELED
state OrderStatesPAID1
state OrderStatesPAID2
state OrderStatesPAID3
state OrderStatesHAPPEN
<style> [*] --> OrderStatesSUBMITTED
state {
.choice { state OrderStatesPAID1 <<choice>>
BackgroundColor LightYellow
} OrderStatesSUBMITTED -[#1E90FF,bold]-> OrderStatesPAID <<external>> <<e_OrderEvents_PAY>> : OrderEvents.PAY
OrderStatesPAID -[#1E90FF,bold]-> OrderStatesFULFILLED <<external>> <<e_OrderEvents_FULFILL>> : OrderEvents.FULFILL
OrderStatesSUBMITTED -[#1E90FF,bold]-> OrderStatesCANCELED <<external>> <<e_OrderEvents_CANCEL>> : OrderEvents.CANCEL [new Guard<OrderStates,OrderEvents>(){
@Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){
return false;
} }
arrow { }
LineThickness 1 ]
.external { LineColor #1E90FF } OrderStatesPAID -[#1E90FF,bold]-> OrderStatesCANCELED <<external>> <<e_OrderEvents_CANCEL>> : OrderEvents.CANCEL
.internal { LineColor #32CD32 } OrderStatesSUBMITTED -[#1E90FF,bold]-> OrderStatesSUBMITTED <<external>> <<e_OrderEvents_ABCD>> : OrderEvents.ABCD
.local { LineColor #FFA500 } OrderStatesSUBMITTED -[#1E90FF,bold]-> OrderStatesPAID1 <<external>> <<e_OrderEvents_ABCD>> : OrderEvents.ABCD
.junction { LineColor #FF69B4 } OrderStatesPAID1 -[#FF6347,bold]-> OrderStatesPAID2 <<choice_type>> : [new Guard<OrderStates,OrderEvents>(){
.join { LineColor #8A2BE2 } @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){
.fork { LineColor #20B2AA } return true;
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
} }
/* Example: Highlight all transitions for a specific event */ }
/* .e_MY_EVENT { LineColor red } */ ] (order=0)
</style> OrderStatesPAID1 -[#FF6347,bold]-> OrderStatesPAID3 <<choice_type>> : [guard1] (order=1)
OrderStatesPAID1 -[#FF6347,bold]-> OrderStatesHAPPEN <<choice_type>> : [new Guard<OrderStates,OrderEvents>(){
@Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){
return false;
}
}
] (order=2)
OrderStatesPAID1 -[#FF6347,bold]-> OrderStatesCANCELED <<choice_type>> : (order=3)
OrderStatesPAID2 -[#1E90FF,bold]-> OrderStatesCANCELED <<external>>
OrderStatesPAID3 -[#1E90FF,bold]-> OrderStatesCANCELED <<external>>
OrderStatesPAID2 -[#1E90FF,bold]-> OrderStatesPAID2 <<external>> <<e_OrderEvents_ABCD>> : OrderEvents.ABCD / new Action<OrderStates,OrderEvents>(){
@Override public void execute( StateContext<OrderStates,OrderEvents> context){
}
}
, action2
hide <<external>> stereotype OrderStatesCANCELED --> [*]
hide <<internal>> stereotype OrderStatesFULFILLED --> [*]
hide <<local>> stereotype
hide <<junction>> stereotype
hide <<join>> stereotype
hide <<fork>> stereotype
hide <<choice_type>> stereotype
hide <<choice_color_0>> stereotype
hide <<choice_color_1>> stereotype
hide <<choice_color_2>> stereotype
hide <<choice_color_3>> stereotype
hide <<choice_color_4>> stereotype
hide <<choice_color_5>> stereotype
[*] --> SUBMITTED
state PAID1 <<choice>>
SUBMITTED -[#1E90FF,bold]-> PAID <<external>> <<e_OrderEvents_PAY>> : PAY
PAID -[#1E90FF,bold]-> FULFILLED <<external>> <<e_OrderEvents_FULFILL>> : FULFILL
SUBMITTED -[#1E90FF,bold]-> CANCELED <<external>> <<e_OrderEvents_CANCEL>> : CANCEL [λ]
PAID -[#1E90FF,bold]-> CANCELED <<external>> <<e_OrderEvents_CANCEL>> : CANCEL
SUBMITTED -[#1E90FF,bold]-> SUBMITTED <<external>> <<e_OrderEvents_ABCD>> : ABCD
SUBMITTED -[#1E90FF,bold]-> PAID1 <<external>> <<e_OrderEvents_ABCD>> : ABCD
PAID1 -[#FF6347,bold]-> PAID2 <<choice_color_0>> : [λ] (order=0)
PAID1 -[#FF6347,bold]-> PAID3 <<choice_color_0>> : [guard1] (order=1)
PAID1 -[#FF6347,bold]-> HAPPEN <<choice_color_0>> : [λ] (order=2)
PAID1 -[#FF6347,bold]-> CANCELED <<choice_color_0>> : (order=3)
PAID2 -[#1E90FF,bold]-> CANCELED <<external>>
PAID3 -[#1E90FF,bold]-> CANCELED <<external>>
PAID2 -[#1E90FF,bold]-> PAID2 <<external>> <<e_OrderEvents_ABCD>> : ABCD / λ, action2
hide <<e_OrderEvents_PAY>> stereotype
hide <<e_OrderEvents_FULFILL>> stereotype
hide <<e_OrderEvents_CANCEL>> stereotype
hide <<e_OrderEvents_ABCD>> stereotype
CANCELED --> [*]
FULFILLED --> [*]
@enduml @enduml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

After

Width:  |  Height:  |  Size: 196 KiB

View File

@@ -2,146 +2,105 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
state STATE1 skinparam state {
state STATE2 BackgroundColor white
state STATE3 BorderColor #94a3b8
state STATE4 BorderThickness 1
state STATE5 FontName Inter
state STATE6 FontSize 9
state STATE7 FontStyle bold
state STATE8 RoundCorner 20
state STATE9 Padding 1
state STATE10 }
state STATE11 skinparam shadowing false
state STATE12 skinparam ArrowFontName JetBrains Mono
state STATE13 skinparam ArrowFontSize 8
state STATE14 skinparam ArrowColor #cbd5e1
state STATE15 skinparam ArrowThickness 1
state STATE16 skinparam dpi 110
state STATEY skinparam svgLinkTarget _self
state STATEX state StatesSTATE1
state STATEZ state StatesSTATE2
state STATE17 state StatesSTATE3
state STATE18 state StatesSTATE4
state STATE19 state StatesSTATE5
state STATE20 state StatesSTATE6
state STATE_EXTRA_1 state StatesSTATE7
state StatesSTATE8
state StatesSTATE9
state StatesSTATE10
state StatesSTATE11
state StatesSTATE12
state StatesSTATE13
state StatesSTATE14
state StatesSTATE15
state StatesSTATE16
state StatesSTATEY
state StatesSTATEX
state StatesSTATEZ
state StatesSTATE17
state StatesSTATE18
state StatesSTATE19
state StatesSTATE20
state StatesSTATE_EXTRA_1
<style> [*] --> StatesSTATE1
state {
.choice {
BackgroundColor LightYellow
}
}
arrow {
LineThickness 1
.external { LineColor #1E90FF }
.internal { LineColor #32CD32 }
.local { LineColor #FFA500 }
.junction { LineColor #FF69B4 }
.join { LineColor #8A2BE2 }
.fork { LineColor #20B2AA }
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
} state StatesSTATEY <<choice>>
/* Example: Highlight all transitions for a specific event */ state StatesSTATE16 <<choice>>
/* .e_MY_EVENT { LineColor red } */ state StatesSTATE17 <<choice>>
</style> state StatesSTATE18 <<choice>>
state StatesSTATE19 <<choice>>
state StatesSTATE20 <<choice>>
state StatesSTATE11 <<choice>>
state StatesSTATE12 <<choice>>
state StatesSTATE14 <<choice>>
state StatesSTATE9 <<choice>>
state StatesSTATE8 <<choice>>
hide <<external>> stereotype StatesSTATE1 -[#1E90FF,bold]-> StatesSTATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
hide <<internal>> stereotype StatesSTATE2 -[#1E90FF,bold]-> StatesSTATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
hide <<local>> stereotype StatesSTATE3 -[#1E90FF,bold]-> StatesSTATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
hide <<junction>> stereotype StatesSTATE4 -[#1E90FF,bold]-> StatesSTATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
hide <<join>> stereotype StatesSTATE5 -[#1E90FF,bold]-> StatesSTATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
hide <<fork>> stereotype StatesSTATE6 -[#1E90FF,bold]-> StatesSTATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
hide <<choice_type>> stereotype StatesSTATE7 -[#1E90FF,bold]-> StatesSTATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
hide <<choice_color_0>> stereotype StatesSTATE8 -[#1E90FF,bold]-> StatesSTATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
hide <<choice_color_1>> stereotype StatesSTATE9 -[#1E90FF,bold]-> StatesSTATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
hide <<choice_color_2>> stereotype StatesSTATE10 -[#1E90FF,bold]-> StatesSTATE11 <<external>> <<e_Events_EVENT10>> : Events.EVENT10
hide <<choice_color_3>> stereotype StatesSTATE11 -[#1E90FF,bold]-> StatesSTATE12 <<external>> <<e_Events_EVENT11>> : Events.EVENT11
hide <<choice_color_4>> stereotype StatesSTATE12 -[#1E90FF,bold]-> StatesSTATE13 <<external>> <<e_Events_EVENT12>> : Events.EVENT12
hide <<choice_color_5>> stereotype StatesSTATE13 -[#1E90FF,bold]-> StatesSTATE14 <<external>> <<e_Events_EVENT13>> : Events.EVENT13
StatesSTATE14 -[#1E90FF,bold]-> StatesSTATE15 <<external>> <<e_Events_EVENT14>> : Events.EVENT14
StatesSTATE15 -[#1E90FF,bold]-> StatesSTATE16 <<external>> <<e_Events_EVENT15>> : Events.EVENT15
StatesSTATE4 -[#1E90FF,bold]-> StatesSTATEY <<external>> <<e_Events_EVENTY>> : Events.EVENTY
StatesSTATEY -[#FF6347,bold]-> StatesSTATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
StatesSTATEY -[#FF6347,bold]-> StatesSTATEZ <<choice_type>> : (order=1)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE18 <<choice_type>> : [guardVarEquals("value2")] (order=1)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE19 <<choice_type>> : (order=2)
StatesSTATE17 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
StatesSTATE17 -[#FF6347,bold]-> StatesSTATE16 <<choice_type>> : (order=1)
StatesSTATE18 -[#FF6347,bold]-> StatesSTATE19 <<choice_type>> : [guardVarEquals("value3")] (order=0)
StatesSTATE18 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : (order=1)
StatesSTATE19 -[#FF6347,bold]-> StatesSTATE1 <<choice_type>> : [guardVarEquals("reset")] (order=0)
StatesSTATE19 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : (order=1)
StatesSTATE20 -[#FF6347,bold]-> StatesSTATE5 <<choice_type>> : [guardEventHeaderEquals("header2","bar")] (order=0)
StatesSTATE20 -[#FF6347,bold]-> StatesSTATE1 <<choice_type>> : (order=1)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE13 <<choice_type>> : [guardVarEquals("goTo13")] (order=0)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE14 <<choice_type>> : [guardVarEquals("goTo14")] (order=1)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE15 <<choice_type>> : (order=2)
StatesSTATE12 -[#FF6347,bold]-> StatesSTATE10 <<choice_type>> : [guardVarEquals("goBack10")] (order=0)
StatesSTATE12 -[#FF6347,bold]-> StatesSTATE11 <<choice_type>> : (order=1)
StatesSTATE14 -[#FF6347,bold]-> StatesSTATE12 <<choice_type>> : [guardVarEquals("loop12")] (order=0)
StatesSTATE14 -[#FF6347,bold]-> StatesSTATE16 <<choice_type>> : (order=1)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE8 <<choice_type>> : [guardVarEquals("stepBack")] (order=0)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE7 <<choice_type>> : [guardVarEquals("stepBackMore")] (order=1)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE6 <<choice_type>> : (order=2)
StatesSTATE8 -[#FF6347,bold]-> StatesSTATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
StatesSTATE8 -[#FF6347,bold]-> StatesSTATE10 <<choice_type>> : (order=1)
StatesSTATE5 -[#1E90FF,bold]-> StatesSTATE_EXTRA_1 <<external>> <<e_Events_EVENTX>> : Events.EVENTX
[*] --> STATE1 StatesSTATEZ --> [*]
state STATEY <<choice>>
state STATE16 <<choice>>
state STATE17 <<choice>>
state STATE18 <<choice>>
state STATE19 <<choice>>
state STATE20 <<choice>>
state STATE11 <<choice>>
state STATE12 <<choice>>
state STATE14 <<choice>>
state STATE9 <<choice>>
state STATE8 <<choice>>
STATE1 -[#1E90FF,bold]-> STATE2 <<external>> <<e_Events_EVENT1>> : EVENT1
STATE2 -[#1E90FF,bold]-> STATE3 <<external>> <<e_Events_EVENT2>> : EVENT2
STATE3 -[#1E90FF,bold]-> STATE4 <<external>> <<e_Events_EVENT3>> : EVENT3
STATE4 -[#1E90FF,bold]-> STATE5 <<external>> <<e_Events_EVENT4>> : EVENT4
STATE5 -[#1E90FF,bold]-> STATE6 <<external>> <<e_Events_EVENT5>> : EVENT5
STATE6 -[#1E90FF,bold]-> STATE7 <<external>> <<e_Events_EVENT6>> : EVENT6
STATE7 -[#1E90FF,bold]-> STATE8 <<external>> <<e_Events_EVENT7>> : EVENT7
STATE8 -[#1E90FF,bold]-> STATE9 <<external>> <<e_Events_EVENT8>> : EVENT8
STATE9 -[#1E90FF,bold]-> STATE10 <<external>> <<e_Events_EVENT9>> : EVENT9
STATE10 -[#1E90FF,bold]-> STATE11 <<external>> <<e_Events_EVENT10>> : EVENT10
STATE11 -[#1E90FF,bold]-> STATE12 <<external>> <<e_Events_EVENT11>> : EVENT11
STATE12 -[#1E90FF,bold]-> STATE13 <<external>> <<e_Events_EVENT12>> : EVENT12
STATE13 -[#1E90FF,bold]-> STATE14 <<external>> <<e_Events_EVENT13>> : EVENT13
STATE14 -[#1E90FF,bold]-> STATE15 <<external>> <<e_Events_EVENT14>> : EVENT14
STATE15 -[#1E90FF,bold]-> STATE16 <<external>> <<e_Events_EVENT15>> : EVENT15
STATE4 -[#1E90FF,bold]-> STATEY <<external>> <<e_Events_EVENTY>> : EVENTY
STATEY -[#FF6347,bold]-> STATEX <<choice_color_0>> : [guardVarEquals("value1")] (order=0)
STATEY -[#FF6347,bold]-> STATEZ <<choice_color_0>> : (order=1)
STATE16 -[#4682B4,bold]-> STATE17 <<choice_color_1>> : [guardVarEquals("value1")] (order=0)
STATE16 -[#4682B4,bold]-> STATE18 <<choice_color_1>> : [guardVarEquals("value2")] (order=1)
STATE16 -[#4682B4,bold]-> STATE19 <<choice_color_1>> : (order=2)
STATE17 -[#32CD32,bold]-> STATE20 <<choice_color_2>> : [guardEventHeaderEquals("header1","foo")] (order=0)
STATE17 -[#32CD32,bold]-> STATE16 <<choice_color_2>> : (order=1)
STATE18 -[#FFD700,bold]-> STATE19 <<choice_color_3>> : [guardVarEquals("value3")] (order=0)
STATE18 -[#FFD700,bold]-> STATE20 <<choice_color_3>> : (order=1)
STATE19 -[#6A5ACD,bold]-> STATE1 <<choice_color_4>> : [guardVarEquals("reset")] (order=0)
STATE19 -[#6A5ACD,bold]-> STATE20 <<choice_color_4>> : (order=1)
STATE20 -[#FF69B4,bold]-> STATE5 <<choice_color_5>> : [guardEventHeaderEquals("header2","bar")] (order=0)
STATE20 -[#FF69B4,bold]-> STATE1 <<choice_color_5>> : (order=1)
STATE11 -[#FF6347,bold]-> STATE13 <<choice_color_0>> : [guardVarEquals("goTo13")] (order=0)
STATE11 -[#FF6347,bold]-> STATE14 <<choice_color_0>> : [guardVarEquals("goTo14")] (order=1)
STATE11 -[#FF6347,bold]-> STATE15 <<choice_color_0>> : (order=2)
STATE12 -[#4682B4,bold]-> STATE10 <<choice_color_1>> : [guardVarEquals("goBack10")] (order=0)
STATE12 -[#4682B4,bold]-> STATE11 <<choice_color_1>> : (order=1)
STATE14 -[#32CD32,bold]-> STATE12 <<choice_color_2>> : [guardVarEquals("loop12")] (order=0)
STATE14 -[#32CD32,bold]-> STATE16 <<choice_color_2>> : (order=1)
STATE9 -[#FFD700,bold]-> STATE8 <<choice_color_3>> : [guardVarEquals("stepBack")] (order=0)
STATE9 -[#FFD700,bold]-> STATE7 <<choice_color_3>> : [guardVarEquals("stepBackMore")] (order=1)
STATE9 -[#FFD700,bold]-> STATE6 <<choice_color_3>> : (order=2)
STATE8 -[#6A5ACD,bold]-> STATE9 <<choice_color_4>> : [guardVarEquals("forward9")] (order=0)
STATE8 -[#6A5ACD,bold]-> STATE10 <<choice_color_4>> : (order=1)
STATE5 -[#1E90FF,bold]-> STATE_EXTRA_1 <<external>> <<e_Events_EVENTX>> : EVENTX
hide <<e_Events_EVENT1>> stereotype
hide <<e_Events_EVENT2>> stereotype
hide <<e_Events_EVENT3>> stereotype
hide <<e_Events_EVENT4>> stereotype
hide <<e_Events_EVENT5>> stereotype
hide <<e_Events_EVENT6>> stereotype
hide <<e_Events_EVENT7>> stereotype
hide <<e_Events_EVENT8>> stereotype
hide <<e_Events_EVENT9>> stereotype
hide <<e_Events_EVENT10>> stereotype
hide <<e_Events_EVENT11>> stereotype
hide <<e_Events_EVENT12>> stereotype
hide <<e_Events_EVENT13>> stereotype
hide <<e_Events_EVENT14>> stereotype
hide <<e_Events_EVENT15>> stereotype
hide <<e_Events_EVENTY>> stereotype
hide <<e_Events_EVENTX>> stereotype
STATEZ --> [*]
@enduml @enduml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View File

@@ -2,81 +2,78 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
state SUBMITTED skinparam state {
state PAID BackgroundColor white
state FULFILLED BorderColor #94a3b8
state CANCELED BorderThickness 1
state PAID2 FontName Inter
state PAID3 FontSize 9
state PAID1 FontStyle bold
state HAPPEN RoundCorner 20
Padding 1
}
skinparam shadowing false
skinparam ArrowFontName JetBrains Mono
skinparam ArrowFontSize 8
skinparam ArrowColor #cbd5e1
skinparam ArrowThickness 1
skinparam dpi 110
skinparam svgLinkTarget _self
state OrderStatesSUBMITTED
state OrderStatesPAID
state OrderStatesFULFILLED
state OrderStatesCANCELED
state OrderStatesPAID2
state OrderStatesPAID3
state OrderStatesPAID1
state OrderStatesHAPPEN
<style> [*] --> OrderStatesSUBMITTED
state {
.choice { state OrderStatesSUBMITTED <<choice>>
BackgroundColor LightYellow state OrderStatesPAID <<choice>>
}
OrderStatesSUBMITTED -[#1E90FF,bold]-> OrderStatesPAID <<external>> <<e_OrderEvents_PAY>> : OrderEvents.PAY
OrderStatesPAID -[#1E90FF,bold]-> OrderStatesFULFILLED <<external>> <<e_OrderEvents_FULFILL>> : OrderEvents.FULFILL
OrderStatesSUBMITTED -[#1E90FF,bold]-> OrderStatesCANCELED <<external>> <<e_OrderEvents_CANCEL>> : OrderEvents.CANCEL [new Guard<OrderStates,OrderEvents>(){
@Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){
return false;
} }
arrow { }
LineThickness 1 ]
.external { LineColor #1E90FF } OrderStatesPAID -[#1E90FF,bold]-> OrderStatesCANCELED <<external>> <<e_OrderEvents_CANCEL>> : OrderEvents.CANCEL
.internal { LineColor #32CD32 } OrderStatesSUBMITTED -[#1E90FF,bold]-> OrderStatesSUBMITTED <<external>> <<e_OrderEvents_ABCD>> : OrderEvents.ABCD
.local { LineColor #FFA500 } OrderStatesSUBMITTED -[#FF6347,bold]-> OrderStatesPAID2 <<choice_type>> : [new Guard<OrderStates,OrderEvents>(){
.junction { LineColor #FF69B4 } @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){
.join { LineColor #8A2BE2 } return false;
.fork { LineColor #20B2AA }
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
} }
/* Example: Highlight all transitions for a specific event */ }
/* .e_MY_EVENT { LineColor red } */ ] (order=0)
</style> OrderStatesSUBMITTED -[#FF6347,bold]-> OrderStatesPAID3 <<choice_type>> : (order=1)
OrderStatesPAID -[#FF6347,bold]-> OrderStatesPAID1 <<choice_type>> : [new Guard<OrderStates,OrderEvents>(){
@Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){
return true;
}
}
] (order=0)
OrderStatesPAID -[#FF6347,bold]-> OrderStatesPAID2 <<choice_type>> : [guard1] (order=1)
OrderStatesPAID -[#FF6347,bold]-> OrderStatesHAPPEN <<choice_type>> : [new Guard<OrderStates,OrderEvents>(){
@Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){
return false;
}
}
] (order=2)
OrderStatesPAID -[#FF6347,bold]-> OrderStatesPAID3 <<choice_type>> : (order=3)
OrderStatesPAID2 -[#1E90FF,bold]-> OrderStatesCANCELED <<external>>
OrderStatesPAID3 -[#1E90FF,bold]-> OrderStatesCANCELED <<external>>
OrderStatesPAID1 -[#1E90FF,bold]-> OrderStatesPAID1 <<external>> <<e_OrderEvents_ABCD>> : OrderEvents.ABCD / new Action<OrderStates,OrderEvents>(){
@Override public void execute( StateContext<OrderStates,OrderEvents> context){
;
}
}
, action2
hide <<external>> stereotype OrderStatesCANCELED --> [*]
hide <<internal>> stereotype OrderStatesFULFILLED --> [*]
hide <<local>> stereotype
hide <<junction>> stereotype
hide <<join>> stereotype
hide <<fork>> stereotype
hide <<choice_type>> stereotype
hide <<choice_color_0>> stereotype
hide <<choice_color_1>> stereotype
hide <<choice_color_2>> stereotype
hide <<choice_color_3>> stereotype
hide <<choice_color_4>> stereotype
hide <<choice_color_5>> stereotype
[*] --> SUBMITTED
state SUBMITTED <<choice>>
state PAID <<choice>>
SUBMITTED -[#1E90FF,bold]-> PAID <<external>> <<e_OrderEvents_PAY>> : PAY
PAID -[#1E90FF,bold]-> FULFILLED <<external>> <<e_OrderEvents_FULFILL>> : FULFILL
SUBMITTED -[#1E90FF,bold]-> CANCELED <<external>> <<e_OrderEvents_CANCEL>> : CANCEL [λ]
PAID -[#1E90FF,bold]-> CANCELED <<external>> <<e_OrderEvents_CANCEL>> : CANCEL
SUBMITTED -[#1E90FF,bold]-> SUBMITTED <<external>> <<e_OrderEvents_ABCD>> : ABCD
SUBMITTED -[#FF6347,bold]-> PAID2 <<choice_color_0>> : [λ] (order=0)
SUBMITTED -[#FF6347,bold]-> PAID3 <<choice_color_0>> : (order=1)
PAID -[#4682B4,bold]-> PAID1 <<choice_color_1>> : [λ] (order=0)
PAID -[#4682B4,bold]-> PAID2 <<choice_color_1>> : [guard1] (order=1)
PAID -[#4682B4,bold]-> HAPPEN <<choice_color_1>> : [λ] (order=2)
PAID -[#4682B4,bold]-> PAID3 <<choice_color_1>> : (order=3)
PAID2 -[#1E90FF,bold]-> CANCELED <<external>>
PAID3 -[#1E90FF,bold]-> CANCELED <<external>>
PAID1 -[#1E90FF,bold]-> PAID1 <<external>> <<e_OrderEvents_ABCD>> : ABCD / λ, action2
hide <<e_OrderEvents_PAY>> stereotype
hide <<e_OrderEvents_FULFILL>> stereotype
hide <<e_OrderEvents_CANCEL>> stereotype
hide <<e_OrderEvents_ABCD>> stereotype
CANCELED --> [*]
FULFILLED --> [*]
@enduml @enduml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 223 KiB

View File

@@ -2,162 +2,119 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
state STATE1 skinparam state {
state STATE2 BackgroundColor white
state STATE3 BorderColor #94a3b8
state STATE4 BorderThickness 1
state STATE5 FontName Inter
state STATE6 FontSize 9
state STATE7 FontStyle bold
state STATE8 RoundCorner 20
state STATE9 Padding 1
state STATE10 }
state STATE11 skinparam shadowing false
state STATE12 skinparam ArrowFontName JetBrains Mono
state STATE13 skinparam ArrowFontSize 8
state STATE14 skinparam ArrowColor #cbd5e1
state STATE15 skinparam ArrowThickness 1
state STATE16 skinparam dpi 110
state CANCEL skinparam svgLinkTarget _self
state STATEY state StatesSTATE1
state STATEX state StatesSTATE2
state STATEZ state StatesSTATE3
state STATE17 state StatesSTATE4
state STATE18 state StatesSTATE5
state STATE19 state StatesSTATE6
state STATE20 state StatesSTATE7
state STATE_EXTRA_1 state StatesSTATE8
state STATE_EXTRA_3 state StatesSTATE9
state STATE_EXTRA_2 state StatesSTATE10
state StatesSTATE11
state StatesSTATE12
state StatesSTATE13
state StatesSTATE14
state StatesSTATE15
state StatesSTATE16
state StatesCANCEL
state StatesSTATEY
state StatesSTATEX
state StatesSTATEZ
state StatesSTATE17
state StatesSTATE18
state StatesSTATE19
state StatesSTATE20
state StatesSTATE_EXTRA_1
state StatesSTATE_EXTRA_3
state StatesSTATE_EXTRA_2
<style> [*] --> StatesSTATE1
state {
.choice {
BackgroundColor LightYellow
}
}
arrow {
LineThickness 1
.external { LineColor #1E90FF }
.internal { LineColor #32CD32 }
.local { LineColor #FFA500 }
.junction { LineColor #FF69B4 }
.join { LineColor #8A2BE2 }
.fork { LineColor #20B2AA }
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
} state StatesSTATEY <<choice>>
/* Example: Highlight all transitions for a specific event */ state StatesSTATE16 <<choice>>
/* .e_MY_EVENT { LineColor red } */ state StatesSTATE17 <<choice>>
</style> state StatesSTATE18 <<choice>>
state StatesSTATE19 <<choice>>
state StatesSTATE20 <<choice>>
state StatesSTATE11 <<choice>>
state StatesSTATE12 <<choice>>
state StatesSTATE14 <<choice>>
state StatesSTATE9 <<choice>>
state StatesSTATE8 <<choice>>
state StatesSTATE2 <<choice>>
hide <<external>> stereotype StatesSTATE1 -[#1E90FF,bold]-> StatesSTATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
hide <<internal>> stereotype StatesSTATE2 -[#1E90FF,bold]-> StatesSTATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
hide <<local>> stereotype StatesSTATE3 -[#1E90FF,bold]-> StatesSTATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
hide <<junction>> stereotype StatesSTATE4 -[#1E90FF,bold]-> StatesSTATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
hide <<join>> stereotype StatesSTATE5 -[#1E90FF,bold]-> StatesSTATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
hide <<fork>> stereotype StatesSTATE6 -[#1E90FF,bold]-> StatesSTATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
hide <<choice_type>> stereotype StatesSTATE7 -[#1E90FF,bold]-> StatesSTATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
hide <<choice_color_0>> stereotype StatesSTATE8 -[#1E90FF,bold]-> StatesSTATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
hide <<choice_color_1>> stereotype StatesSTATE9 -[#1E90FF,bold]-> StatesSTATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
hide <<choice_color_2>> stereotype StatesSTATE10 -[#1E90FF,bold]-> StatesSTATE11 <<external>> <<e_Events_EVENT10>> : Events.EVENT10
hide <<choice_color_3>> stereotype StatesSTATE11 -[#1E90FF,bold]-> StatesSTATE12 <<external>> <<e_Events_EVENT11>> : Events.EVENT11
hide <<choice_color_4>> stereotype StatesSTATE12 -[#1E90FF,bold]-> StatesSTATE13 <<external>> <<e_Events_EVENT12>> : Events.EVENT12
hide <<choice_color_5>> stereotype StatesSTATE13 -[#1E90FF,bold]-> StatesSTATE14 <<external>> <<e_Events_EVENT13>> : Events.EVENT13
StatesSTATE14 -[#1E90FF,bold]-> StatesSTATE15 <<external>> <<e_Events_EVENT14>> : Events.EVENT14
StatesSTATE15 -[#1E90FF,bold]-> StatesSTATE16 <<external>> <<e_Events_EVENT15>> : Events.EVENT15
StatesSTATE1 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE2 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE3 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE4 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE5 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE4 -[#1E90FF,bold]-> StatesSTATEY <<external>> <<e_Events_EVENTY>> : Events.EVENTY
StatesSTATEY -[#FF6347,bold]-> StatesSTATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
StatesSTATEY -[#FF6347,bold]-> StatesSTATEZ <<choice_type>> : (order=1)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE18 <<choice_type>> : [guardVarEquals("value2")] (order=1)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE19 <<choice_type>> : (order=2)
StatesSTATE17 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
StatesSTATE17 -[#FF6347,bold]-> StatesSTATE16 <<choice_type>> : (order=1)
StatesSTATE18 -[#FF6347,bold]-> StatesSTATE19 <<choice_type>> : [guardVarEquals("value3")] (order=0)
StatesSTATE18 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : (order=1)
StatesSTATE19 -[#FF6347,bold]-> StatesSTATE1 <<choice_type>> : [guardVarEquals("reset")] (order=0)
StatesSTATE19 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : (order=1)
StatesSTATE20 -[#FF6347,bold]-> StatesSTATE5 <<choice_type>> : [guardEventHeaderEquals("header2","bar")] (order=0)
StatesSTATE20 -[#FF6347,bold]-> StatesSTATE1 <<choice_type>> : (order=1)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE13 <<choice_type>> : [guardVarEquals("goTo13")] (order=0)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE14 <<choice_type>> : [guardVarEquals("goTo14")] (order=1)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE15 <<choice_type>> : (order=2)
StatesSTATE12 -[#FF6347,bold]-> StatesSTATE10 <<choice_type>> : [guardVarEquals("goBack10")] (order=0)
StatesSTATE12 -[#FF6347,bold]-> StatesSTATE11 <<choice_type>> : (order=1)
StatesSTATE14 -[#FF6347,bold]-> StatesSTATE12 <<choice_type>> : [guardVarEquals("loop12")] (order=0)
StatesSTATE14 -[#FF6347,bold]-> StatesSTATE16 <<choice_type>> : (order=1)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE8 <<choice_type>> : [guardVarEquals("stepBack")] (order=0)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE7 <<choice_type>> : [guardVarEquals("stepBackMore")] (order=1)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE6 <<choice_type>> : (order=2)
StatesSTATE8 -[#FF6347,bold]-> StatesSTATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
StatesSTATE8 -[#FF6347,bold]-> StatesSTATE10 <<choice_type>> : (order=1)
StatesSTATE2 -[#1E90FF,bold]-> StatesSTATE_EXTRA_1 <<external>> <<e_Events_EVENTX>> : Events.EVENTX
StatesSTATE2 -[#FF6347,bold]-> StatesSTATE1 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
StatesSTATE2 -[#FF6347,bold]-> StatesSTATE_EXTRA_1 <<choice_type>> : (order=1)
StatesSTATE_EXTRA_1 -[#1E90FF,bold]-> StatesSTATE_EXTRA_3 <<external>> <<e_Events_EVENTY>> : Events.EVENTY
StatesSTATE_EXTRA_1 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : Events.EVENT_CANCEL_2
StatesSTATE_EXTRA_2 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : Events.EVENT_CANCEL_2
[*] --> STATE1 StatesSTATEZ --> [*]
state STATEY <<choice>>
state STATE16 <<choice>>
state STATE17 <<choice>>
state STATE18 <<choice>>
state STATE19 <<choice>>
state STATE20 <<choice>>
state STATE11 <<choice>>
state STATE12 <<choice>>
state STATE14 <<choice>>
state STATE9 <<choice>>
state STATE8 <<choice>>
state STATE2 <<choice>>
STATE1 -[#1E90FF,bold]-> STATE2 <<external>> <<e_Events_EVENT1>> : EVENT1
STATE2 -[#1E90FF,bold]-> STATE3 <<external>> <<e_Events_EVENT2>> : EVENT2
STATE3 -[#1E90FF,bold]-> STATE4 <<external>> <<e_Events_EVENT3>> : EVENT3
STATE4 -[#1E90FF,bold]-> STATE5 <<external>> <<e_Events_EVENT4>> : EVENT4
STATE5 -[#1E90FF,bold]-> STATE6 <<external>> <<e_Events_EVENT5>> : EVENT5
STATE6 -[#1E90FF,bold]-> STATE7 <<external>> <<e_Events_EVENT6>> : EVENT6
STATE7 -[#1E90FF,bold]-> STATE8 <<external>> <<e_Events_EVENT7>> : EVENT7
STATE8 -[#1E90FF,bold]-> STATE9 <<external>> <<e_Events_EVENT8>> : EVENT8
STATE9 -[#1E90FF,bold]-> STATE10 <<external>> <<e_Events_EVENT9>> : EVENT9
STATE10 -[#1E90FF,bold]-> STATE11 <<external>> <<e_Events_EVENT10>> : EVENT10
STATE11 -[#1E90FF,bold]-> STATE12 <<external>> <<e_Events_EVENT11>> : EVENT11
STATE12 -[#1E90FF,bold]-> STATE13 <<external>> <<e_Events_EVENT12>> : EVENT12
STATE13 -[#1E90FF,bold]-> STATE14 <<external>> <<e_Events_EVENT13>> : EVENT13
STATE14 -[#1E90FF,bold]-> STATE15 <<external>> <<e_Events_EVENT14>> : EVENT14
STATE15 -[#1E90FF,bold]-> STATE16 <<external>> <<e_Events_EVENT15>> : EVENT15
STATE1 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE2 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE3 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE4 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE5 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE4 -[#1E90FF,bold]-> STATEY <<external>> <<e_Events_EVENTY>> : EVENTY
STATEY -[#FF6347,bold]-> STATEX <<choice_color_0>> : [guardVarEquals("value1")] (order=0)
STATEY -[#FF6347,bold]-> STATEZ <<choice_color_0>> : (order=1)
STATE16 -[#4682B4,bold]-> STATE17 <<choice_color_1>> : [guardVarEquals("value1")] (order=0)
STATE16 -[#4682B4,bold]-> STATE18 <<choice_color_1>> : [guardVarEquals("value2")] (order=1)
STATE16 -[#4682B4,bold]-> STATE19 <<choice_color_1>> : (order=2)
STATE17 -[#32CD32,bold]-> STATE20 <<choice_color_2>> : [guardEventHeaderEquals("header1","foo")] (order=0)
STATE17 -[#32CD32,bold]-> STATE16 <<choice_color_2>> : (order=1)
STATE18 -[#FFD700,bold]-> STATE19 <<choice_color_3>> : [guardVarEquals("value3")] (order=0)
STATE18 -[#FFD700,bold]-> STATE20 <<choice_color_3>> : (order=1)
STATE19 -[#6A5ACD,bold]-> STATE1 <<choice_color_4>> : [guardVarEquals("reset")] (order=0)
STATE19 -[#6A5ACD,bold]-> STATE20 <<choice_color_4>> : (order=1)
STATE20 -[#FF69B4,bold]-> STATE5 <<choice_color_5>> : [guardEventHeaderEquals("header2","bar")] (order=0)
STATE20 -[#FF69B4,bold]-> STATE1 <<choice_color_5>> : (order=1)
STATE11 -[#FF6347,bold]-> STATE13 <<choice_color_0>> : [guardVarEquals("goTo13")] (order=0)
STATE11 -[#FF6347,bold]-> STATE14 <<choice_color_0>> : [guardVarEquals("goTo14")] (order=1)
STATE11 -[#FF6347,bold]-> STATE15 <<choice_color_0>> : (order=2)
STATE12 -[#4682B4,bold]-> STATE10 <<choice_color_1>> : [guardVarEquals("goBack10")] (order=0)
STATE12 -[#4682B4,bold]-> STATE11 <<choice_color_1>> : (order=1)
STATE14 -[#32CD32,bold]-> STATE12 <<choice_color_2>> : [guardVarEquals("loop12")] (order=0)
STATE14 -[#32CD32,bold]-> STATE16 <<choice_color_2>> : (order=1)
STATE9 -[#FFD700,bold]-> STATE8 <<choice_color_3>> : [guardVarEquals("stepBack")] (order=0)
STATE9 -[#FFD700,bold]-> STATE7 <<choice_color_3>> : [guardVarEquals("stepBackMore")] (order=1)
STATE9 -[#FFD700,bold]-> STATE6 <<choice_color_3>> : (order=2)
STATE8 -[#6A5ACD,bold]-> STATE9 <<choice_color_4>> : [guardVarEquals("forward9")] (order=0)
STATE8 -[#6A5ACD,bold]-> STATE10 <<choice_color_4>> : (order=1)
STATE2 -[#1E90FF,bold]-> STATE_EXTRA_1 <<external>> <<e_Events_EVENTX>> : EVENTX
STATE2 -[#FF69B4,bold]-> STATE1 <<choice_color_5>> : [guardEventHeaderEquals("header1","foo")] (order=0)
STATE2 -[#FF69B4,bold]-> STATE_EXTRA_1 <<choice_color_5>> : (order=1)
STATE_EXTRA_1 -[#1E90FF,bold]-> STATE_EXTRA_3 <<external>> <<e_Events_EVENTY>> : EVENTY
STATE_EXTRA_1 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : EVENT_CANCEL_2
STATE_EXTRA_2 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : EVENT_CANCEL_2
hide <<e_Events_EVENT1>> stereotype
hide <<e_Events_EVENT2>> stereotype
hide <<e_Events_EVENT3>> stereotype
hide <<e_Events_EVENT4>> stereotype
hide <<e_Events_EVENT5>> stereotype
hide <<e_Events_EVENT6>> stereotype
hide <<e_Events_EVENT7>> stereotype
hide <<e_Events_EVENT8>> stereotype
hide <<e_Events_EVENT9>> stereotype
hide <<e_Events_EVENT10>> stereotype
hide <<e_Events_EVENT11>> stereotype
hide <<e_Events_EVENT12>> stereotype
hide <<e_Events_EVENT13>> stereotype
hide <<e_Events_EVENT14>> stereotype
hide <<e_Events_EVENT15>> stereotype
hide <<e_Events_EVENT_CANCEL>> stereotype
hide <<e_Events_EVENTY>> stereotype
hide <<e_Events_EVENTX>> stereotype
hide <<e_Events_EVENT_CANCEL_2>> stereotype
STATEZ --> [*]
@enduml @enduml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 KiB

After

Width:  |  Height:  |  Size: 234 KiB

View File

@@ -2,156 +2,113 @@
!pragma layout smetana !pragma layout smetana
hide empty description hide empty description
hide stereotype hide stereotype
state STATE1 skinparam state {
state STATE2 BackgroundColor white
state STATE3 BorderColor #94a3b8
state STATE4 BorderThickness 1
state STATE5 FontName Inter
state STATE6 FontSize 9
state STATE7 FontStyle bold
state STATE8 RoundCorner 20
state STATE9 Padding 1
state STATE10 }
state STATE11 skinparam shadowing false
state STATE12 skinparam ArrowFontName JetBrains Mono
state STATE13 skinparam ArrowFontSize 8
state STATE14 skinparam ArrowColor #cbd5e1
state STATE15 skinparam ArrowThickness 1
state STATE16 skinparam dpi 110
state CANCEL skinparam svgLinkTarget _self
state STATEY state StatesSTATE1
state STATEX state StatesSTATE2
state STATEZ state StatesSTATE3
state STATE17 state StatesSTATE4
state STATE18 state StatesSTATE5
state STATE19 state StatesSTATE6
state STATE20 state StatesSTATE7
state STATE_EXTRA_1 state StatesSTATE8
state StatesSTATE9
state StatesSTATE10
state StatesSTATE11
state StatesSTATE12
state StatesSTATE13
state StatesSTATE14
state StatesSTATE15
state StatesSTATE16
state StatesCANCEL
state StatesSTATEY
state StatesSTATEX
state StatesSTATEZ
state StatesSTATE17
state StatesSTATE18
state StatesSTATE19
state StatesSTATE20
state StatesSTATE_EXTRA_1
<style> [*] --> StatesSTATE1
state {
.choice {
BackgroundColor LightYellow
}
}
arrow {
LineThickness 1
.external { LineColor #1E90FF }
.internal { LineColor #32CD32 }
.local { LineColor #FFA500 }
.junction { LineColor #FF69B4 }
.join { LineColor #8A2BE2 }
.fork { LineColor #20B2AA }
.choice_type { LineColor #000000 }
.choice_color_0 { LineColor #FF6347 }
.choice_color_1 { LineColor #4682B4 }
.choice_color_2 { LineColor #32CD32 }
.choice_color_3 { LineColor #FFD700 }
.choice_color_4 { LineColor #6A5ACD }
.choice_color_5 { LineColor #FF69B4 }
} state StatesSTATEY <<choice>>
/* Example: Highlight all transitions for a specific event */ state StatesSTATE16 <<choice>>
/* .e_MY_EVENT { LineColor red } */ state StatesSTATE17 <<choice>>
</style> state StatesSTATE18 <<choice>>
state StatesSTATE19 <<choice>>
state StatesSTATE20 <<choice>>
state StatesSTATE11 <<choice>>
state StatesSTATE12 <<choice>>
state StatesSTATE14 <<choice>>
state StatesSTATE9 <<choice>>
state StatesSTATE8 <<choice>>
hide <<external>> stereotype StatesSTATE1 -[#1E90FF,bold]-> StatesSTATE2 <<external>> <<e_Events_EVENT1>> : Events.EVENT1
hide <<internal>> stereotype StatesSTATE2 -[#1E90FF,bold]-> StatesSTATE3 <<external>> <<e_Events_EVENT2>> : Events.EVENT2
hide <<local>> stereotype StatesSTATE3 -[#1E90FF,bold]-> StatesSTATE4 <<external>> <<e_Events_EVENT3>> : Events.EVENT3
hide <<junction>> stereotype StatesSTATE4 -[#1E90FF,bold]-> StatesSTATE5 <<external>> <<e_Events_EVENT4>> : Events.EVENT4
hide <<join>> stereotype StatesSTATE5 -[#1E90FF,bold]-> StatesSTATE6 <<external>> <<e_Events_EVENT5>> : Events.EVENT5
hide <<fork>> stereotype StatesSTATE6 -[#1E90FF,bold]-> StatesSTATE7 <<external>> <<e_Events_EVENT6>> : Events.EVENT6
hide <<choice_type>> stereotype StatesSTATE7 -[#1E90FF,bold]-> StatesSTATE8 <<external>> <<e_Events_EVENT7>> : Events.EVENT7
hide <<choice_color_0>> stereotype StatesSTATE8 -[#1E90FF,bold]-> StatesSTATE9 <<external>> <<e_Events_EVENT8>> : Events.EVENT8
hide <<choice_color_1>> stereotype StatesSTATE9 -[#1E90FF,bold]-> StatesSTATE10 <<external>> <<e_Events_EVENT9>> : Events.EVENT9
hide <<choice_color_2>> stereotype StatesSTATE10 -[#1E90FF,bold]-> StatesSTATE11 <<external>> <<e_Events_EVENT10>> : Events.EVENT10
hide <<choice_color_3>> stereotype StatesSTATE11 -[#1E90FF,bold]-> StatesSTATE12 <<external>> <<e_Events_EVENT11>> : Events.EVENT11
hide <<choice_color_4>> stereotype StatesSTATE12 -[#1E90FF,bold]-> StatesSTATE13 <<external>> <<e_Events_EVENT12>> : Events.EVENT12
hide <<choice_color_5>> stereotype StatesSTATE13 -[#1E90FF,bold]-> StatesSTATE14 <<external>> <<e_Events_EVENT13>> : Events.EVENT13
StatesSTATE14 -[#1E90FF,bold]-> StatesSTATE15 <<external>> <<e_Events_EVENT14>> : Events.EVENT14
StatesSTATE15 -[#1E90FF,bold]-> StatesSTATE16 <<external>> <<e_Events_EVENT15>> : Events.EVENT15
StatesSTATE1 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE2 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE3 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE4 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE5 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE4 -[#1E90FF,bold]-> StatesSTATEY <<external>> <<e_Events_EVENTY>> : Events.EVENTY
StatesSTATEY -[#FF6347,bold]-> StatesSTATEX <<choice_type>> : [guardVarEquals("value1")] (order=0)
StatesSTATEY -[#FF6347,bold]-> StatesSTATEZ <<choice_type>> : (order=1)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE17 <<choice_type>> : [guardVarEquals("value1")] (order=0)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE18 <<choice_type>> : [guardVarEquals("value2")] (order=1)
StatesSTATE16 -[#FF6347,bold]-> StatesSTATE19 <<choice_type>> : (order=2)
StatesSTATE17 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : [guardEventHeaderEquals("header1","foo")] (order=0)
StatesSTATE17 -[#FF6347,bold]-> StatesSTATE16 <<choice_type>> : (order=1)
StatesSTATE18 -[#FF6347,bold]-> StatesSTATE19 <<choice_type>> : [guardVarEquals("value3")] (order=0)
StatesSTATE18 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : (order=1)
StatesSTATE19 -[#FF6347,bold]-> StatesSTATE1 <<choice_type>> : [guardVarEquals("reset")] (order=0)
StatesSTATE19 -[#FF6347,bold]-> StatesSTATE20 <<choice_type>> : (order=1)
StatesSTATE20 -[#FF6347,bold]-> StatesSTATE5 <<choice_type>> : [guardEventHeaderEquals("header2","bar")] (order=0)
StatesSTATE20 -[#FF6347,bold]-> StatesSTATE1 <<choice_type>> : (order=1)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE13 <<choice_type>> : [guardVarEquals("goTo13")] (order=0)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE14 <<choice_type>> : [guardVarEquals("goTo14")] (order=1)
StatesSTATE11 -[#FF6347,bold]-> StatesSTATE15 <<choice_type>> : (order=2)
StatesSTATE12 -[#FF6347,bold]-> StatesSTATE10 <<choice_type>> : [guardVarEquals("goBack10")] (order=0)
StatesSTATE12 -[#FF6347,bold]-> StatesSTATE11 <<choice_type>> : (order=1)
StatesSTATE14 -[#FF6347,bold]-> StatesSTATE12 <<choice_type>> : [guardVarEquals("loop12")] (order=0)
StatesSTATE14 -[#FF6347,bold]-> StatesSTATE16 <<choice_type>> : (order=1)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE8 <<choice_type>> : [guardVarEquals("stepBack")] (order=0)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE7 <<choice_type>> : [guardVarEquals("stepBackMore")] (order=1)
StatesSTATE9 -[#FF6347,bold]-> StatesSTATE6 <<choice_type>> : (order=2)
StatesSTATE8 -[#FF6347,bold]-> StatesSTATE9 <<choice_type>> : [guardVarEquals("forward9")] (order=0)
StatesSTATE8 -[#FF6347,bold]-> StatesSTATE10 <<choice_type>> : (order=1)
StatesSTATE5 -[#1E90FF,bold]-> StatesSTATE_EXTRA_1 <<external>> <<e_Events_EVENTX>> : Events.EVENTX
StatesSTATE_EXTRA_1 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL>> : Events.EVENT_CANCEL
StatesSTATE_EXTRA_1 -[#1E90FF,bold]-> StatesCANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : Events.EVENT_CANCEL_2
[*] --> STATE1 StatesSTATEZ --> [*]
state STATEY <<choice>>
state STATE16 <<choice>>
state STATE17 <<choice>>
state STATE18 <<choice>>
state STATE19 <<choice>>
state STATE20 <<choice>>
state STATE11 <<choice>>
state STATE12 <<choice>>
state STATE14 <<choice>>
state STATE9 <<choice>>
state STATE8 <<choice>>
STATE1 -[#1E90FF,bold]-> STATE2 <<external>> <<e_Events_EVENT1>> : EVENT1
STATE2 -[#1E90FF,bold]-> STATE3 <<external>> <<e_Events_EVENT2>> : EVENT2
STATE3 -[#1E90FF,bold]-> STATE4 <<external>> <<e_Events_EVENT3>> : EVENT3
STATE4 -[#1E90FF,bold]-> STATE5 <<external>> <<e_Events_EVENT4>> : EVENT4
STATE5 -[#1E90FF,bold]-> STATE6 <<external>> <<e_Events_EVENT5>> : EVENT5
STATE6 -[#1E90FF,bold]-> STATE7 <<external>> <<e_Events_EVENT6>> : EVENT6
STATE7 -[#1E90FF,bold]-> STATE8 <<external>> <<e_Events_EVENT7>> : EVENT7
STATE8 -[#1E90FF,bold]-> STATE9 <<external>> <<e_Events_EVENT8>> : EVENT8
STATE9 -[#1E90FF,bold]-> STATE10 <<external>> <<e_Events_EVENT9>> : EVENT9
STATE10 -[#1E90FF,bold]-> STATE11 <<external>> <<e_Events_EVENT10>> : EVENT10
STATE11 -[#1E90FF,bold]-> STATE12 <<external>> <<e_Events_EVENT11>> : EVENT11
STATE12 -[#1E90FF,bold]-> STATE13 <<external>> <<e_Events_EVENT12>> : EVENT12
STATE13 -[#1E90FF,bold]-> STATE14 <<external>> <<e_Events_EVENT13>> : EVENT13
STATE14 -[#1E90FF,bold]-> STATE15 <<external>> <<e_Events_EVENT14>> : EVENT14
STATE15 -[#1E90FF,bold]-> STATE16 <<external>> <<e_Events_EVENT15>> : EVENT15
STATE1 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE2 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE3 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE4 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE5 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE4 -[#1E90FF,bold]-> STATEY <<external>> <<e_Events_EVENTY>> : EVENTY
STATEY -[#FF6347,bold]-> STATEX <<choice_color_0>> : [guardVarEquals("value1")] (order=0)
STATEY -[#FF6347,bold]-> STATEZ <<choice_color_0>> : (order=1)
STATE16 -[#4682B4,bold]-> STATE17 <<choice_color_1>> : [guardVarEquals("value1")] (order=0)
STATE16 -[#4682B4,bold]-> STATE18 <<choice_color_1>> : [guardVarEquals("value2")] (order=1)
STATE16 -[#4682B4,bold]-> STATE19 <<choice_color_1>> : (order=2)
STATE17 -[#32CD32,bold]-> STATE20 <<choice_color_2>> : [guardEventHeaderEquals("header1","foo")] (order=0)
STATE17 -[#32CD32,bold]-> STATE16 <<choice_color_2>> : (order=1)
STATE18 -[#FFD700,bold]-> STATE19 <<choice_color_3>> : [guardVarEquals("value3")] (order=0)
STATE18 -[#FFD700,bold]-> STATE20 <<choice_color_3>> : (order=1)
STATE19 -[#6A5ACD,bold]-> STATE1 <<choice_color_4>> : [guardVarEquals("reset")] (order=0)
STATE19 -[#6A5ACD,bold]-> STATE20 <<choice_color_4>> : (order=1)
STATE20 -[#FF69B4,bold]-> STATE5 <<choice_color_5>> : [guardEventHeaderEquals("header2","bar")] (order=0)
STATE20 -[#FF69B4,bold]-> STATE1 <<choice_color_5>> : (order=1)
STATE11 -[#FF6347,bold]-> STATE13 <<choice_color_0>> : [guardVarEquals("goTo13")] (order=0)
STATE11 -[#FF6347,bold]-> STATE14 <<choice_color_0>> : [guardVarEquals("goTo14")] (order=1)
STATE11 -[#FF6347,bold]-> STATE15 <<choice_color_0>> : (order=2)
STATE12 -[#4682B4,bold]-> STATE10 <<choice_color_1>> : [guardVarEquals("goBack10")] (order=0)
STATE12 -[#4682B4,bold]-> STATE11 <<choice_color_1>> : (order=1)
STATE14 -[#32CD32,bold]-> STATE12 <<choice_color_2>> : [guardVarEquals("loop12")] (order=0)
STATE14 -[#32CD32,bold]-> STATE16 <<choice_color_2>> : (order=1)
STATE9 -[#FFD700,bold]-> STATE8 <<choice_color_3>> : [guardVarEquals("stepBack")] (order=0)
STATE9 -[#FFD700,bold]-> STATE7 <<choice_color_3>> : [guardVarEquals("stepBackMore")] (order=1)
STATE9 -[#FFD700,bold]-> STATE6 <<choice_color_3>> : (order=2)
STATE8 -[#6A5ACD,bold]-> STATE9 <<choice_color_4>> : [guardVarEquals("forward9")] (order=0)
STATE8 -[#6A5ACD,bold]-> STATE10 <<choice_color_4>> : (order=1)
STATE5 -[#1E90FF,bold]-> STATE_EXTRA_1 <<external>> <<e_Events_EVENTX>> : EVENTX
STATE_EXTRA_1 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL>> : EVENT_CANCEL
STATE_EXTRA_1 -[#1E90FF,bold]-> CANCEL <<external>> <<e_Events_EVENT_CANCEL_2>> : EVENT_CANCEL_2
hide <<e_Events_EVENT1>> stereotype
hide <<e_Events_EVENT2>> stereotype
hide <<e_Events_EVENT3>> stereotype
hide <<e_Events_EVENT4>> stereotype
hide <<e_Events_EVENT5>> stereotype
hide <<e_Events_EVENT6>> stereotype
hide <<e_Events_EVENT7>> stereotype
hide <<e_Events_EVENT8>> stereotype
hide <<e_Events_EVENT9>> stereotype
hide <<e_Events_EVENT10>> stereotype
hide <<e_Events_EVENT11>> stereotype
hide <<e_Events_EVENT12>> stereotype
hide <<e_Events_EVENT13>> stereotype
hide <<e_Events_EVENT14>> stereotype
hide <<e_Events_EVENT15>> stereotype
hide <<e_Events_EVENT_CANCEL>> stereotype
hide <<e_Events_EVENTY>> stereotype
hide <<e_Events_EVENTX>> stereotype
hide <<e_Events_EVENT_CANCEL_2>> stereotype
STATEZ --> [*]
@enduml @enduml

View File

@@ -1,10 +1,10 @@
package click.kamil.springstatemachineexporter.html; package click.kamil.springstatemachineexporter.html;
import click.kamil.springstatemachineexporter.command.ExporterCommand;
import click.kamil.springstatemachineexporter.exporter.Dot; import click.kamil.springstatemachineexporter.exporter.Dot;
import click.kamil.springstatemachineexporter.exporter.JsonExporter; import click.kamil.springstatemachineexporter.exporter.JsonExporter;
import click.kamil.springstatemachineexporter.exporter.PlantUml; import click.kamil.springstatemachineexporter.exporter.PlantUml;
import click.kamil.springstatemachineexporter.exporter.Scxml; import click.kamil.springstatemachineexporter.exporter.Scxml;
import click.kamil.springstatemachineexporter.html.command.HtmlExporterCommand;
import click.kamil.springstatemachineexporter.html.exporter.HtmlExporter; import click.kamil.springstatemachineexporter.html.exporter.HtmlExporter;
import click.kamil.springstatemachineexporter.service.ExportService; import click.kamil.springstatemachineexporter.service.ExportService;
import picocli.CommandLine; import picocli.CommandLine;
@@ -13,10 +13,10 @@ import java.util.List;
public class Main { public class Main {
public static void main(String[] args) { public static void main(String[] args) {
// Wiring including the new HTML exporter // Wiring including the specialized HTML exporter
var exporters = List.of(new PlantUml(), new Dot(), new Scxml(), new JsonExporter(), new HtmlExporter()); var exporters = List.of(new PlantUml(), new Dot(), new Scxml(), new JsonExporter(), new HtmlExporter());
var exportService = new ExportService(exporters); var exportService = new ExportService(exporters);
var command = new ExporterCommand(exportService); var command = new HtmlExporterCommand(exportService);
int exitCode = new CommandLine(command).execute(args); int exitCode = new CommandLine(command).execute(args);
System.exit(exitCode); System.exit(exitCode);

View File

@@ -0,0 +1,110 @@
package click.kamil.springstatemachineexporter.html.command;
import click.kamil.springstatemachineexporter.service.ExportService;
import lombok.RequiredArgsConstructor;
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;
import java.awt.*;
import java.io.File;
import java.nio.file.Path;
import java.util.List;
import java.util.concurrent.Callable;
@Command(
name = "spring-sm-html-exporter",
mixinStandardHelpOptions = true,
version = "1.0.0",
description = "Generates interactive HTML documentation portals for Spring State Machines.",
headerHeading = "@|bold,underline Usage:|@%n%n",
synopsisHeading = "%n",
descriptionHeading = "%n@|bold,underline Description:|@%n%n",
parameterListHeading = "%n@|bold,underline Parameters:|@%n",
optionListHeading = "%n@|bold,underline Options:|@%n",
header = "Welcome to the @|bold,red Interactive State Machine Explorer|@!%n"
)
@RequiredArgsConstructor
public class HtmlExporterCommand implements Callable<Integer> {
private final ExportService exportService;
@CommandLine.Spec
CommandLine.Model.CommandSpec spec;
@Option(names = {"-i", "--input"}, description = "Input directory containing the Spring Boot project source code.")
private Path inputDir;
@Option(names = {"-o", "--output"}, description = "Output directory for the generated portal.", defaultValue = "./out_html")
private Path outputDir;
@Option(names = {"-f", "--flows"}, description = "Optional path to a custom flows.json file.")
private Path flowsFile;
@Option(names = {"-m", "--machine"}, description = "Filter to only export state machines whose name contains this string.")
private String machineFilter;
@Option(names = {"-p", "--profiles"}, description = "Spring profiles to activate for property resolution.", split = ",")
private List<String> activeProfiles;
@Option(names = {"--open"}, description = "Automatically open the generated HTML portal in your default browser.")
private boolean openPortal;
@Override
public Integer call() throws Exception {
var out = spec.commandLine().getOut();
var err = spec.commandLine().getErr();
if (inputDir == null) {
inputDir = Path.of(".");
}
out.println(CommandLine.Help.Ansi.AUTO.string("@|bold,red Initializing Interactive Portal Generation...|@"));
out.println(CommandLine.Help.Ansi.AUTO.string("@|yellow Input Directory:|@ " + inputDir.toAbsolutePath()));
out.println(CommandLine.Help.Ansi.AUTO.string("@|yellow Output Directory:|@ " + outputDir.toAbsolutePath()));
if (flowsFile != null) {
out.println(CommandLine.Help.Ansi.AUTO.string("@|yellow Custom Flows:|@ " + flowsFile.toAbsolutePath()));
}
if (machineFilter != null) {
out.println(CommandLine.Help.Ansi.AUTO.string("@|yellow Machine Filter:|@ " + machineFilter));
}
try {
// Force HTML and JSON formats for the interactive portal
List<String> formats = List.of("html", "json");
exportService.runExporter(inputDir, outputDir, formats, true,
activeProfiles != null ? activeProfiles : java.util.Collections.emptyList(),
flowsFile, machineFilter);
out.println(CommandLine.Help.Ansi.AUTO.string("%n@|bold,green SUCCESS:|@ Interactive documentation generated successfully."));
if (openPortal) {
out.println(CommandLine.Help.Ansi.AUTO.string("@|cyan Attempting to open portal in browser...|@"));
openInBrowser(outputDir);
}
return 0;
} catch (Exception e) {
err.println(CommandLine.Help.Ansi.AUTO.string("%n@|bold,red ERROR:|@ Generation failed: " + e.getMessage()));
e.printStackTrace(err);
return 1;
}
}
private void openInBrowser(Path outputDir) {
try {
// Find the first HTML file in the output dir
File dir = outputDir.toFile();
File[] subDirs = dir.listFiles(File::isDirectory);
if (subDirs != null && subDirs.length > 0) {
File[] htmlFiles = subDirs[0].listFiles((d, name) -> name.endsWith(".html"));
if (htmlFiles != null && htmlFiles.length > 0) {
Desktop.getDesktop().browse(htmlFiles[0].toURI());
}
}
} catch (Exception e) {
spec.commandLine().getErr().println("Failed to open browser: " + e.getMessage());
}
}
}

View File

@@ -8,12 +8,11 @@ public class SvgDecorator {
public String decorate(String rawSvg) { public String decorate(String rawSvg) {
String result = rawSvg; String result = rawSvg;
// 1. Remove hardcoded width and height attributes completely // 1. Properly replace width/height with 100% on the root <svg> tag
// This is necessary for svg-pan-zoom and CSS to scale it to full screen result = result.replaceFirst("(?i)width=\"[^\"]*\"", "width=\"100%\"");
result = result.replaceFirst("(?i)width=\"[^\"]*\"", ""); result = result.replaceFirst("(?i)height=\"[^\"]*\"", "height=\"100%\"");
result = result.replaceFirst("(?i)height=\"[^\"]*\"", "");
// 2. Remove the hardcoded 'style' attribute which often contains fixed pixel sizes // 2. Remove the hardcoded 'style' attribute if present
result = result.replaceFirst("(?i)style=\"[^\"]*\"", ""); result = result.replaceFirst("(?i)style=\"[^\"]*\"", "");
// 3. Maintain layout integrity // 3. Maintain layout integrity

View File

@@ -12,24 +12,25 @@ public class SvgDecoratorTest {
String rawSvg = "<svg width=\"500px\" height=\"300px\" style=\"width:500px;height:300px;background:#FFF;\" version=\"1.1\"><defs/></svg>"; String rawSvg = "<svg width=\"500px\" height=\"300px\" style=\"width:500px;height:300px;background:#FFF;\" version=\"1.1\"><defs/></svg>";
String decorated = decorator.decorate(rawSvg); String decorated = decorator.decorate(rawSvg);
assertThat(decorated).contains("width=\"100%\"");
assertThat(decorated).contains("height=\"100%\"");
assertThat(decorated).doesNotContain("width=\"500px\""); assertThat(decorated).doesNotContain("width=\"500px\"");
assertThat(decorated).doesNotContain("height=\"300px\"");
assertThat(decorated).doesNotContain("style=\"width:500px;height:300px;background:#FFF;\""); assertThat(decorated).doesNotContain("style=\"width:500px;height:300px;background:#FFF;\"");
} }
@Test @Test
void shouldNotTouchInternalElementDimensions() { void shouldNotTouchInternalElementDimensions() {
String rawSvg = "<svg width=\"500\"><rect width=\"10\" height=\"10\"/></svg>"; // The decorator replaces the FIRST width/height it finds in the root <svg> tag
String rawSvg = "<svg width=\"500\" height=\"500\"><defs></defs><rect width=\"10\" height=\"10\"/></svg>";
String decorated = decorator.decorate(rawSvg); String decorated = decorator.decorate(rawSvg);
assertThat(decorated).contains("<svg width=\"100%\""); assertThat(decorated).contains("width=\"100%\"");
assertThat(decorated).contains("height=\"100%\"");
assertThat(decorated).contains("<rect width=\"10\" height=\"10\"/>"); assertThat(decorated).contains("<rect width=\"10\" height=\"10\"/>");
} }
@Test @Test
void shouldInjectInteractivityStyles() { void shouldInjectInteractivityStyles() {
String rawSvg = "<svg><defs/></svg>"; String rawSvg = "<svg><defs></defs></svg>";
String decorated = decorator.decorate(rawSvg); String decorated = decorator.decorate(rawSvg);
assertThat(decorated).contains(".active-path"); assertThat(decorated).contains(".active-path");

View File

@@ -41,3 +41,6 @@ dependencies {
tasks.named('test') { tasks.named('test') {
useJUnitPlatform() useJUnitPlatform()
} }
bootJar { enabled = false }
jar { enabled = true }

View File

@@ -40,3 +40,6 @@ dependencies {
tasks.named('test') { tasks.named('test') {
useJUnitPlatform() useJUnitPlatform()
} }
bootJar { enabled = false }
jar { enabled = true }

View File

@@ -40,3 +40,6 @@ dependencies {
tasks.named('test') { tasks.named('test') {
useJUnitPlatform() useJUnitPlatform()
} }
bootJar { enabled = false }
jar { enabled = true }

View File

@@ -28,3 +28,6 @@ dependencies {
compileOnly 'org.projectlombok:lombok' compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok'
} }
bootJar { enabled = false }
jar { enabled = true }

View File

@@ -40,3 +40,6 @@ dependencies {
tasks.named('test') { tasks.named('test') {
useJUnitPlatform() useJUnitPlatform()
} }
bootJar { enabled = false }
jar { enabled = true }

View File

@@ -46,3 +46,6 @@ bootJar {
jar { jar {
enabled = true enabled = true
} }
bootJar { enabled = false }
jar { enabled = true }

View File

@@ -40,3 +40,6 @@ dependencies {
tasks.named('test') { tasks.named('test') {
useJUnitPlatform() useJUnitPlatform()
} }
bootJar { enabled = false }
jar { enabled = true }

View File

@@ -40,3 +40,6 @@ dependencies {
tasks.named('test') { tasks.named('test') {
useJUnitPlatform() useJUnitPlatform()
} }
bootJar { enabled = false }
jar { enabled = true }

View File

@@ -40,3 +40,6 @@ dependencies {
tasks.named('test') { tasks.named('test') {
useJUnitPlatform() useJUnitPlatform()
} }
bootJar { enabled = false }
jar { enabled = true }

View File

@@ -40,3 +40,6 @@ dependencies {
tasks.named('test') { tasks.named('test') {
useJUnitPlatform() useJUnitPlatform()
} }
bootJar { enabled = false }
jar { enabled = true }

View File

@@ -31,3 +31,6 @@ bootJar {
jar { jar {
enabled = true enabled = true
} }
bootJar { enabled = false }
jar { enabled = true }

View File

@@ -40,3 +40,6 @@ dependencies {
tasks.named('test') { tasks.named('test') {
useJUnitPlatform() useJUnitPlatform()
} }
bootJar { enabled = false }
jar { enabled = true }

View File

@@ -40,3 +40,6 @@ dependencies {
tasks.named('test') { tasks.named('test') {
useJUnitPlatform() useJUnitPlatform()
} }
bootJar { enabled = false }
jar { enabled = true }

View File

@@ -26,8 +26,8 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-jersey' implementation 'org.springframework.boot:spring-boot-starter-jersey'
// AWS SQS/SNS // AWS SQS/SNS
implementation 'io.awspring.cloud:spring-cloud-aws-starter-sqs:3.1.1' implementation 'io.awspring.cloud:spring-cloud-aws-starter-sqs:3.3.0'
implementation 'io.awspring.cloud:spring-cloud-aws-starter-sns:3.1.1' implementation 'io.awspring.cloud:spring-cloud-aws-starter-sns:3.3.0'
compileOnly 'org.projectlombok:lombok' compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok'

View File

@@ -2,7 +2,7 @@ package click.kamil.ultimate.config;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.statemachine.config.EnableStateMachine; import org.springframework.statemachine.config.EnableStateMachine;
import org.springframework.statemachine.config.EnumStateMachineConfigurerAdapter; import org.springframework.statemachine.config.StateMachineConfigurerAdapter;
import org.springframework.statemachine.config.builders.StateMachineStateConfigurer; import org.springframework.statemachine.config.builders.StateMachineStateConfigurer;
import org.springframework.statemachine.config.builders.StateMachineTransitionConfigurer; import org.springframework.statemachine.config.builders.StateMachineTransitionConfigurer;
@@ -10,7 +10,7 @@ import java.util.EnumSet;
@Configuration @Configuration
@EnableStateMachine @EnableStateMachine
public class UltimateStateMachineConfig extends EnumStateMachineConfigurerAdapter<String, String> { public class UltimateStateMachineConfig extends StateMachineConfigurerAdapter<String, String> {
@Override @Override
public void configure(StateMachineStateConfigurer<String, String> states) throws Exception { public void configure(StateMachineStateConfigurer<String, String> states) throws Exception {

View File

@@ -1,17 +0,0 @@
package click.kamil.ultimate.messaging;
import io.awspring.cloud.sns.annotation.SnsListener;
import lombok.RequiredArgsConstructor;
import org.springframework.statemachine.StateMachine;
import org.springframework.stereotype.Component;
@Component
@RequiredArgsConstructor
public class SnsTicketListener {
private final StateMachine<String, String> stateMachine;
@SnsListener("ticket-sns-topic")
public void onSnsMessage(String subject, String message) {
stateMachine.sendEvent("SNS_UPDATE");
}
}

View File

@@ -0,0 +1,21 @@
package click.kamil.ultimate.web;
import lombok.RequiredArgsConstructor;
import org.springframework.statemachine.StateMachine;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/api/sns")
@RequiredArgsConstructor
public class SnsWebhookController {
private final StateMachine<String, String> stateMachine;
@PostMapping("/webhook")
public void onSnsMessage(@RequestBody String message) {
// In a real app, you'd verify the SNS signature and handle SubscriptionConfirmation
stateMachine.sendEvent("SNS_UPDATE");
}
}

View File

@@ -0,0 +1,3 @@
spring.cloud.aws.credentials.access-key=dummy
spring.cloud.aws.credentials.secret-key=dummy
spring.cloud.aws.region.static=us-east-1