multi pom
This commit is contained in:
62
README.md
62
README.md
@@ -1,34 +1,38 @@
|
|||||||
|
# Spring State Machine Explorer
|
||||||
|
|
||||||
```shell
|
Static analysis tool to extract and visualize Spring State Machines with deep code traceability.
|
||||||
brew install graphviz
|
|
||||||
|
## Core Modules
|
||||||
|
- **`state_machine_exporter`**: Java AST analyzer. Scans source code, resolves local Maven/Gradle dependencies, and extracts logic (Lambdas, Actions, Guards) into JSON/PUML.
|
||||||
|
- **`state_machine_exporter_html`**: Generates an interactive HTML portal with SVG diagrams and rich tooltips.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### 1. Extract Metadata (JSON)
|
||||||
|
```bash
|
||||||
|
./gradlew :state_machine_exporter:run --args="-i ./my-project -o ./out -f json"
|
||||||
```
|
```
|
||||||
|
|
||||||
```shell
|
### 2. Generate Interactive Portal (HTML)
|
||||||
dot -Tpng statemachine.dot -o statemachine.png
|
```bash
|
||||||
|
./gradlew :state_machine_exporter_html:run --args="-i ./my-project -o ./out_html"
|
||||||
|
```
|
||||||
|
*Supports `--profiles prod` to resolve Spring property placeholders.*
|
||||||
|
|
||||||
|
## Business Flows
|
||||||
|
Define sequence of events in `src/main/resources/flows.json`:
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "Order Success",
|
||||||
|
"description": "Happy path for order placement",
|
||||||
|
"steps": ["PAY", "CHECK_AVAILABILITY->PENDING", "SHIP"]
|
||||||
|
}
|
||||||
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## JSON Structure
|
||||||
```shell
|
- `metadata.entryPoints`: REST, WebFlux, and JMS entry points.
|
||||||
brew install plantuml
|
- `metadata.callChains`: Trace from API call to machine trigger (`sendEvent`).
|
||||||
```
|
- `transitions.actions[].internalLogic`: Extracted source code/lambdas.
|
||||||
```shell
|
- `metadata.properties`: Dictionary of all detected Spring profiles.
|
||||||
plantuml statemachine.puml
|
|
||||||
plantuml -tsvg statemachine.puml
|
|
||||||
```
|
|
||||||
Possible formats
|
|
||||||
```shell
|
|
||||||
-teps To generate images using EPS format
|
|
||||||
-thtml To generate HTML file for class diagram
|
|
||||||
-tlatex:nopreamble To generate images using LaTeX/Tikz format without preamble
|
|
||||||
-tlatex To generate images using LaTeX/Tikz format
|
|
||||||
-tpdf To generate images using PDF format
|
|
||||||
-tpng To generate images using PNG format (default)
|
|
||||||
-tscxml To generate SCXML file for state diagram
|
|
||||||
-tsvg To generate images using SVG format
|
|
||||||
-ttxt To generate images with ASCII art
|
|
||||||
-tutxt To generate images with ASCII art using Unicode characters
|
|
||||||
-tvdx To generate images using VDX format
|
|
||||||
-txmi To generate XMI file for class diagram
|
|
||||||
```
|
|
||||||
|
|
||||||
plantuml statemachine.scxml
|
|
||||||
|
|||||||
@@ -0,0 +1,770 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>State Machine Explorer - click.kamil.maven.core.MavenOrderStateMachine</title>
|
||||||
|
<!-- Popper and Tippy for tooltips -->
|
||||||
|
<script src="https://unpkg.com/@popperjs/core@2"></script>
|
||||||
|
<script src="https://unpkg.com/tippy.js@6"></script>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/tippy.js@6/animations/scale.css"/>
|
||||||
|
<!-- SVG Pan & Zoom -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js"></script>
|
||||||
|
<!-- Google Fonts -->
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;900&family=JetBrains+Mono:wght@400;700&display=swap" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--sidebar-bg: #ffffff;
|
||||||
|
--main-bg: #f8fafc;
|
||||||
|
--accent: #ef4444;
|
||||||
|
--primary: #3b82f6;
|
||||||
|
--text: #0f172a;
|
||||||
|
--text-muted: #64748b;
|
||||||
|
--border: #e2e8f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
display: flex;
|
||||||
|
height: 100vh;
|
||||||
|
font-family: 'Inter', -apple-system, sans-serif;
|
||||||
|
background: var(--main-bg);
|
||||||
|
color: var(--text);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar {
|
||||||
|
width: 480px;
|
||||||
|
min-width: 350px;
|
||||||
|
max-width: 900px;
|
||||||
|
background: var(--sidebar-bg);
|
||||||
|
border-right: 2px solid var(--border);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
box-shadow: 10px 0 15px rgba(0,0,0,0.02);
|
||||||
|
z-index: 10;
|
||||||
|
overflow-x: hidden;
|
||||||
|
resize: horizontal;
|
||||||
|
position: relative;
|
||||||
|
transition: width 0.3s ease, min-width 0.3s ease, padding 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar.collapsed {
|
||||||
|
width: 0 !important;
|
||||||
|
min-width: 0 !important;
|
||||||
|
border-right: none;
|
||||||
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
resize: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toggle-sidebar {
|
||||||
|
position: absolute;
|
||||||
|
top: 20px;
|
||||||
|
left: 20px;
|
||||||
|
z-index: 50;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
#toggle-sidebar:hover {
|
||||||
|
background: #f8fafc;
|
||||||
|
border-color: var(--primary);
|
||||||
|
}
|
||||||
|
#toggle-sidebar svg {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
fill: none;
|
||||||
|
stroke: var(--text-muted);
|
||||||
|
stroke-width: 2;
|
||||||
|
stroke-linecap: round;
|
||||||
|
stroke-linejoin: round;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar::after {
|
||||||
|
content: '⋮';
|
||||||
|
position: absolute;
|
||||||
|
right: 2px; top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
color: var(--border);
|
||||||
|
font-size: 1.2rem;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-header {
|
||||||
|
padding: 30px 30px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 { font-weight: 900; font-size: 1.6rem; color: var(--text); margin: 0 0 5px 0; letter-spacing: -0.5px; }
|
||||||
|
header p { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--text-muted); margin: 0 0 15px 0; opacity: 0.7; }
|
||||||
|
|
||||||
|
.tabs {
|
||||||
|
display: flex;
|
||||||
|
padding: 0 30px;
|
||||||
|
border-bottom: 1px solid var(--border);
|
||||||
|
gap: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab {
|
||||||
|
padding: 10px 0;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--text-muted);
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
transition: color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab:hover { color: var(--text); }
|
||||||
|
.tab.active { color: var(--primary); }
|
||||||
|
.tab.active::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
bottom: -1px; left: 0; right: 0;
|
||||||
|
height: 2px;
|
||||||
|
background: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-content {
|
||||||
|
flex-grow: 1;
|
||||||
|
padding: 25px 30px;
|
||||||
|
overflow-y: auto;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-content.active { display: block; }
|
||||||
|
|
||||||
|
.ep-card, .flow-card {
|
||||||
|
padding: 18px;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 14px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
box-shadow: 0 1px 3px rgba(0,0,0,0.04);
|
||||||
|
position: relative;
|
||||||
|
word-break: break-all;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ep-card:hover, .flow-card:hover {
|
||||||
|
border-color: var(--primary);
|
||||||
|
transform: translateX(5px);
|
||||||
|
box-shadow: 0 15px 30px -10px rgba(59, 130, 246, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ep-type {
|
||||||
|
font-size: 0.6rem;
|
||||||
|
font-weight: 900;
|
||||||
|
padding: 3px 8px;
|
||||||
|
border-radius: 6px;
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.8px;
|
||||||
|
}
|
||||||
|
.type-rest { background: #eff6ff; color: #1d4ed8; }
|
||||||
|
.type-custom { background: #fef2f2; color: #b91c1c; }
|
||||||
|
.type-jms { background: #f5f3ff; color: #7c3aed; }
|
||||||
|
.type-sqs { background: #fff7ed; color: #ea580c; }
|
||||||
|
.type-sns { background: #fff1f2; color: #e11d48; }
|
||||||
|
.type-kafka { background: #fefce8; color: #854d0e; }
|
||||||
|
.type-rabbit { background: #f0fdf4; color: #166534; }
|
||||||
|
|
||||||
|
.ep-name, .flow-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; color: var(--text); }
|
||||||
|
.ep-fqn, .flow-desc { font-family: 'Inter', sans-serif; font-size: 0.75rem; color: var(--text-muted); opacity: 0.9; line-height: 1.4; }
|
||||||
|
|
||||||
|
#main { flex-grow: 1; position: relative; background: var(--main-bg); overflow: hidden; }
|
||||||
|
#svg-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 0; left: 0; right: 0; bottom: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SVG Interactivity Styles */
|
||||||
|
svg a { text-decoration: none !important; }
|
||||||
|
|
||||||
|
.active-path {
|
||||||
|
stroke: var(--accent) !important;
|
||||||
|
stroke-width: 2.5px !important;
|
||||||
|
filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.3));
|
||||||
|
transition: all 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active-path text, a.active-path text {
|
||||||
|
fill: #000 !important;
|
||||||
|
font-weight: 900 !important;
|
||||||
|
paint-order: stroke;
|
||||||
|
stroke: #fff;
|
||||||
|
stroke-width: 3.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dimmed {
|
||||||
|
opacity: 0.2 !important;
|
||||||
|
filter: grayscale(1);
|
||||||
|
transition: opacity 0.4s ease;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 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);
|
||||||
|
border-radius: 16px;
|
||||||
|
padding: 0;
|
||||||
|
max-width: 550px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-content {
|
||||||
|
padding: 20px;
|
||||||
|
max-width: 500px;
|
||||||
|
word-break: break-word;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
|
|
||||||
|
.payload-box {
|
||||||
|
background: #0f172a;
|
||||||
|
color: #e2e8f0;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 12px;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.payload-param {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
.payload-param:last-child { margin-bottom: 0; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<header>
|
||||||
|
<h1>Explorer</h1>
|
||||||
|
<p>click.kamil.maven.core.MavenOrderStateMachine</p>
|
||||||
|
</header>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tabs">
|
||||||
|
<div class="tab active" data-tab="explorer">Explorer</div>
|
||||||
|
<div class="tab" data-tab="flows">Business Flows</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="tab-explorer" class="tab-content active">
|
||||||
|
<div id="ep-list"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="tab-flows" class="tab-content">
|
||||||
|
<div id="flow-list"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
<button id="toggle-sidebar" aria-label="Toggle Sidebar" title="Toggle Sidebar">
|
||||||
|
<svg viewBox="0 0 24 24"><path d="M4 6h16M4 12h16M4 18h16"></path></svg>
|
||||||
|
</button>
|
||||||
|
<div id="svg-container">
|
||||||
|
<?xml version="1.0" encoding="us-ascii" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 159 405" width="100%" zoomAndPan="magnify"><defs/><g><ellipse cx="35.5208" cy="25.2083" fill="#222222" rx="11.4583" ry="11.4583" style="stroke:#222222;stroke-width:1.1458333333333333;"/><rect fill="#FFFFFF" height="45.8333" rx="14.3229" ry="14.3229" style="stroke:#94A3B8;stroke-width:1.1458333333333333;" width="57.2917" x="6.875" y="83.6458"/><text fill="#000000" font-family="Inter" font-size="10.3125" font-weight="bold" lengthAdjust="spacing" textLength="21.7708" x="24.6354" y="110.4599">INIT</text><rect fill="#FFFFFF" height="45.8333" rx="14.3229" ry="14.3229" style="stroke:#94A3B8;stroke-width:1.1458333333333333;" width="57.2917" x="6.875" y="184.4792"/><text fill="#000000" font-family="Inter" font-size="10.3125" font-weight="bold" lengthAdjust="spacing" textLength="27.5" x="21.7708" y="211.2932">BUSY</text><rect fill="#FFFFFF" height="45.8333" rx="14.3229" ry="14.3229" style="stroke:#94A3B8;stroke-width:1.1458333333333333;" width="57.2917" x="6.875" y="285.3125"/><text fill="#000000" font-family="Inter" font-size="10.3125" font-weight="bold" lengthAdjust="spacing" textLength="29.7917" x="20.625" y="312.1266">DONE</text><ellipse cx="35.5208" cy="386.1458" fill="none" rx="12.6042" ry="12.6042" style="stroke:#222222;stroke-width:1.1458333333333333;"/><ellipse cx="35.5208" cy="386.1458" fill="#222222" rx="6.875" ry="6.875" style="stroke:#222222;stroke-width:1.1458333333333333;"/><polygon fill="#CBD5E1" points="35.5208,83.3979,40.1042,73.0854,35.5208,77.6688,30.9375,73.0854,35.5208,83.3979" style="stroke:#CBD5E1;stroke-width:1.1458333333333333;"/><path d="M35.5208,41.323 C35.5208,52.7366 35.5208,62.8874 35.5208,76.5229 " fill="none" style="stroke:#CBD5E1;stroke-width:1.1458333333333333;"/><polygon fill="#1E90FF" points="35.5208,184.4415,40.1042,174.129,35.5208,178.7124,30.9375,174.129,35.5208,184.4415" style="stroke:#1E90FF;stroke-width:1.1458333333333333;"/><path d="M35.5208,129.5779 C35.5208,145.908 35.5208,161.2512 35.5208,177.5665 " fill="none" style="stroke:#1E90FF;stroke-width:2.2916666666666665;"/><a href="#link_SUBMIT" target="_self" title="#link_SUBMIT" xlink:actuate="onRequest" xlink:href="#link_SUBMIT" xlink:show="new" xlink:title="#link_SUBMIT" xlink:type="simple"><text fill="#0000FF" font-family="JetBrains Mono" font-size="9.1667" lengthAdjust="spacing" text-decoration="underline" textLength="113.4375" x="36.6667" y="160.1123">SUBMIT / loggingAction()</text></a><polygon fill="#1E90FF" points="35.5208,285.2749,40.1042,274.9624,35.5208,279.5457,30.9375,274.9624,35.5208,285.2749" style="stroke:#1E90FF;stroke-width:1.1458333333333333;"/><path d="M35.5208,230.4113 C35.5208,246.7413 35.5208,262.0846 35.5208,278.3999 " fill="none" style="stroke:#1E90FF;stroke-width:2.2916666666666665;"/><a href="#link_ORDER_EVENT" target="_self" title="#link_ORDER_EVENT" xlink:actuate="onRequest" xlink:href="#link_ORDER_EVENT" xlink:show="new" xlink:title="#link_ORDER_EVENT" xlink:type="simple"><text fill="#0000FF" font-family="JetBrains Mono" font-size="9.1667" lengthAdjust="spacing" text-decoration="underline" textLength="61.875" x="36.6667" y="260.9456">ORDER_EVENT</text></a><polygon fill="#CBD5E1" points="35.5208,373.4202,40.1042,363.1077,35.5208,367.6911,30.9375,363.1077,35.5208,373.4202" style="stroke:#CBD5E1;stroke-width:1.1458333333333333;"/><path d="M35.5208,331.1691 C35.5208,344.8226 35.5208,355.0691 35.5208,366.5452 " fill="none" style="stroke:#CBD5E1;stroke-width:1.1458333333333333;"/><!--SRC=[RP7RJW8n48Rl-nHZk54ZaVMGW24a84k24J0SJ0mXPDWEIqEttRH5HEExsmN4LRpgp3Vj_yzCJrA3SO8WSQDN3cn23XKoIpwc50qwRK1fHMmXE04bgTi09niPaJgXrGvRHuQqswJ4x5Aex5tY8Jg23mRGm6WP6xrI_5vBhxTU24SPruQJsR52vGQlP-K37Iv4j5HaBGIUjRHoNKm8sifRxS50l1DKlXEtaGGpBRa7_PsNKMJWgkJ14t8kLEorFlCTBf3hTSRdA6s-zxenUdqmVI3NC2YKXOvM-hzhsrRAVolxoQ8PlwNWRp4_u4-9fmA2e9HlyZL-56evH1FxJvbQadF6nkSJA1PhqEwsXuonx83Yk124bLAhTP5jOUAhZT7W1QfLUlCxKoXhjIoP3aQDJdleapiOZmlIQ-yHx8zBa3gE_LhgKVR5fsUJ2TjA7JiqUztmsA7NRuRzQVWSTd_Rv3ZaOY_FjaBPH7woBm00]--></g></svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script id="metadata-json" type="application/json">
|
||||||
|
{
|
||||||
|
"name" : "click.kamil.maven.core.MavenOrderStateMachine",
|
||||||
|
"states" : [ {
|
||||||
|
"rawName" : "DONE",
|
||||||
|
"fullIdentifier" : "DONE"
|
||||||
|
}, {
|
||||||
|
"rawName" : "\"INIT\"",
|
||||||
|
"fullIdentifier" : "INIT"
|
||||||
|
}, {
|
||||||
|
"rawName" : "\"BUSY\"",
|
||||||
|
"fullIdentifier" : "BUSY"
|
||||||
|
}, {
|
||||||
|
"rawName" : "INIT",
|
||||||
|
"fullIdentifier" : "INIT"
|
||||||
|
}, {
|
||||||
|
"rawName" : "\"DONE\"",
|
||||||
|
"fullIdentifier" : "DONE"
|
||||||
|
} ],
|
||||||
|
"transitions" : [ {
|
||||||
|
"type" : "EXTERNAL",
|
||||||
|
"sourceStates" : [ {
|
||||||
|
"rawName" : "\"INIT\"",
|
||||||
|
"fullIdentifier" : "INIT"
|
||||||
|
} ],
|
||||||
|
"targetStates" : [ {
|
||||||
|
"rawName" : "\"BUSY\"",
|
||||||
|
"fullIdentifier" : "BUSY"
|
||||||
|
} ],
|
||||||
|
"event" : "SUBMIT",
|
||||||
|
"guard" : null,
|
||||||
|
"actions" : [ {
|
||||||
|
"expression" : "loggingAction()",
|
||||||
|
"isLambda" : false,
|
||||||
|
"internalLogic" : "context -> {\n System.out.println(\"LOG: State transition in progress...\");\n}\n",
|
||||||
|
"lineNumber" : 25,
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java"
|
||||||
|
} ],
|
||||||
|
"order" : null
|
||||||
|
}, {
|
||||||
|
"type" : "EXTERNAL",
|
||||||
|
"sourceStates" : [ {
|
||||||
|
"rawName" : "\"BUSY\"",
|
||||||
|
"fullIdentifier" : "BUSY"
|
||||||
|
} ],
|
||||||
|
"targetStates" : [ {
|
||||||
|
"rawName" : "\"DONE\"",
|
||||||
|
"fullIdentifier" : "DONE"
|
||||||
|
} ],
|
||||||
|
"event" : "ORDER_EVENT",
|
||||||
|
"guard" : null,
|
||||||
|
"actions" : [ ],
|
||||||
|
"order" : null
|
||||||
|
} ],
|
||||||
|
"startStates" : [ "INIT" ],
|
||||||
|
"endStates" : [ "DONE" ],
|
||||||
|
"renderChoicesAsDiamonds" : true,
|
||||||
|
"flows" : [ ],
|
||||||
|
"metadata" : {
|
||||||
|
"triggers" : [ {
|
||||||
|
"event" : "SUBMIT",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"lineNumber" : 40
|
||||||
|
}, {
|
||||||
|
"event" : "ORDER_EVENT",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderService",
|
||||||
|
"methodName" : "onMessage",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"lineNumber" : 52
|
||||||
|
} ],
|
||||||
|
"entryPoints" : [ {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /maven/orders/submit",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/maven/orders/submit",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "orderId",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ "RequestBody" ]
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /reactive/order",
|
||||||
|
"className" : "click.kamil.maven.api.ReactiveOrderApi",
|
||||||
|
"methodName" : "orderRoutes",
|
||||||
|
"sourceFile" : "api-module/src/main/java/click/kamil/maven/api/ReactiveOrderApi.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/reactive/order",
|
||||||
|
"verb" : "POST",
|
||||||
|
"style" : "WebFlux Functional"
|
||||||
|
},
|
||||||
|
"parameters" : [ ]
|
||||||
|
}, {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /maven/orders/submit",
|
||||||
|
"className" : "click.kamil.maven.api.MavenOrderApi",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "api-module/src/main/java/click/kamil/maven/api/MavenOrderApi.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/maven/orders/submit",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "orderId",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ "RequestBody" ]
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"type" : "JMS",
|
||||||
|
"name" : "JMS: order.queue",
|
||||||
|
"className" : "click.kamil.maven.api.JmsOrderListener",
|
||||||
|
"methodName" : "onMessage",
|
||||||
|
"sourceFile" : null,
|
||||||
|
"metadata" : {
|
||||||
|
"protocol" : "JMS",
|
||||||
|
"destination" : "order.queue"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "message",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ ]
|
||||||
|
} ]
|
||||||
|
} ],
|
||||||
|
"callChains" : [ {
|
||||||
|
"entryPoint" : {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /maven/orders/submit",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/maven/orders/submit",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "orderId",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ "RequestBody" ]
|
||||||
|
} ]
|
||||||
|
},
|
||||||
|
"methodChain" : [ "click.kamil.maven.core.MavenOrderStateMachine.OrderController.submitOrder" ],
|
||||||
|
"triggerPoint" : {
|
||||||
|
"event" : "SUBMIT",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"lineNumber" : 40
|
||||||
|
}
|
||||||
|
} ],
|
||||||
|
"properties" : {
|
||||||
|
"default" : { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const metadata = JSON.parse(document.getElementById('metadata-json').textContent);
|
||||||
|
let panZoomInstance;
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const svg = document.querySelector('#svg-container svg');
|
||||||
|
panZoomInstance = svgPanZoom(svg, { zoomEnabled: true, controlIconsEnabled: true, fit: true, center: true });
|
||||||
|
|
||||||
|
document.getElementById('toggle-sidebar').addEventListener('click', () => {
|
||||||
|
const sidebar = document.getElementById('sidebar');
|
||||||
|
sidebar.classList.toggle('collapsed');
|
||||||
|
|
||||||
|
// Re-center SVG pan-zoom after transition
|
||||||
|
setTimeout(() => {
|
||||||
|
if (panZoomInstance) {
|
||||||
|
panZoomInstance.resize();
|
||||||
|
panZoomInstance.center();
|
||||||
|
}
|
||||||
|
}, 300);
|
||||||
|
});
|
||||||
|
|
||||||
|
setupTabs();
|
||||||
|
populateSidebar();
|
||||||
|
populateFlows();
|
||||||
|
attachInteractivity();
|
||||||
|
});
|
||||||
|
|
||||||
|
function setupTabs() {
|
||||||
|
const flows = metadata.flows || [];
|
||||||
|
if (flows.length === 0) {
|
||||||
|
document.querySelector('.tabs').style.display = 'none';
|
||||||
|
document.querySelector('.tab-content[data-tab="flows"]')?.remove();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.querySelectorAll('.tab').forEach(tab => {
|
||||||
|
tab.addEventListener('click', () => {
|
||||||
|
document.querySelectorAll('.tab, .tab-content').forEach(el => el.classList.remove('active'));
|
||||||
|
tab.classList.add('active');
|
||||||
|
document.getElementById('tab-' + tab.dataset.tab).classList.add('active');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function populateSidebar() {
|
||||||
|
const list = document.getElementById('ep-list');
|
||||||
|
const entryPoints = metadata.metadata.entryPoints || [];
|
||||||
|
const machineEvents = new Set(metadata.transitions.map(t => t.event).filter(Boolean));
|
||||||
|
|
||||||
|
entryPoints.forEach(ep => {
|
||||||
|
// Quality Filter: Hide if it doesn't trigger a machine event
|
||||||
|
const chains = (metadata.metadata.callChains || []).filter(c =>
|
||||||
|
c.entryPoint.className === ep.className &&
|
||||||
|
c.entryPoint.methodName === ep.methodName &&
|
||||||
|
machineEvents.has(c.triggerPoint.event)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (chains.length === 0) return;
|
||||||
|
|
||||||
|
const card = document.createElement('div');
|
||||||
|
card.className = 'ep-card';
|
||||||
|
const sourceHint = ep.sourceFile ? `<div style="font-size:0.65rem; color:var(--text-muted); margin-top:4px; font-style:italic;">${ep.sourceFile}</div>` : '';
|
||||||
|
card.innerHTML = `
|
||||||
|
<div class="ep-type type-${ep.type.toLowerCase()}">${ep.type}</div>
|
||||||
|
<div class="ep-name">${ep.name}</div>
|
||||||
|
<div class="ep-fqn">${ep.className}.${ep.methodName}</div>
|
||||||
|
${sourceHint}
|
||||||
|
`;
|
||||||
|
card.onmouseenter = () => highlightEntryPoint(ep);
|
||||||
|
card.onmouseleave = clearHighlights;
|
||||||
|
list.appendChild(card);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function populateFlows() {
|
||||||
|
const list = document.getElementById('flow-list');
|
||||||
|
const flows = metadata.flows || [];
|
||||||
|
|
||||||
|
if (flows.length === 0) {
|
||||||
|
list.innerHTML = '<p style="color:var(--text-muted); font-size:0.8rem; font-style:italic;">No business flows defined.</p>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
flows.forEach(flow => {
|
||||||
|
const card = document.createElement('div');
|
||||||
|
card.className = 'flow-card';
|
||||||
|
card.innerHTML = `
|
||||||
|
<div class="flow-name">${flow.name}</div>
|
||||||
|
<div class="flow-desc">${flow.description}</div>
|
||||||
|
`;
|
||||||
|
card.onmouseenter = () => highlightFlow(flow);
|
||||||
|
card.onmouseleave = clearHighlights;
|
||||||
|
list.appendChild(card);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function highlightEntryPoint(ep) {
|
||||||
|
clearHighlights();
|
||||||
|
const machineEvents = new Set(metadata.transitions.map(t => t.event).filter(Boolean));
|
||||||
|
const chains = metadata.metadata.callChains || [];
|
||||||
|
const relevantEvents = chains
|
||||||
|
.filter(c => c.entryPoint.className === ep.className && c.entryPoint.methodName === ep.methodName && machineEvents.has(c.triggerPoint.event))
|
||||||
|
.map(c => c.triggerPoint.event);
|
||||||
|
|
||||||
|
if (relevantEvents.length === 0) return;
|
||||||
|
highlightEvents(relevantEvents);
|
||||||
|
}
|
||||||
|
|
||||||
|
function highlightFlow(flow) {
|
||||||
|
clearHighlights();
|
||||||
|
if (!flow.steps || flow.steps.length === 0) return;
|
||||||
|
highlightEvents(flow.steps);
|
||||||
|
}
|
||||||
|
|
||||||
|
function highlightEvents(steps) {
|
||||||
|
const svg = document.querySelector('#svg-container svg');
|
||||||
|
|
||||||
|
// Dim everything first
|
||||||
|
svg.querySelectorAll('path, rect, circle, ellipse, text, polygon').forEach(el => {
|
||||||
|
el.classList.add('dimmed');
|
||||||
|
});
|
||||||
|
|
||||||
|
steps.forEach(step => {
|
||||||
|
let linkId = "";
|
||||||
|
if (step.includes("->")) {
|
||||||
|
// Named Choice Branch: "SRC->TGT"
|
||||||
|
const parts = step.split("->");
|
||||||
|
linkId = "#link_anon_" + normalize(parts[0]) + "_" + normalize(parts[1]);
|
||||||
|
} else {
|
||||||
|
// Standard Event
|
||||||
|
linkId = "#link_" + normalize(step);
|
||||||
|
}
|
||||||
|
|
||||||
|
svg.querySelectorAll('a').forEach(link => {
|
||||||
|
const href = link.getAttribute('xlink:href') || link.getAttribute('href');
|
||||||
|
if (href === linkId) {
|
||||||
|
highlightLinkGroup(link);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Un-dim all state nodes for context
|
||||||
|
svg.querySelectorAll('rect, circle, ellipse, polygon').forEach(el => {
|
||||||
|
const isChoice = el.tagName === 'polygon' && el.points?.numberOfItems === 4;
|
||||||
|
if (isChoice || ['rect', 'circle', 'ellipse'].includes(el.tagName)) {
|
||||||
|
el.classList.remove('dimmed');
|
||||||
|
let next = el.nextElementSibling;
|
||||||
|
while(next && next.tagName === 'text') {
|
||||||
|
next.classList.remove('dimmed');
|
||||||
|
next = next.nextElementSibling;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function highlightLinkGroup(link) {
|
||||||
|
link.classList.add('active-path');
|
||||||
|
link.querySelectorAll('*').forEach(child => child.classList.remove('dimmed'));
|
||||||
|
|
||||||
|
// Find path and polygon immediately before the <a> tag (interleaved)
|
||||||
|
let prev = link.previousElementSibling;
|
||||||
|
let foundPath = false;
|
||||||
|
let foundPolygon = false;
|
||||||
|
while (prev) {
|
||||||
|
if (prev.tagName === 'path' && !foundPath) {
|
||||||
|
prev.classList.remove('dimmed');
|
||||||
|
prev.classList.add('active-path');
|
||||||
|
foundPath = true;
|
||||||
|
} else if (prev.tagName === 'polygon' && !foundPolygon && prev.points?.numberOfItems !== 4) {
|
||||||
|
prev.classList.remove('dimmed');
|
||||||
|
prev.classList.add('active-path');
|
||||||
|
foundPolygon = true;
|
||||||
|
} else if (['rect', 'circle', 'ellipse'].includes(prev.tagName) ||
|
||||||
|
(prev.tagName === 'polygon' && prev.points?.numberOfItems === 4)) {
|
||||||
|
// Hit a state node, stop traversal
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (foundPath && foundPolygon) break;
|
||||||
|
prev = prev.previousElementSibling;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearHighlights() {
|
||||||
|
document.querySelectorAll('.dimmed, .active-path').forEach(el => {
|
||||||
|
el.classList.remove('dimmed', 'active-path');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function attachInteractivity() {
|
||||||
|
const svg = document.querySelector('#svg-container svg');
|
||||||
|
const transitions = metadata.transitions || [];
|
||||||
|
|
||||||
|
svg.querySelectorAll('a').forEach(link => {
|
||||||
|
const href = link.getAttribute('xlink:href') || link.getAttribute('href');
|
||||||
|
if (!href || !href.startsWith('#link_')) return;
|
||||||
|
|
||||||
|
const linkId = href.replace('#link_', '');
|
||||||
|
const isAnon = linkId.startsWith('anon_');
|
||||||
|
|
||||||
|
let metaTrans = null;
|
||||||
|
if (isAnon) {
|
||||||
|
metaTrans = transitions.find(t =>
|
||||||
|
!t.event &&
|
||||||
|
"anon_" + normalize(t.sourceStates[0].fullIdentifier) + "_" + normalize(t.targetStates[0].fullIdentifier) === linkId
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
metaTrans = transitions.find(t => normalize(t.event) === linkId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (metaTrans || isAnon) {
|
||||||
|
link.style.cursor = 'pointer';
|
||||||
|
const setupTippy = (el) => {
|
||||||
|
tippy(el, {
|
||||||
|
content: createTooltip(isAnon ? "Internal logic" : linkId, metaTrans),
|
||||||
|
allowHTML: true,
|
||||||
|
theme: 'modern',
|
||||||
|
interactive: true,
|
||||||
|
appendTo: document.body,
|
||||||
|
placement: 'right',
|
||||||
|
offset: [0, 20]
|
||||||
|
});
|
||||||
|
};
|
||||||
|
setupTippy(link);
|
||||||
|
let path = link.previousElementSibling;
|
||||||
|
while(path && path.tagName !== 'path') path = path.previousElementSibling;
|
||||||
|
if (path) {
|
||||||
|
path.style.cursor = 'pointer';
|
||||||
|
setupTippy(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalize(s) {
|
||||||
|
if (!s) return "";
|
||||||
|
return s.replace(/[^a-zA-Z0-9]/g, '_');
|
||||||
|
}
|
||||||
|
|
||||||
|
function createTooltip(name, trans) {
|
||||||
|
const chains = (metadata.metadata.callChains || []).filter(c => normalize(c.triggerPoint.event) === name);
|
||||||
|
|
||||||
|
let html = `<div class="tooltip-content">
|
||||||
|
<div style="font-weight:900; font-size:1.1rem; margin-bottom:12px; border-bottom:1px solid #eee; padding-bottom:8px; line-height:1.3;">
|
||||||
|
${name === 'Internal logic' ? name : 'Event: <span style="color:var(--accent)">' + name + '</span>'}
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
if (trans && trans.guard) {
|
||||||
|
const lineInfo = trans.guard.lineNumber ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(${trans.guard.sourceFile || 'Source'}:${trans.guard.lineNumber})</span>` : '';
|
||||||
|
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Guard${lineInfo}</div>
|
||||||
|
<div style="background:#f1f5f9; padding:6px; border-radius:4px; font-family:monospace; font-size:0.8rem; margin-bottom:12px; border:1px solid #e2e8f0;">${trans.guard.expression}</div>`;
|
||||||
|
if (trans.guard.internalLogic) {
|
||||||
|
html += `<div style="font-size:0.65rem; font-weight:800; color:#cbd5e1; text-transform:uppercase; margin-bottom:4px">Internal Logic</div>
|
||||||
|
<pre style="background:#1e293b; color:#f8fafc; padding:8px; border-radius:4px; font-family:'JetBrains Mono', monospace; font-size:0.7rem; overflow-x:auto; margin-bottom:12px;"><code>${trans.guard.internalLogic.replace(/</g, '<').replace(/>/g, '>')}</code></pre>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (trans && trans.actions && trans.actions.length > 0) {
|
||||||
|
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Actions</div>`;
|
||||||
|
trans.actions.forEach(action => {
|
||||||
|
const lineInfo = action.lineNumber ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(${action.sourceFile || 'Source'}:${action.lineNumber})</span>` : '';
|
||||||
|
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Action${lineInfo}</div>
|
||||||
|
<div style="background:#f1f5f9; padding:6px; border-radius:4px; font-family:monospace; font-size:0.8rem; margin-bottom:12px; border:1px solid #e2e8f0;">${action.expression}</div>`;
|
||||||
|
if (action.internalLogic) {
|
||||||
|
html += `<div style="font-size:0.65rem; font-weight:800; color:#cbd5e1; text-transform:uppercase; margin-bottom:4px">Internal Logic</div>
|
||||||
|
<pre style="background:#1e293b; color:#f8fafc; padding:8px; border-radius:4px; font-family:'JetBrains Mono', monospace; font-size:0.7rem; overflow-x:auto; margin-bottom:12px;"><code>${action.internalLogic.replace(/</g, '<').replace(/>/g, '>')}</code></pre>`;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
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 #eee; padding-top:10px">Triggered by</div>`;
|
||||||
|
chains.forEach(c => {
|
||||||
|
const triggerInfo = c.triggerPoint.sourceFile ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(${c.triggerPoint.sourceFile}:${c.triggerPoint.lineNumber})</span>` : '';
|
||||||
|
html += `<div style="margin-bottom:20px">
|
||||||
|
<div style="font-weight:700; font-size:0.85rem; color:var(--text);">${c.entryPoint.name}</div>
|
||||||
|
<div style="font-size:0.65rem; color:#64748b; font-family:monospace; margin-top:2px;">Trigger: ${c.triggerPoint.methodName}${triggerInfo}</div>
|
||||||
|
${renderParameters(c.entryPoint.parameters)}
|
||||||
|
<div style="margin-left:10px; border-left:2px solid #e2e8f0; padding-left:12px; margin-top:10px">
|
||||||
|
${c.methodChain.map((m, i) => `<div style="font-size:0.7rem; color:#475569; margin-top:4px; font-family:'JetBrains Mono', monospace;"><b>${i+1}</b> ${m}</div>`).join('')}
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
html += `</div>`;
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderParameters(params) {
|
||||||
|
if (!params || params.length === 0) return "";
|
||||||
|
let html = `<div style="font-size:0.65rem; font-weight:700; color:#94a3b8; margin-top:8px; margin-bottom:4px; text-transform:uppercase;">Input Data</div>`;
|
||||||
|
html += `<div class="payload-box">`;
|
||||||
|
params.forEach(p => {
|
||||||
|
const annotation = (p.annotations || []).find(a => a.endsWith("RequestBody") || a.endsWith("PathVariable") || a.endsWith("RequestParam"));
|
||||||
|
const cleanAnn = annotation ? "@" + annotation.substring(annotation.lastIndexOf('.') + 1) : "";
|
||||||
|
html += `<div class="payload-param">
|
||||||
|
<span style="color:#f43f5e; font-size:0.65rem; font-weight:bold;">${cleanAnn}</span>
|
||||||
|
<span style="color:#38bdf8;">${p.type}</span>
|
||||||
|
<span style="color:#a3e635;">${p.name}</span>
|
||||||
|
</div>`;
|
||||||
|
});
|
||||||
|
html += `</div>`;
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
{
|
||||||
|
"metadata" : {
|
||||||
|
"triggers" : [ {
|
||||||
|
"event" : "SUBMIT",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"lineNumber" : 40
|
||||||
|
}, {
|
||||||
|
"event" : "ORDER_EVENT",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderService",
|
||||||
|
"methodName" : "onMessage",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"lineNumber" : 52
|
||||||
|
} ],
|
||||||
|
"entryPoints" : [ {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /maven/orders/submit",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/maven/orders/submit",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "orderId",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ "RequestBody" ]
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /reactive/order",
|
||||||
|
"className" : "click.kamil.maven.api.ReactiveOrderApi",
|
||||||
|
"methodName" : "orderRoutes",
|
||||||
|
"sourceFile" : "api-module/src/main/java/click/kamil/maven/api/ReactiveOrderApi.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/reactive/order",
|
||||||
|
"verb" : "POST",
|
||||||
|
"style" : "WebFlux Functional"
|
||||||
|
},
|
||||||
|
"parameters" : [ ]
|
||||||
|
}, {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /maven/orders/submit",
|
||||||
|
"className" : "click.kamil.maven.api.MavenOrderApi",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "api-module/src/main/java/click/kamil/maven/api/MavenOrderApi.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/maven/orders/submit",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "orderId",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ "RequestBody" ]
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"type" : "JMS",
|
||||||
|
"name" : "JMS: order.queue",
|
||||||
|
"className" : "click.kamil.maven.api.JmsOrderListener",
|
||||||
|
"methodName" : "onMessage",
|
||||||
|
"sourceFile" : null,
|
||||||
|
"metadata" : {
|
||||||
|
"protocol" : "JMS",
|
||||||
|
"destination" : "order.queue"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "message",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ ]
|
||||||
|
} ]
|
||||||
|
} ],
|
||||||
|
"callChains" : [ {
|
||||||
|
"entryPoint" : {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /maven/orders/submit",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/maven/orders/submit",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "orderId",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ "RequestBody" ]
|
||||||
|
} ]
|
||||||
|
},
|
||||||
|
"methodChain" : [ "click.kamil.maven.core.MavenOrderStateMachine.OrderController.submitOrder" ],
|
||||||
|
"triggerPoint" : {
|
||||||
|
"event" : "SUBMIT",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"lineNumber" : 40
|
||||||
|
}
|
||||||
|
} ],
|
||||||
|
"properties" : {
|
||||||
|
"default" : { }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name" : "click.kamil.maven.core.MavenOrderStateMachine",
|
||||||
|
"renderChoicesAsDiamonds" : true,
|
||||||
|
"startStates" : [ "INIT" ],
|
||||||
|
"transitions" : [ {
|
||||||
|
"type" : "EXTERNAL",
|
||||||
|
"sourceStates" : [ {
|
||||||
|
"rawName" : "\"INIT\"",
|
||||||
|
"fullIdentifier" : "INIT"
|
||||||
|
} ],
|
||||||
|
"targetStates" : [ {
|
||||||
|
"rawName" : "\"BUSY\"",
|
||||||
|
"fullIdentifier" : "BUSY"
|
||||||
|
} ],
|
||||||
|
"event" : "SUBMIT",
|
||||||
|
"guard" : null,
|
||||||
|
"actions" : [ {
|
||||||
|
"expression" : "loggingAction()",
|
||||||
|
"isLambda" : false,
|
||||||
|
"internalLogic" : "context -> {\n System.out.println(\"LOG: State transition in progress...\");\n}\n",
|
||||||
|
"lineNumber" : 25,
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java"
|
||||||
|
} ],
|
||||||
|
"order" : null
|
||||||
|
}, {
|
||||||
|
"type" : "EXTERNAL",
|
||||||
|
"sourceStates" : [ {
|
||||||
|
"rawName" : "\"BUSY\"",
|
||||||
|
"fullIdentifier" : "BUSY"
|
||||||
|
} ],
|
||||||
|
"targetStates" : [ {
|
||||||
|
"rawName" : "\"DONE\"",
|
||||||
|
"fullIdentifier" : "DONE"
|
||||||
|
} ],
|
||||||
|
"event" : "ORDER_EVENT",
|
||||||
|
"guard" : null,
|
||||||
|
"actions" : [ ],
|
||||||
|
"order" : null
|
||||||
|
} ],
|
||||||
|
"endStates" : [ "DONE" ]
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
@startuml
|
||||||
|
!pragma layout smetana
|
||||||
|
set separator none
|
||||||
|
hide empty description
|
||||||
|
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
|
||||||
|
|
||||||
|
[*] --> INIT
|
||||||
|
|
||||||
|
|
||||||
|
INIT -[#1E90FF,bold]-> BUSY <<external>> <<e_ORDER_EVENT>> : ORDER_EVENT / loggingAction()
|
||||||
|
|
||||||
|
DONE --> [*]
|
||||||
|
@enduml
|
||||||
|
|
||||||
@@ -327,7 +327,9 @@
|
|||||||
"expression" : "processAction()",
|
"expression" : "processAction()",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : "@Override default void execute(StateContext<String,String> context){\n System.out.println(\"Processing order: \" + context.getMessageHeader(\"orderId\"));\n}\n",
|
"internalLogic" : "@Override default void execute(StateContext<String,String> context){\n System.out.println(\"Processing order: \" + context.getMessageHeader(\"orderId\"));\n}\n",
|
||||||
"lineNumber" : 31
|
"lineNumber" : 31,
|
||||||
|
"className" : "click.kamil.multi.core.OrderStateMachineConfig",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderStateMachineConfig.java"
|
||||||
} ],
|
} ],
|
||||||
"order" : null
|
"order" : null
|
||||||
}, {
|
}, {
|
||||||
@@ -354,6 +356,7 @@
|
|||||||
"event" : "SUBMIT",
|
"event" : "SUBMIT",
|
||||||
"className" : "click.kamil.multi.core.OrderController",
|
"className" : "click.kamil.multi.core.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
@@ -363,6 +366,7 @@
|
|||||||
"name" : "POST /orders/submit",
|
"name" : "POST /orders/submit",
|
||||||
"className" : "click.kamil.multi.core.OrderController",
|
"className" : "click.kamil.multi.core.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/orders/submit",
|
"path" : "/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -377,6 +381,7 @@
|
|||||||
"name" : "POST /orders/submit",
|
"name" : "POST /orders/submit",
|
||||||
"className" : "click.kamil.multi.api.OrderApi",
|
"className" : "click.kamil.multi.api.OrderApi",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "api-module/src/main/java/click/kamil/multi/api/OrderApi.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/orders/submit",
|
"path" : "/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -393,6 +398,7 @@
|
|||||||
"name" : "POST /orders/submit",
|
"name" : "POST /orders/submit",
|
||||||
"className" : "click.kamil.multi.core.OrderController",
|
"className" : "click.kamil.multi.core.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/orders/submit",
|
"path" : "/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -408,6 +414,7 @@
|
|||||||
"event" : "SUBMIT",
|
"event" : "SUBMIT",
|
||||||
"className" : "click.kamil.multi.core.OrderController",
|
"className" : "click.kamil.multi.core.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
@@ -481,10 +488,12 @@
|
|||||||
|
|
||||||
const card = document.createElement('div');
|
const card = document.createElement('div');
|
||||||
card.className = 'ep-card';
|
card.className = 'ep-card';
|
||||||
|
const sourceHint = ep.sourceFile ? `<div style="font-size:0.65rem; color:var(--text-muted); margin-top:4px; font-style:italic;">${ep.sourceFile}</div>` : '';
|
||||||
card.innerHTML = `
|
card.innerHTML = `
|
||||||
<div class="ep-type type-${ep.type.toLowerCase()}">${ep.type}</div>
|
<div class="ep-type type-${ep.type.toLowerCase()}">${ep.type}</div>
|
||||||
<div class="ep-name">${ep.name}</div>
|
<div class="ep-name">${ep.name}</div>
|
||||||
<div class="ep-fqn">${ep.className}.${ep.methodName}</div>
|
<div class="ep-fqn">${ep.className}.${ep.methodName}</div>
|
||||||
|
${sourceHint}
|
||||||
`;
|
`;
|
||||||
card.onmouseenter = () => highlightEntryPoint(ep);
|
card.onmouseenter = () => highlightEntryPoint(ep);
|
||||||
card.onmouseleave = clearHighlights;
|
card.onmouseleave = clearHighlights;
|
||||||
@@ -665,7 +674,7 @@
|
|||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
if (trans && trans.guard) {
|
if (trans && trans.guard) {
|
||||||
const lineInfo = trans.guard.lineNumber ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(Line: ${trans.guard.lineNumber})</span>` : '';
|
const lineInfo = trans.guard.lineNumber ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(${trans.guard.sourceFile || 'Source'}:${trans.guard.lineNumber})</span>` : '';
|
||||||
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Guard${lineInfo}</div>
|
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Guard${lineInfo}</div>
|
||||||
<div style="background:#f1f5f9; padding:6px; border-radius:4px; font-family:monospace; font-size:0.8rem; margin-bottom:12px; border:1px solid #e2e8f0;">${trans.guard.expression}</div>`;
|
<div style="background:#f1f5f9; padding:6px; border-radius:4px; font-family:monospace; font-size:0.8rem; margin-bottom:12px; border:1px solid #e2e8f0;">${trans.guard.expression}</div>`;
|
||||||
if (trans.guard.internalLogic) {
|
if (trans.guard.internalLogic) {
|
||||||
@@ -677,7 +686,7 @@
|
|||||||
if (trans && trans.actions && trans.actions.length > 0) {
|
if (trans && trans.actions && trans.actions.length > 0) {
|
||||||
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Actions</div>`;
|
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Actions</div>`;
|
||||||
trans.actions.forEach(action => {
|
trans.actions.forEach(action => {
|
||||||
const lineInfo = action.lineNumber ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(Line: ${action.lineNumber})</span>` : '';
|
const lineInfo = action.lineNumber ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(${action.sourceFile || 'Source'}:${action.lineNumber})</span>` : '';
|
||||||
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Action${lineInfo}</div>
|
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Action${lineInfo}</div>
|
||||||
<div style="background:#f1f5f9; padding:6px; border-radius:4px; font-family:monospace; font-size:0.8rem; margin-bottom:12px; border:1px solid #e2e8f0;">${action.expression}</div>`;
|
<div style="background:#f1f5f9; padding:6px; border-radius:4px; font-family:monospace; font-size:0.8rem; margin-bottom:12px; border:1px solid #e2e8f0;">${action.expression}</div>`;
|
||||||
if (action.internalLogic) {
|
if (action.internalLogic) {
|
||||||
@@ -690,8 +699,10 @@
|
|||||||
if (chains && chains.length > 0) {
|
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 #eee; padding-top:10px">Triggered by</div>`;
|
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:10px; border-top:1px solid #eee; padding-top:10px">Triggered by</div>`;
|
||||||
chains.forEach(c => {
|
chains.forEach(c => {
|
||||||
|
const triggerInfo = c.triggerPoint.sourceFile ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(${c.triggerPoint.sourceFile}:${c.triggerPoint.lineNumber})</span>` : '';
|
||||||
html += `<div style="margin-bottom:20px">
|
html += `<div style="margin-bottom:20px">
|
||||||
<div style="font-weight:700; font-size:0.85rem; color:var(--text);">${c.entryPoint.name}</div>
|
<div style="font-weight:700; font-size:0.85rem; color:var(--text);">${c.entryPoint.name}</div>
|
||||||
|
<div style="font-size:0.65rem; color:#64748b; font-family:monospace; margin-top:2px;">Trigger: ${c.triggerPoint.methodName}${triggerInfo}</div>
|
||||||
${renderParameters(c.entryPoint.parameters)}
|
${renderParameters(c.entryPoint.parameters)}
|
||||||
<div style="margin-left:10px; border-left:2px solid #e2e8f0; padding-left:12px; margin-top:10px">
|
<div style="margin-left:10px; border-left:2px solid #e2e8f0; padding-left:12px; margin-top:10px">
|
||||||
${c.methodChain.map((m, i) => `<div style="font-size:0.7rem; color:#475569; margin-top:4px; font-family:'JetBrains Mono', monospace;"><b>${i+1}</b> ${m}</div>`).join('')}
|
${c.methodChain.map((m, i) => `<div style="font-size:0.7rem; color:#475569; margin-top:4px; font-family:'JetBrains Mono', monospace;"><b>${i+1}</b> ${m}</div>`).join('')}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"event" : "SUBMIT",
|
"event" : "SUBMIT",
|
||||||
"className" : "click.kamil.multi.core.OrderController",
|
"className" : "click.kamil.multi.core.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
"name" : "POST /orders/submit",
|
"name" : "POST /orders/submit",
|
||||||
"className" : "click.kamil.multi.core.OrderController",
|
"className" : "click.kamil.multi.core.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/orders/submit",
|
"path" : "/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -27,6 +29,7 @@
|
|||||||
"name" : "POST /orders/submit",
|
"name" : "POST /orders/submit",
|
||||||
"className" : "click.kamil.multi.api.OrderApi",
|
"className" : "click.kamil.multi.api.OrderApi",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "api-module/src/main/java/click/kamil/multi/api/OrderApi.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/orders/submit",
|
"path" : "/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -43,6 +46,7 @@
|
|||||||
"name" : "POST /orders/submit",
|
"name" : "POST /orders/submit",
|
||||||
"className" : "click.kamil.multi.core.OrderController",
|
"className" : "click.kamil.multi.core.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/orders/submit",
|
"path" : "/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -58,6 +62,7 @@
|
|||||||
"event" : "SUBMIT",
|
"event" : "SUBMIT",
|
||||||
"className" : "click.kamil.multi.core.OrderController",
|
"className" : "click.kamil.multi.core.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
@@ -86,7 +91,9 @@
|
|||||||
"expression" : "processAction()",
|
"expression" : "processAction()",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : "@Override default void execute(StateContext<String,String> context){\n System.out.println(\"Processing order: \" + context.getMessageHeader(\"orderId\"));\n}\n",
|
"internalLogic" : "@Override default void execute(StateContext<String,String> context){\n System.out.println(\"Processing order: \" + context.getMessageHeader(\"orderId\"));\n}\n",
|
||||||
"lineNumber" : 31
|
"lineNumber" : 31,
|
||||||
|
"className" : "click.kamil.multi.core.OrderStateMachineConfig",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderStateMachineConfig.java"
|
||||||
} ],
|
} ],
|
||||||
"order" : null
|
"order" : null
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
@@ -87,9 +87,11 @@ public class AnalysisResult {
|
|||||||
ep.setName(resolver.resolveValue(ep.getName(), properties));
|
ep.setName(resolver.resolveValue(ep.getName(), properties));
|
||||||
}
|
}
|
||||||
if (ep.getMetadata() != null) {
|
if (ep.getMetadata() != null) {
|
||||||
|
Map<String, String> resolvedMeta = new java.util.HashMap<>();
|
||||||
for (var entry : ep.getMetadata().entrySet()) {
|
for (var entry : ep.getMetadata().entrySet()) {
|
||||||
entry.setValue(resolver.resolveValue(entry.getValue(), properties));
|
resolvedMeta.put(entry.getKey(), resolver.resolveValue(entry.getValue(), properties));
|
||||||
}
|
}
|
||||||
|
ep.setMetadata(resolvedMeta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public class EntryPoint {
|
|||||||
private String name; // e.g., "POST /orders" or "Kafka Topic: orders"
|
private String name; // e.g., "POST /orders" or "Kafka Topic: orders"
|
||||||
private final String className;
|
private final String className;
|
||||||
private final String methodName;
|
private final String methodName;
|
||||||
|
private final String sourceFile;
|
||||||
private Map<String, String> metadata; // e.g., path, topic, exchange
|
private Map<String, String> metadata; // e.g., path, topic, exchange
|
||||||
@Builder.Default
|
@Builder.Default
|
||||||
private final List<Parameter> parameters = java.util.Collections.emptyList();
|
private final List<Parameter> parameters = java.util.Collections.emptyList();
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ public class TriggerPoint {
|
|||||||
private String event;
|
private String event;
|
||||||
private final String className;
|
private final String className;
|
||||||
private final String methodName;
|
private final String methodName;
|
||||||
|
private final String sourceFile;
|
||||||
private final String sourceModule;
|
private final String sourceModule;
|
||||||
private final String stateMachineId; // Optional: to link to a specific SM instance
|
private final String stateMachineId; // Optional: to link to a specific SM instance
|
||||||
private final int lineNumber;
|
private final int lineNumber;
|
||||||
|
|||||||
@@ -82,40 +82,49 @@ public class SiblingDependencyResolver {
|
|||||||
Set<Path> siblings = new HashSet<>();
|
Set<Path> siblings = new HashSet<>();
|
||||||
Path pom = projectDir.resolve("pom.xml");
|
Path pom = projectDir.resolve("pom.xml");
|
||||||
if (Files.exists(pom)) {
|
if (Files.exists(pom)) {
|
||||||
|
log.info("Found pom.xml at {}", pom);
|
||||||
String content = Files.readString(pom);
|
String content = Files.readString(pom);
|
||||||
Matcher matcher = MAVEN_DEPENDENCY.matcher(content);
|
|
||||||
Set<String> targetArtifacts = new HashSet<>();
|
Set<String> targetArtifacts = new HashSet<>();
|
||||||
while (matcher.find()) {
|
Matcher matcher = Pattern.compile("<artifactId>(.*?)</artifactId>").matcher(content);
|
||||||
targetArtifacts.add(matcher.group(2)); // Just tracking artifactId for simplicity
|
// We want artifacts from the <dependencies> section
|
||||||
|
int depsStart = content.indexOf("<dependencies>");
|
||||||
|
int depsEnd = content.indexOf("</dependencies>");
|
||||||
|
if (depsStart != -1 && depsEnd > depsStart) {
|
||||||
|
String depsContent = content.substring(depsStart, depsEnd);
|
||||||
|
Matcher depMatcher = Pattern.compile("<artifactId>(.*?)</artifactId>").matcher(depsContent);
|
||||||
|
while (depMatcher.find()) {
|
||||||
|
targetArtifacts.add(depMatcher.group(1));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
log.info("Found maven target artifacts: {}", targetArtifacts);
|
||||||
|
|
||||||
if (!targetArtifacts.isEmpty()) {
|
if (!targetArtifacts.isEmpty()) {
|
||||||
Path rootDir = findMavenRoot(projectDir);
|
Path rootDir = findMavenRoot(projectDir);
|
||||||
|
log.info("Resolved Maven root to: {}", rootDir);
|
||||||
if (rootDir != null) {
|
if (rootDir != null) {
|
||||||
// Find all pom.xml files in the workspace (excluding node_modules, build, etc.)
|
|
||||||
try (Stream<Path> paths = Files.walk(rootDir)) {
|
try (Stream<Path> paths = Files.walk(rootDir)) {
|
||||||
paths.filter(p -> p.getFileName().toString().equals("pom.xml")
|
List<Path> allPoms = paths.filter(p -> p.getFileName().toString().equals("pom.xml"))
|
||||||
&& !p.toString().contains("/target/")
|
.filter(p -> !p.toString().contains("/target/"))
|
||||||
&& !p.toString().contains("/node_modules/"))
|
.collect(Collectors.toList());
|
||||||
.forEach(p -> {
|
log.info("Scanned {} total pom.xml files under {}", allPoms.size(), rootDir);
|
||||||
|
|
||||||
|
for (Path p : allPoms) {
|
||||||
try {
|
try {
|
||||||
String pContent = Files.readString(p);
|
String pContent = Files.readString(p);
|
||||||
Matcher artMatcher = Pattern.compile("<artifactId>(.*?)</artifactId>").matcher(pContent);
|
String artifactId = extractOwnArtifactId(pContent);
|
||||||
if (artMatcher.find()) {
|
log.info("Checking artifactId {} in {}", artifactId, p);
|
||||||
String artifactId = artMatcher.group(1);
|
if (artifactId != null && targetArtifacts.contains(artifactId)) {
|
||||||
if (targetArtifacts.contains(artifactId)) {
|
|
||||||
Path siblingDir = p.getParent();
|
Path siblingDir = p.getParent();
|
||||||
// Don't add ourselves
|
|
||||||
if (!siblingDir.equals(projectDir)) {
|
if (!siblingDir.equals(projectDir)) {
|
||||||
log.info("Discovered local Maven sibling dependency: {}", siblingDir);
|
log.info("Discovered local Maven sibling dependency: {}", siblingDir);
|
||||||
siblings.add(siblingDir);
|
siblings.add(siblingDir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -123,6 +132,21 @@ public class SiblingDependencyResolver {
|
|||||||
return siblings;
|
return siblings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String extractOwnArtifactId(String pomContent) {
|
||||||
|
// Strip <parent> block if it exists
|
||||||
|
String content = pomContent;
|
||||||
|
int parentEnd = pomContent.indexOf("</parent>");
|
||||||
|
if (parentEnd != -1) {
|
||||||
|
content = pomContent.substring(parentEnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
Matcher matcher = Pattern.compile("<artifactId>(.*?)</artifactId>").matcher(content);
|
||||||
|
if (matcher.find()) {
|
||||||
|
return matcher.group(1);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private Path findMavenRoot(Path start) {
|
private Path findMavenRoot(Path start) {
|
||||||
Path current = start.toAbsolutePath();
|
Path current = start.toAbsolutePath();
|
||||||
Path lastPomDir = null;
|
Path lastPomDir = null;
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ public class GenericEventDetector {
|
|||||||
.event(eventValue)
|
.event(eventValue)
|
||||||
.className(context.getFqn(type))
|
.className(context.getFqn(type))
|
||||||
.methodName(method != null ? method.getName().getIdentifier() : "initializer")
|
.methodName(method != null ? method.getName().getIdentifier() : "initializer")
|
||||||
|
.sourceFile(context.getRelativePath(context.getFqn(type)))
|
||||||
.lineNumber(cu.getLineNumber(node.getStartPosition()))
|
.lineNumber(cu.getLineNumber(node.getStartPosition()))
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,12 +26,52 @@ public class SpringMvcDetector {
|
|||||||
if (isRestController(node)) {
|
if (isRestController(node)) {
|
||||||
processController(node, entryPoints);
|
processController(node, entryPoints);
|
||||||
}
|
}
|
||||||
|
// Support WebFlux RouterFunction beans
|
||||||
|
processRouterFunctions(node, entryPoints);
|
||||||
return super.visit(node);
|
return super.visit(node);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return entryPoints;
|
return entryPoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void processRouterFunctions(TypeDeclaration td, List<EntryPoint> entryPoints) {
|
||||||
|
for (MethodDeclaration method : td.getMethods()) {
|
||||||
|
if (isBeanMethod(method) && method.getReturnType2() != null && method.getReturnType2().toString().contains("RouterFunction")) {
|
||||||
|
method.accept(new ASTVisitor() {
|
||||||
|
@Override
|
||||||
|
public boolean visit(MethodInvocation call) {
|
||||||
|
String name = call.getName().getIdentifier();
|
||||||
|
String verb = getHttpVerb(name);
|
||||||
|
if (verb != null && !call.arguments().isEmpty()) {
|
||||||
|
Expression pathArg = (Expression) call.arguments().get(0);
|
||||||
|
String path = constantResolver.resolve(pathArg, context);
|
||||||
|
if (path == null) path = pathArg.toString().replaceAll("\"", "");
|
||||||
|
|
||||||
|
entryPoints.add(EntryPoint.builder()
|
||||||
|
.type(EntryPoint.Type.REST)
|
||||||
|
.name(verb + " " + path)
|
||||||
|
.className(context.getFqn(td))
|
||||||
|
.methodName(method.getName().getIdentifier())
|
||||||
|
.sourceFile(context.getRelativePath(context.getFqn(td)))
|
||||||
|
.metadata(Map.of("path", path, "verb", verb, "style", "WebFlux Functional"))
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
return super.visit(call);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isBeanMethod(MethodDeclaration method) {
|
||||||
|
for (Object mod : method.modifiers()) {
|
||||||
|
if (mod instanceof Annotation ann && ann.getTypeName().getFullyQualifiedName().endsWith("Bean")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private boolean isRestController(TypeDeclaration node) {
|
private boolean isRestController(TypeDeclaration node) {
|
||||||
for (Object modifier : node.modifiers()) {
|
for (Object modifier : node.modifiers()) {
|
||||||
if (modifier instanceof Annotation annotation) {
|
if (modifier instanceof Annotation annotation) {
|
||||||
@@ -123,6 +163,7 @@ public class SpringMvcDetector {
|
|||||||
.name(verb + " " + fullPath)
|
.name(verb + " " + fullPath)
|
||||||
.className(context.getFqn(controller))
|
.className(context.getFqn(controller))
|
||||||
.methodName(method.getName().getIdentifier())
|
.methodName(method.getName().getIdentifier())
|
||||||
|
.sourceFile(context.getRelativePath(context.getFqn(controller)))
|
||||||
.metadata(metadata)
|
.metadata(metadata)
|
||||||
.parameters(parameters)
|
.parameters(parameters)
|
||||||
.build();
|
.build();
|
||||||
|
|||||||
@@ -7,19 +7,7 @@ import click.kamil.springstatemachineexporter.model.State;
|
|||||||
import click.kamil.springstatemachineexporter.model.Transition;
|
import click.kamil.springstatemachineexporter.model.Transition;
|
||||||
import click.kamil.springstatemachineexporter.model.TransitionType;
|
import click.kamil.springstatemachineexporter.model.TransitionType;
|
||||||
import click.kamil.springstatemachineexporter.ast.common.CodebaseContext;
|
import click.kamil.springstatemachineexporter.ast.common.CodebaseContext;
|
||||||
import org.eclipse.jdt.core.dom.ASTVisitor;
|
import org.eclipse.jdt.core.dom.*;
|
||||||
import org.eclipse.jdt.core.dom.ClassInstanceCreation;
|
|
||||||
import org.eclipse.jdt.core.dom.CompilationUnit;
|
|
||||||
import org.eclipse.jdt.core.dom.Expression;
|
|
||||||
import org.eclipse.jdt.core.dom.IMethodBinding;
|
|
||||||
import org.eclipse.jdt.core.dom.ASTNode;
|
|
||||||
import org.eclipse.jdt.core.dom.LambdaExpression;
|
|
||||||
import org.eclipse.jdt.core.dom.MethodDeclaration;
|
|
||||||
import org.eclipse.jdt.core.dom.MethodInvocation;
|
|
||||||
import org.eclipse.jdt.core.dom.SimpleName;
|
|
||||||
import org.eclipse.jdt.core.dom.ITypeBinding;
|
|
||||||
import org.eclipse.jdt.core.dom.MethodReference;
|
|
||||||
import org.eclipse.jdt.core.dom.TypeDeclaration;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@@ -290,11 +278,30 @@ public class AstTransitionParser {
|
|||||||
for (MethodDeclaration md : td.getMethods()) {
|
for (MethodDeclaration md : td.getMethods()) {
|
||||||
if (md.getName().getIdentifier().equals(binding.getName()) &&
|
if (md.getName().getIdentifier().equals(binding.getName()) &&
|
||||||
md.parameters().size() == binding.getParameterTypes().length) {
|
md.parameters().size() == binding.getParameterTypes().length) {
|
||||||
|
|
||||||
|
// Special case: if it's a getter/factory for Action/Guard, look into the return statement
|
||||||
|
if (md.getBody() != null) {
|
||||||
|
if (md.getBody().statements().size() == 1) {
|
||||||
|
Object stmt = md.getBody().statements().get(0);
|
||||||
|
if (stmt instanceof org.eclipse.jdt.core.dom.ReturnStatement rs) {
|
||||||
|
Expression retExpr = rs.getExpression();
|
||||||
|
if (isLambdaOrAnonymous(retExpr)) {
|
||||||
|
return retExpr.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return md.toString();
|
return md.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// FALLBACK: Manual resolution by name if binding failed
|
||||||
|
TypeDeclaration currentClass = findEnclosingType(mi);
|
||||||
|
if (currentClass != null) {
|
||||||
|
return resolveMethodManually(mi.getName().getIdentifier(), currentClass, context);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,12 +329,55 @@ public class AstTransitionParser {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static String resolveMethodManually(String methodName, TypeDeclaration td, CodebaseContext context) {
|
||||||
|
// Search in this class
|
||||||
|
for (MethodDeclaration md : td.getMethods()) {
|
||||||
|
if (md.getName().getIdentifier().equals(methodName)) {
|
||||||
|
// Found it. Apply the return-statement-extraction logic here too
|
||||||
|
if (md.getBody() != null && md.getBody().statements().size() == 1) {
|
||||||
|
Object stmt = md.getBody().statements().get(0);
|
||||||
|
if (stmt instanceof org.eclipse.jdt.core.dom.ReturnStatement rs) {
|
||||||
|
Expression retExpr = rs.getExpression();
|
||||||
|
if (isLambdaOrAnonymous(retExpr)) {
|
||||||
|
return retExpr.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return md.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Search in superclass
|
||||||
|
if (td.getSuperclassType() != null) {
|
||||||
|
String superName = td.getSuperclassType().toString();
|
||||||
|
// Try to resolve simple name to FQN if possible, or just search by simple name
|
||||||
|
TypeDeclaration superTd = context.getTypeDeclaration(superName);
|
||||||
|
if (superTd != null) {
|
||||||
|
return resolveMethodManually(methodName, superTd, context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static TypeDeclaration findEnclosingType(ASTNode node) {
|
||||||
|
ASTNode current = node;
|
||||||
|
while (current != null) {
|
||||||
|
if (current instanceof TypeDeclaration td) return td;
|
||||||
|
current = current.getParent();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private static void parseGuard(Object arg, Transition t, CompilationUnit cu, CodebaseContext context) {
|
private static void parseGuard(Object arg, Transition t, CompilationUnit cu, CodebaseContext context) {
|
||||||
QuotedExpression quotedExpr = QuotedExpression.of(arg);
|
QuotedExpression quotedExpr = QuotedExpression.of(arg);
|
||||||
if (quotedExpr != null) {
|
if (quotedExpr != null) {
|
||||||
String internalLogic = extractInternalLogic(quotedExpr.getExpression(), cu, context);
|
String internalLogic = extractInternalLogic(quotedExpr.getExpression(), cu, context);
|
||||||
int lineNumber = cu.getLineNumber(quotedExpr.getExpression().getStartPosition());
|
int lineNumber = cu.getLineNumber(quotedExpr.getExpression().getStartPosition());
|
||||||
t.setGuard(Guard.of(quotedExpr.toStringWithoutQuotes(), isLambdaOrAnonymous(quotedExpr.getExpression()), internalLogic, lineNumber));
|
TypeDeclaration td = findEnclosingType(quotedExpr.getExpression());
|
||||||
|
String fqn = td != null ? context.getFqn(td) : null;
|
||||||
|
String sourceFile = fqn != null ? context.getRelativePath(fqn) : null;
|
||||||
|
t.setGuard(Guard.of(quotedExpr.toStringWithoutQuotes(), isLambdaOrAnonymous(quotedExpr.getExpression()), internalLogic, lineNumber, fqn, sourceFile));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,7 +386,10 @@ public class AstTransitionParser {
|
|||||||
if (quotedExpr != null) {
|
if (quotedExpr != null) {
|
||||||
String internalLogic = extractInternalLogic(quotedExpr.getExpression(), cu, context);
|
String internalLogic = extractInternalLogic(quotedExpr.getExpression(), cu, context);
|
||||||
int lineNumber = cu.getLineNumber(quotedExpr.getExpression().getStartPosition());
|
int lineNumber = cu.getLineNumber(quotedExpr.getExpression().getStartPosition());
|
||||||
t.getActions().add(Action.of(quotedExpr.toStringWithoutQuotes(), isLambdaOrAnonymous(quotedExpr.getExpression()), internalLogic, lineNumber));
|
TypeDeclaration td = findEnclosingType(quotedExpr.getExpression());
|
||||||
|
String fqn = td != null ? context.getFqn(td) : null;
|
||||||
|
String sourceFile = fqn != null ? context.getRelativePath(fqn) : null;
|
||||||
|
t.getActions().add(Action.of(quotedExpr.toStringWithoutQuotes(), isLambdaOrAnonymous(quotedExpr.getExpression()), internalLogic, lineNumber, fqn, sourceFile));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ import java.util.HashSet;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
public class CodebaseContext {
|
public class CodebaseContext {
|
||||||
private final Map<String, CompilationUnit> classes = new HashMap<>();
|
private final Map<String, CompilationUnit> classes = new HashMap<>();
|
||||||
private final Map<String, Path> classPaths = new HashMap<>();
|
private final Map<String, Path> classPaths = new HashMap<>();
|
||||||
@@ -30,6 +32,23 @@ public class CodebaseContext {
|
|||||||
private Map<String, Map<String, String>> allProperties = new HashMap<>();
|
private Map<String, Map<String, String>> allProperties = new HashMap<>();
|
||||||
private List<LibraryHint> libraryHints = new ArrayList<>();
|
private List<LibraryHint> libraryHints = new ArrayList<>();
|
||||||
private final ObjectMapper objectMapper = new ObjectMapper();
|
private final ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
private Path projectRoot;
|
||||||
|
|
||||||
|
public void setProjectRoot(Path root) {
|
||||||
|
this.projectRoot = root;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRelativePath(Path fullPath) {
|
||||||
|
if (projectRoot != null && fullPath.isAbsolute() && fullPath.startsWith(projectRoot)) {
|
||||||
|
return projectRoot.relativize(fullPath).toString();
|
||||||
|
}
|
||||||
|
return fullPath.getFileName().toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRelativePath(String fqn) {
|
||||||
|
Path path = classPaths.get(fqn);
|
||||||
|
return path != null ? getRelativePath(path) : null;
|
||||||
|
}
|
||||||
|
|
||||||
public void loadLibraryHints(Path hintsFile) throws IOException {
|
public void loadLibraryHints(Path hintsFile) throws IOException {
|
||||||
if (Files.exists(hintsFile)) {
|
if (Files.exists(hintsFile)) {
|
||||||
@@ -83,9 +102,10 @@ public class CodebaseContext {
|
|||||||
activeIgnore.addAll(customIgnorePatterns);
|
activeIgnore.addAll(customIgnorePatterns);
|
||||||
|
|
||||||
List<Path> javaFiles = FileUtils.findFilesWithExtension(rootDirs, ".java", activeIgnore);
|
List<Path> javaFiles = FileUtils.findFilesWithExtension(rootDirs, ".java", activeIgnore);
|
||||||
|
log.info("CodebaseContext found {} java files across {} root directories", javaFiles.size(), rootDirs.size());
|
||||||
for (Path javaFile : javaFiles) {
|
for (Path javaFile : javaFiles) {
|
||||||
String source = Files.readString(javaFile);
|
String source = Files.readString(javaFile);
|
||||||
CompilationUnit cu = parse(source, javaFile.getFileName().toString());
|
CompilationUnit cu = parse(source, javaFile.toAbsolutePath().toString());
|
||||||
allCus.add(cu);
|
allCus.add(cu);
|
||||||
|
|
||||||
String packageName = cu.getPackage() != null ? cu.getPackage().getName().getFullyQualifiedName() : "";
|
String packageName = cu.getPackage() != null ? cu.getPackage().getName().getFullyQualifiedName() : "";
|
||||||
@@ -97,9 +117,9 @@ public class CodebaseContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void indexType(TypeDeclaration td, String packageName, Path javaFile) {
|
private void indexType(TypeDeclaration td, String parentFqn, Path javaFile) {
|
||||||
String simpleName = td.getName().getIdentifier();
|
String simpleName = td.getName().getIdentifier();
|
||||||
String fqn = packageName.isEmpty() ? simpleName : packageName + "." + simpleName;
|
String fqn = parentFqn.isEmpty() ? simpleName : parentFqn + "." + simpleName;
|
||||||
|
|
||||||
classes.put(fqn, (CompilationUnit) td.getRoot());
|
classes.put(fqn, (CompilationUnit) td.getRoot());
|
||||||
classPaths.put(fqn, javaFile);
|
classPaths.put(fqn, javaFile);
|
||||||
@@ -118,6 +138,13 @@ public class CodebaseContext {
|
|||||||
String itfName = itf.toString();
|
String itfName = itf.toString();
|
||||||
interfaceToImpls.computeIfAbsent(itfName, k -> new ArrayList<>()).add(fqn);
|
interfaceToImpls.computeIfAbsent(itfName, k -> new ArrayList<>()).add(fqn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Recursively index nested types
|
||||||
|
for (Object type : td.getTypes()) {
|
||||||
|
if (type instanceof TypeDeclaration nestedTd) {
|
||||||
|
indexType(nestedTd, fqn, javaFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getImplementations(String interfaceName) {
|
public List<String> getImplementations(String interfaceName) {
|
||||||
@@ -320,25 +347,38 @@ public class CodebaseContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getFqn(TypeDeclaration td) {
|
public String getFqn(TypeDeclaration td) {
|
||||||
|
StringBuilder sb = new StringBuilder(td.getName().getIdentifier());
|
||||||
|
ASTNode current = td.getParent();
|
||||||
|
while (current instanceof TypeDeclaration parent) {
|
||||||
|
sb.insert(0, parent.getName().getIdentifier() + ".");
|
||||||
|
current = parent.getParent();
|
||||||
|
}
|
||||||
|
|
||||||
CompilationUnit cu = (CompilationUnit) td.getRoot();
|
CompilationUnit cu = (CompilationUnit) td.getRoot();
|
||||||
String packageName = cu.getPackage() != null ? cu.getPackage().getName().getFullyQualifiedName() : "";
|
String packageName = cu.getPackage() != null ? cu.getPackage().getName().getFullyQualifiedName() : "";
|
||||||
String simpleName = td.getName().getIdentifier();
|
String fqn = sb.toString();
|
||||||
return packageName.isEmpty() ? simpleName : packageName + "." + simpleName;
|
return packageName.isEmpty() ? fqn : packageName + "." + fqn;
|
||||||
}
|
}
|
||||||
|
|
||||||
private TypeDeclaration findTypeInCu(CompilationUnit cu, String fqn) {
|
private TypeDeclaration findTypeInCu(CompilationUnit cu, String fqn) {
|
||||||
String packageName = cu.getPackage() != null ? cu.getPackage().getName().getFullyQualifiedName() : "";
|
|
||||||
for (Object type : cu.types()) {
|
for (Object type : cu.types()) {
|
||||||
if (type instanceof TypeDeclaration td) {
|
if (type instanceof TypeDeclaration td) {
|
||||||
String simpleName = td.getName().getIdentifier();
|
TypeDeclaration found = findNestedType(td, fqn);
|
||||||
String typeFqn = packageName.isEmpty() ? simpleName : packageName + "." + simpleName;
|
if (found != null) return found;
|
||||||
if (typeFqn.equals(fqn))
|
|
||||||
return td;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private TypeDeclaration findNestedType(TypeDeclaration td, String targetFqn) {
|
||||||
|
if (getFqn(td).equals(targetFqn)) return td;
|
||||||
|
for (TypeDeclaration nested : td.getTypes()) {
|
||||||
|
TypeDeclaration found = findNestedType(nested, targetFqn);
|
||||||
|
if (found != null) return found;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public Path getPath(String className) {
|
public Path getPath(String className) {
|
||||||
return classPaths.get(className);
|
return classPaths.get(className);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package click.kamil.springstatemachineexporter.model;
|
package click.kamil.springstatemachineexporter.model;
|
||||||
|
|
||||||
public record Action(String expression, boolean isLambda, String internalLogic, Integer lineNumber) {
|
public record Action(String expression, boolean isLambda, String internalLogic, Integer lineNumber, String className, String sourceFile) {
|
||||||
public static Action of(String expression, boolean isLambda, String internalLogic, Integer lineNumber) {
|
public static Action of(String expression, boolean isLambda, String internalLogic, Integer lineNumber, String className, String sourceFile) {
|
||||||
return expression != null ? new Action(expression, isLambda, internalLogic, lineNumber) : null;
|
return expression != null ? new Action(expression, isLambda, internalLogic, lineNumber, className, sourceFile) : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package click.kamil.springstatemachineexporter.model;
|
package click.kamil.springstatemachineexporter.model;
|
||||||
|
|
||||||
public record Guard(String expression, boolean isLambda, String internalLogic, Integer lineNumber) {
|
public record Guard(String expression, boolean isLambda, String internalLogic, Integer lineNumber, String className, String sourceFile) {
|
||||||
public static Guard of(String expression, boolean isLambda, String internalLogic, Integer lineNumber) {
|
public static Guard of(String expression, boolean isLambda, String internalLogic, Integer lineNumber, String className, String sourceFile) {
|
||||||
return expression != null ? new Guard(expression, isLambda, internalLogic, lineNumber) : null;
|
return expression != null ? new Guard(expression, isLambda, internalLogic, lineNumber, className, sourceFile) : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,10 +68,23 @@ public class ExportService {
|
|||||||
allPaths.add(inputDir);
|
allPaths.add(inputDir);
|
||||||
allPaths.addAll(siblingResolver.resolveSiblings(inputDir));
|
allPaths.addAll(siblingResolver.resolveSiblings(inputDir));
|
||||||
|
|
||||||
context.setSourcepath(allPaths.stream()
|
// Find project root (common ancestor)
|
||||||
|
Path projectRoot = inputDir.toAbsolutePath();
|
||||||
|
for (Path p : allPaths) {
|
||||||
|
Path ap = p.toAbsolutePath();
|
||||||
|
while (projectRoot != null && !ap.startsWith(projectRoot)) {
|
||||||
|
projectRoot = projectRoot.getParent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
context.setProjectRoot(projectRoot);
|
||||||
|
log.info("Project root resolved to: {}", projectRoot);
|
||||||
|
|
||||||
|
List<String> sourcepaths = allPaths.stream()
|
||||||
.map(p -> p.resolve("src/main/java").toString())
|
.map(p -> p.resolve("src/main/java").toString())
|
||||||
.filter(p -> Files.exists(Path.of(p)))
|
.filter(p -> Files.exists(Path.of(p)))
|
||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList());
|
||||||
|
log.info("Setting JDT sourcepath: {}", sourcepaths);
|
||||||
|
context.setSourcepath(sourcepaths);
|
||||||
context.setResolveBindings(true);
|
context.setResolveBindings(true);
|
||||||
|
|
||||||
Path hintsFile = inputDir.resolve("hints.json");
|
Path hintsFile = inputDir.resolve("hints.json");
|
||||||
|
|||||||
@@ -131,6 +131,12 @@ public class RegressionTest {
|
|||||||
root.resolve("state_machines/multi_module_sample/core-module"),
|
root.resolve("state_machines/multi_module_sample/core-module"),
|
||||||
Path.of("src/test/resources/golden/OrderStateMachineConfig"),
|
Path.of("src/test/resources/golden/OrderStateMachineConfig"),
|
||||||
"OrderStateMachineConfig"
|
"OrderStateMachineConfig"
|
||||||
|
),
|
||||||
|
new TestScenario(
|
||||||
|
"Maven Multi-Module Sample",
|
||||||
|
root.resolve("state_machines/maven_multi_module/core-module"),
|
||||||
|
Path.of("src/test/resources/golden/MavenOrderStateMachine"),
|
||||||
|
"MavenOrderStateMachine"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -236,8 +236,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value1\")",
|
"expression" : "guardVarEquals(\"value1\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 86
|
"lineNumber" : 86,
|
||||||
|
"className" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/complex/ComplexStateMachineConfig.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -255,8 +257,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value2\")",
|
"expression" : "guardVarEquals(\"value2\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 87
|
"lineNumber" : 87,
|
||||||
|
"className" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/complex/ComplexStateMachineConfig.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -288,8 +292,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 92
|
"lineNumber" : 92,
|
||||||
|
"className" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/complex/ComplexStateMachineConfig.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -321,8 +327,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value3\")",
|
"expression" : "guardVarEquals(\"value3\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 97
|
"lineNumber" : 97,
|
||||||
|
"className" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/complex/ComplexStateMachineConfig.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -354,8 +362,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"reset\")",
|
"expression" : "guardVarEquals(\"reset\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 102
|
"lineNumber" : 102,
|
||||||
|
"className" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/complex/ComplexStateMachineConfig.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -387,8 +397,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header2\",\"bar\")",
|
"expression" : "guardEventHeaderEquals(\"header2\",\"bar\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 107
|
"lineNumber" : 107,
|
||||||
|
"className" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/complex/ComplexStateMachineConfig.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -420,8 +432,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goTo13\")",
|
"expression" : "guardVarEquals(\"goTo13\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 112
|
"lineNumber" : 112,
|
||||||
|
"className" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/complex/ComplexStateMachineConfig.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -439,8 +453,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goTo14\")",
|
"expression" : "guardVarEquals(\"goTo14\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 113
|
"lineNumber" : 113,
|
||||||
|
"className" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/complex/ComplexStateMachineConfig.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -472,8 +488,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goBack10\")",
|
"expression" : "guardVarEquals(\"goBack10\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 118
|
"lineNumber" : 118,
|
||||||
|
"className" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/complex/ComplexStateMachineConfig.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -505,8 +523,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"loop12\")",
|
"expression" : "guardVarEquals(\"loop12\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 123
|
"lineNumber" : 123,
|
||||||
|
"className" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/complex/ComplexStateMachineConfig.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -538,8 +558,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBack\")",
|
"expression" : "guardVarEquals(\"stepBack\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 128
|
"lineNumber" : 128,
|
||||||
|
"className" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/complex/ComplexStateMachineConfig.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -557,8 +579,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBackMore\")",
|
"expression" : "guardVarEquals(\"stepBackMore\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 129
|
"lineNumber" : 129,
|
||||||
|
"className" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/complex/ComplexStateMachineConfig.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -590,8 +614,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"forward9\")",
|
"expression" : "guardVarEquals(\"forward9\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 134
|
"lineNumber" : 134,
|
||||||
|
"className" : "click.kamil.examples.statemachine.complex.ComplexStateMachineConfig",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/complex/ComplexStateMachineConfig.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"event" : "AUDIT_EVENT",
|
"event" : "AUDIT_EVENT",
|
||||||
"className" : "click.kamil.examples.enterprise.api.SecurityInterceptor",
|
"className" : "click.kamil.examples.enterprise.api.SecurityInterceptor",
|
||||||
"methodName" : "preHandle",
|
"methodName" : "preHandle",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/SecurityInterceptor.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 17
|
"lineNumber" : 17
|
||||||
@@ -11,6 +12,7 @@
|
|||||||
"event" : "PLACE_ORDER",
|
"event" : "PLACE_ORDER",
|
||||||
"className" : "click.kamil.examples.enterprise.service.OrderServiceImpl",
|
"className" : "click.kamil.examples.enterprise.service.OrderServiceImpl",
|
||||||
"methodName" : "place",
|
"methodName" : "place",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 16
|
"lineNumber" : 16
|
||||||
@@ -18,6 +20,7 @@
|
|||||||
"event" : "CANCEL_ORDER",
|
"event" : "CANCEL_ORDER",
|
||||||
"className" : "click.kamil.examples.enterprise.service.OrderServiceImpl",
|
"className" : "click.kamil.examples.enterprise.service.OrderServiceImpl",
|
||||||
"methodName" : "cancel",
|
"methodName" : "cancel",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 21
|
"lineNumber" : 21
|
||||||
@@ -25,6 +28,7 @@
|
|||||||
"event" : "PAY_ORDER",
|
"event" : "PAY_ORDER",
|
||||||
"className" : "click.kamil.examples.enterprise.service.ReactivePaymentService",
|
"className" : "click.kamil.examples.enterprise.service.ReactivePaymentService",
|
||||||
"methodName" : "processPayment",
|
"methodName" : "processPayment",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/ReactivePaymentService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
@@ -32,6 +36,7 @@
|
|||||||
"event" : "SHIP_ORDER",
|
"event" : "SHIP_ORDER",
|
||||||
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
|
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
|
||||||
"methodName" : "onShippingReady",
|
"methodName" : "onShippingReady",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ShippingJmsListener.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 17
|
"lineNumber" : 17
|
||||||
@@ -39,6 +44,7 @@
|
|||||||
"event" : "RETURN_ORDER",
|
"event" : "RETURN_ORDER",
|
||||||
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
|
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
|
||||||
"methodName" : "onReturn",
|
"methodName" : "onReturn",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ReturnsRabbitListener.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 17
|
"lineNumber" : 17
|
||||||
@@ -48,6 +54,7 @@
|
|||||||
"name" : "POST /api/enterprise/orders/place",
|
"name" : "POST /api/enterprise/orders/place",
|
||||||
"className" : "click.kamil.examples.enterprise.api.OrderApi",
|
"className" : "click.kamil.examples.enterprise.api.OrderApi",
|
||||||
"methodName" : "placeOrder",
|
"methodName" : "placeOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/OrderApi.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/enterprise/orders/place",
|
"path" : "/api/enterprise/orders/place",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -58,6 +65,7 @@
|
|||||||
"name" : "POST /api/enterprise/orders/{id}/cancel",
|
"name" : "POST /api/enterprise/orders/{id}/cancel",
|
||||||
"className" : "click.kamil.examples.enterprise.api.OrderApi",
|
"className" : "click.kamil.examples.enterprise.api.OrderApi",
|
||||||
"methodName" : "cancelOrder",
|
"methodName" : "cancelOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/OrderApi.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/enterprise/orders/{id}/cancel",
|
"path" : "/api/enterprise/orders/{id}/cancel",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -72,6 +80,7 @@
|
|||||||
"name" : "POST /api/enterprise/orders/place",
|
"name" : "POST /api/enterprise/orders/place",
|
||||||
"className" : "click.kamil.examples.enterprise.api.OrderController",
|
"className" : "click.kamil.examples.enterprise.api.OrderController",
|
||||||
"methodName" : "placeOrder",
|
"methodName" : "placeOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/enterprise/orders/place",
|
"path" : "/api/enterprise/orders/place",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -82,6 +91,7 @@
|
|||||||
"name" : "POST /api/enterprise/orders/{id}/cancel",
|
"name" : "POST /api/enterprise/orders/{id}/cancel",
|
||||||
"className" : "click.kamil.examples.enterprise.api.OrderController",
|
"className" : "click.kamil.examples.enterprise.api.OrderController",
|
||||||
"methodName" : "cancelOrder",
|
"methodName" : "cancelOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/enterprise/orders/{id}/cancel",
|
"path" : "/api/enterprise/orders/{id}/cancel",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -96,6 +106,7 @@
|
|||||||
"name" : "INTERCEPTOR: SecurityInterceptor.preHandle",
|
"name" : "INTERCEPTOR: SecurityInterceptor.preHandle",
|
||||||
"className" : "click.kamil.examples.enterprise.api.SecurityInterceptor",
|
"className" : "click.kamil.examples.enterprise.api.SecurityInterceptor",
|
||||||
"methodName" : "preHandle",
|
"methodName" : "preHandle",
|
||||||
|
"sourceFile" : null,
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"interceptorType" : "Spring MVC Interceptor"
|
"interceptorType" : "Spring MVC Interceptor"
|
||||||
},
|
},
|
||||||
@@ -105,6 +116,7 @@
|
|||||||
"name" : "POST /api/enterprise/payments",
|
"name" : "POST /api/enterprise/payments",
|
||||||
"className" : "click.kamil.examples.enterprise.api.ReactivePaymentController",
|
"className" : "click.kamil.examples.enterprise.api.ReactivePaymentController",
|
||||||
"methodName" : "pay",
|
"methodName" : "pay",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/ReactivePaymentController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/enterprise/payments",
|
"path" : "/api/enterprise/payments",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -119,6 +131,7 @@
|
|||||||
"name" : "JMS: shipping.queue",
|
"name" : "JMS: shipping.queue",
|
||||||
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
|
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
|
||||||
"methodName" : "onShippingReady",
|
"methodName" : "onShippingReady",
|
||||||
|
"sourceFile" : null,
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"protocol" : "JMS",
|
"protocol" : "JMS",
|
||||||
"destination" : "shipping.queue"
|
"destination" : "shipping.queue"
|
||||||
@@ -133,6 +146,7 @@
|
|||||||
"name" : "RABBIT: returns.queue",
|
"name" : "RABBIT: returns.queue",
|
||||||
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
|
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
|
||||||
"methodName" : "onReturn",
|
"methodName" : "onReturn",
|
||||||
|
"sourceFile" : null,
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"protocol" : "RABBIT",
|
"protocol" : "RABBIT",
|
||||||
"destination" : "returns.queue"
|
"destination" : "returns.queue"
|
||||||
@@ -149,6 +163,7 @@
|
|||||||
"name" : "POST /api/enterprise/orders/place",
|
"name" : "POST /api/enterprise/orders/place",
|
||||||
"className" : "click.kamil.examples.enterprise.api.OrderController",
|
"className" : "click.kamil.examples.enterprise.api.OrderController",
|
||||||
"methodName" : "placeOrder",
|
"methodName" : "placeOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/enterprise/orders/place",
|
"path" : "/api/enterprise/orders/place",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -160,6 +175,7 @@
|
|||||||
"event" : "PLACE_ORDER",
|
"event" : "PLACE_ORDER",
|
||||||
"className" : "click.kamil.examples.enterprise.service.OrderServiceImpl",
|
"className" : "click.kamil.examples.enterprise.service.OrderServiceImpl",
|
||||||
"methodName" : "place",
|
"methodName" : "place",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 16
|
"lineNumber" : 16
|
||||||
@@ -170,6 +186,7 @@
|
|||||||
"name" : "POST /api/enterprise/orders/{id}/cancel",
|
"name" : "POST /api/enterprise/orders/{id}/cancel",
|
||||||
"className" : "click.kamil.examples.enterprise.api.OrderController",
|
"className" : "click.kamil.examples.enterprise.api.OrderController",
|
||||||
"methodName" : "cancelOrder",
|
"methodName" : "cancelOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/enterprise/orders/{id}/cancel",
|
"path" : "/api/enterprise/orders/{id}/cancel",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -185,6 +202,7 @@
|
|||||||
"event" : "CANCEL_ORDER",
|
"event" : "CANCEL_ORDER",
|
||||||
"className" : "click.kamil.examples.enterprise.service.OrderServiceImpl",
|
"className" : "click.kamil.examples.enterprise.service.OrderServiceImpl",
|
||||||
"methodName" : "cancel",
|
"methodName" : "cancel",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/OrderServiceImpl.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 21
|
"lineNumber" : 21
|
||||||
@@ -195,6 +213,7 @@
|
|||||||
"name" : "INTERCEPTOR: SecurityInterceptor.preHandle",
|
"name" : "INTERCEPTOR: SecurityInterceptor.preHandle",
|
||||||
"className" : "click.kamil.examples.enterprise.api.SecurityInterceptor",
|
"className" : "click.kamil.examples.enterprise.api.SecurityInterceptor",
|
||||||
"methodName" : "preHandle",
|
"methodName" : "preHandle",
|
||||||
|
"sourceFile" : null,
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"interceptorType" : "Spring MVC Interceptor"
|
"interceptorType" : "Spring MVC Interceptor"
|
||||||
},
|
},
|
||||||
@@ -205,6 +224,7 @@
|
|||||||
"event" : "AUDIT_EVENT",
|
"event" : "AUDIT_EVENT",
|
||||||
"className" : "click.kamil.examples.enterprise.api.SecurityInterceptor",
|
"className" : "click.kamil.examples.enterprise.api.SecurityInterceptor",
|
||||||
"methodName" : "preHandle",
|
"methodName" : "preHandle",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/SecurityInterceptor.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 17
|
"lineNumber" : 17
|
||||||
@@ -215,6 +235,7 @@
|
|||||||
"name" : "POST /api/enterprise/payments",
|
"name" : "POST /api/enterprise/payments",
|
||||||
"className" : "click.kamil.examples.enterprise.api.ReactivePaymentController",
|
"className" : "click.kamil.examples.enterprise.api.ReactivePaymentController",
|
||||||
"methodName" : "pay",
|
"methodName" : "pay",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/api/ReactivePaymentController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/enterprise/payments",
|
"path" : "/api/enterprise/payments",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -230,6 +251,7 @@
|
|||||||
"event" : "PAY_ORDER",
|
"event" : "PAY_ORDER",
|
||||||
"className" : "click.kamil.examples.enterprise.service.ReactivePaymentService",
|
"className" : "click.kamil.examples.enterprise.service.ReactivePaymentService",
|
||||||
"methodName" : "processPayment",
|
"methodName" : "processPayment",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/service/ReactivePaymentService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
@@ -240,6 +262,7 @@
|
|||||||
"name" : "JMS: shipping.queue",
|
"name" : "JMS: shipping.queue",
|
||||||
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
|
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
|
||||||
"methodName" : "onShippingReady",
|
"methodName" : "onShippingReady",
|
||||||
|
"sourceFile" : null,
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"protocol" : "JMS",
|
"protocol" : "JMS",
|
||||||
"destination" : "shipping.queue"
|
"destination" : "shipping.queue"
|
||||||
@@ -255,6 +278,7 @@
|
|||||||
"event" : "SHIP_ORDER",
|
"event" : "SHIP_ORDER",
|
||||||
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
|
"className" : "click.kamil.examples.enterprise.messaging.ShippingJmsListener",
|
||||||
"methodName" : "onShippingReady",
|
"methodName" : "onShippingReady",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ShippingJmsListener.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 17
|
"lineNumber" : 17
|
||||||
@@ -265,6 +289,7 @@
|
|||||||
"name" : "RABBIT: returns.queue",
|
"name" : "RABBIT: returns.queue",
|
||||||
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
|
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
|
||||||
"methodName" : "onReturn",
|
"methodName" : "onReturn",
|
||||||
|
"sourceFile" : null,
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"protocol" : "RABBIT",
|
"protocol" : "RABBIT",
|
||||||
"destination" : "returns.queue"
|
"destination" : "returns.queue"
|
||||||
@@ -280,6 +305,7 @@
|
|||||||
"event" : "RETURN_ORDER",
|
"event" : "RETURN_ORDER",
|
||||||
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
|
"className" : "click.kamil.examples.enterprise.messaging.ReturnsRabbitListener",
|
||||||
"methodName" : "onReturn",
|
"methodName" : "onReturn",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/messaging/ReturnsRabbitListener.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 17
|
"lineNumber" : 17
|
||||||
@@ -321,7 +347,9 @@
|
|||||||
"expression" : "(c) -> true",
|
"expression" : "(c) -> true",
|
||||||
"isLambda" : true,
|
"isLambda" : true,
|
||||||
"internalLogic" : "(c) -> true",
|
"internalLogic" : "(c) -> true",
|
||||||
"lineNumber" : 41
|
"lineNumber" : 41,
|
||||||
|
"className" : "click.kamil.examples.enterprise.config.EnterpriseStateMachineConfig",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/enterprise/config/EnterpriseStateMachineConfig.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"event" : "FINISH",
|
"event" : "FINISH",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "finishOrder",
|
"methodName" : "finishOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 34
|
"lineNumber" : 34
|
||||||
@@ -11,6 +12,7 @@
|
|||||||
"event" : "AUDIT_EVENT",
|
"event" : "AUDIT_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
||||||
"methodName" : "preHandle",
|
"methodName" : "preHandle",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/AuditInterceptor.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 16
|
"lineNumber" : 16
|
||||||
@@ -18,6 +20,7 @@
|
|||||||
"event" : "EXTERNAL_TRIGGER",
|
"event" : "EXTERNAL_TRIGGER",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "processSubmit",
|
"methodName" : "processSubmit",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 19
|
"lineNumber" : 19
|
||||||
@@ -25,6 +28,7 @@
|
|||||||
"event" : "SUBMIT_EVENT",
|
"event" : "SUBMIT_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "processSubmit",
|
"methodName" : "processSubmit",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 20
|
"lineNumber" : 20
|
||||||
@@ -32,6 +36,7 @@
|
|||||||
"event" : "CANCEL_EVENT",
|
"event" : "CANCEL_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "processCancel",
|
"methodName" : "processCancel",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 25
|
"lineNumber" : 25
|
||||||
@@ -39,6 +44,7 @@
|
|||||||
"event" : "[LIFECYCLE:RESTORE]",
|
"event" : "[LIFECYCLE:RESTORE]",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "resumeOrder",
|
"methodName" : "resumeOrder",
|
||||||
|
"sourceFile" : null,
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 29
|
"lineNumber" : 29
|
||||||
@@ -46,6 +52,7 @@
|
|||||||
"event" : "REACTIVE_EVENT",
|
"event" : "REACTIVE_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.ReactiveOrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.ReactiveOrderService",
|
||||||
"methodName" : "processReactive",
|
"methodName" : "processReactive",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/ReactiveOrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
@@ -55,6 +62,7 @@
|
|||||||
"name" : "POST /api/orders/submit",
|
"name" : "POST /api/orders/submit",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/submit",
|
"path" : "/api/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -65,6 +73,7 @@
|
|||||||
"name" : "POST /api/orders/cancel",
|
"name" : "POST /api/orders/cancel",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "cancelOrder",
|
"methodName" : "cancelOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/cancel",
|
"path" : "/api/orders/cancel",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -75,6 +84,7 @@
|
|||||||
"name" : "POST /api/orders/finish",
|
"name" : "POST /api/orders/finish",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "finishOrder",
|
"methodName" : "finishOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/finish",
|
"path" : "/api/orders/finish",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -85,6 +95,7 @@
|
|||||||
"name" : "POST /api/orders/resume",
|
"name" : "POST /api/orders/resume",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "resumeOrder",
|
"methodName" : "resumeOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/resume",
|
"path" : "/api/orders/resume",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -99,6 +110,7 @@
|
|||||||
"name" : "POST /api/orders/reactive",
|
"name" : "POST /api/orders/reactive",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "reactiveOrder",
|
"methodName" : "reactiveOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/reactive",
|
"path" : "/api/orders/reactive",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -113,6 +125,7 @@
|
|||||||
"name" : "INTERCEPTOR: AuditInterceptor.preHandle",
|
"name" : "INTERCEPTOR: AuditInterceptor.preHandle",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
||||||
"methodName" : "preHandle",
|
"methodName" : "preHandle",
|
||||||
|
"sourceFile" : null,
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"interceptorType" : "Spring MVC Interceptor"
|
"interceptorType" : "Spring MVC Interceptor"
|
||||||
},
|
},
|
||||||
@@ -124,6 +137,7 @@
|
|||||||
"name" : "POST /api/orders/submit",
|
"name" : "POST /api/orders/submit",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/submit",
|
"path" : "/api/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -135,6 +149,7 @@
|
|||||||
"event" : "EXTERNAL_TRIGGER",
|
"event" : "EXTERNAL_TRIGGER",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "processSubmit",
|
"methodName" : "processSubmit",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 19
|
"lineNumber" : 19
|
||||||
@@ -145,6 +160,7 @@
|
|||||||
"name" : "POST /api/orders/submit",
|
"name" : "POST /api/orders/submit",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/submit",
|
"path" : "/api/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -156,6 +172,7 @@
|
|||||||
"event" : "SUBMIT_EVENT",
|
"event" : "SUBMIT_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "processSubmit",
|
"methodName" : "processSubmit",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 20
|
"lineNumber" : 20
|
||||||
@@ -166,6 +183,7 @@
|
|||||||
"name" : "POST /api/orders/cancel",
|
"name" : "POST /api/orders/cancel",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "cancelOrder",
|
"methodName" : "cancelOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/cancel",
|
"path" : "/api/orders/cancel",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -177,6 +195,7 @@
|
|||||||
"event" : "CANCEL_EVENT",
|
"event" : "CANCEL_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "processCancel",
|
"methodName" : "processCancel",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 25
|
"lineNumber" : 25
|
||||||
@@ -187,6 +206,7 @@
|
|||||||
"name" : "POST /api/orders/finish",
|
"name" : "POST /api/orders/finish",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "finishOrder",
|
"methodName" : "finishOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/finish",
|
"path" : "/api/orders/finish",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -198,6 +218,7 @@
|
|||||||
"event" : "FINISH",
|
"event" : "FINISH",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "finishOrder",
|
"methodName" : "finishOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 34
|
"lineNumber" : 34
|
||||||
@@ -208,6 +229,7 @@
|
|||||||
"name" : "POST /api/orders/resume",
|
"name" : "POST /api/orders/resume",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "resumeOrder",
|
"methodName" : "resumeOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/resume",
|
"path" : "/api/orders/resume",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -223,6 +245,7 @@
|
|||||||
"event" : "[LIFECYCLE:RESTORE]",
|
"event" : "[LIFECYCLE:RESTORE]",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "resumeOrder",
|
"methodName" : "resumeOrder",
|
||||||
|
"sourceFile" : null,
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 29
|
"lineNumber" : 29
|
||||||
@@ -233,6 +256,7 @@
|
|||||||
"name" : "POST /api/orders/reactive",
|
"name" : "POST /api/orders/reactive",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "reactiveOrder",
|
"methodName" : "reactiveOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/reactive",
|
"path" : "/api/orders/reactive",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -248,6 +272,7 @@
|
|||||||
"event" : "REACTIVE_EVENT",
|
"event" : "REACTIVE_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.ReactiveOrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.ReactiveOrderService",
|
||||||
"methodName" : "processReactive",
|
"methodName" : "processReactive",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/ReactiveOrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
@@ -258,6 +283,7 @@
|
|||||||
"name" : "INTERCEPTOR: AuditInterceptor.preHandle",
|
"name" : "INTERCEPTOR: AuditInterceptor.preHandle",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
||||||
"methodName" : "preHandle",
|
"methodName" : "preHandle",
|
||||||
|
"sourceFile" : null,
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"interceptorType" : "Spring MVC Interceptor"
|
"interceptorType" : "Spring MVC Interceptor"
|
||||||
},
|
},
|
||||||
@@ -268,6 +294,7 @@
|
|||||||
"event" : "AUDIT_EVENT",
|
"event" : "AUDIT_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
||||||
"methodName" : "preHandle",
|
"methodName" : "preHandle",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/AuditInterceptor.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 16
|
"lineNumber" : 16
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"event" : "FINISH",
|
"event" : "FINISH",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "finishOrder",
|
"methodName" : "finishOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 34
|
"lineNumber" : 34
|
||||||
@@ -11,6 +12,7 @@
|
|||||||
"event" : "AUDIT_EVENT",
|
"event" : "AUDIT_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
||||||
"methodName" : "preHandle",
|
"methodName" : "preHandle",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/AuditInterceptor.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 16
|
"lineNumber" : 16
|
||||||
@@ -18,6 +20,7 @@
|
|||||||
"event" : "EXTERNAL_TRIGGER",
|
"event" : "EXTERNAL_TRIGGER",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "processSubmit",
|
"methodName" : "processSubmit",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 19
|
"lineNumber" : 19
|
||||||
@@ -25,6 +28,7 @@
|
|||||||
"event" : "SUBMIT_EVENT",
|
"event" : "SUBMIT_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "processSubmit",
|
"methodName" : "processSubmit",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 20
|
"lineNumber" : 20
|
||||||
@@ -32,6 +36,7 @@
|
|||||||
"event" : "CANCEL_EVENT",
|
"event" : "CANCEL_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "processCancel",
|
"methodName" : "processCancel",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 25
|
"lineNumber" : 25
|
||||||
@@ -39,6 +44,7 @@
|
|||||||
"event" : "[LIFECYCLE:RESTORE]",
|
"event" : "[LIFECYCLE:RESTORE]",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "resumeOrder",
|
"methodName" : "resumeOrder",
|
||||||
|
"sourceFile" : null,
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 29
|
"lineNumber" : 29
|
||||||
@@ -46,6 +52,7 @@
|
|||||||
"event" : "REACTIVE_EVENT",
|
"event" : "REACTIVE_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.ReactiveOrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.ReactiveOrderService",
|
||||||
"methodName" : "processReactive",
|
"methodName" : "processReactive",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/ReactiveOrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
@@ -55,6 +62,7 @@
|
|||||||
"name" : "POST /api/orders/submit",
|
"name" : "POST /api/orders/submit",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/submit",
|
"path" : "/api/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -65,6 +73,7 @@
|
|||||||
"name" : "POST /api/orders/cancel",
|
"name" : "POST /api/orders/cancel",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "cancelOrder",
|
"methodName" : "cancelOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/cancel",
|
"path" : "/api/orders/cancel",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -75,6 +84,7 @@
|
|||||||
"name" : "POST /api/orders/finish",
|
"name" : "POST /api/orders/finish",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "finishOrder",
|
"methodName" : "finishOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/finish",
|
"path" : "/api/orders/finish",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -85,6 +95,7 @@
|
|||||||
"name" : "POST /api/orders/resume",
|
"name" : "POST /api/orders/resume",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "resumeOrder",
|
"methodName" : "resumeOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/resume",
|
"path" : "/api/orders/resume",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -99,6 +110,7 @@
|
|||||||
"name" : "POST /api/orders/reactive",
|
"name" : "POST /api/orders/reactive",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "reactiveOrder",
|
"methodName" : "reactiveOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/reactive",
|
"path" : "/api/orders/reactive",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -113,6 +125,7 @@
|
|||||||
"name" : "INTERCEPTOR: AuditInterceptor.preHandle",
|
"name" : "INTERCEPTOR: AuditInterceptor.preHandle",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
||||||
"methodName" : "preHandle",
|
"methodName" : "preHandle",
|
||||||
|
"sourceFile" : null,
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"interceptorType" : "Spring MVC Interceptor"
|
"interceptorType" : "Spring MVC Interceptor"
|
||||||
},
|
},
|
||||||
@@ -124,6 +137,7 @@
|
|||||||
"name" : "POST /api/orders/submit",
|
"name" : "POST /api/orders/submit",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/submit",
|
"path" : "/api/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -135,6 +149,7 @@
|
|||||||
"event" : "EXTERNAL_TRIGGER",
|
"event" : "EXTERNAL_TRIGGER",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "processSubmit",
|
"methodName" : "processSubmit",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 19
|
"lineNumber" : 19
|
||||||
@@ -145,6 +160,7 @@
|
|||||||
"name" : "POST /api/orders/submit",
|
"name" : "POST /api/orders/submit",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/submit",
|
"path" : "/api/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -156,6 +172,7 @@
|
|||||||
"event" : "SUBMIT_EVENT",
|
"event" : "SUBMIT_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "processSubmit",
|
"methodName" : "processSubmit",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 20
|
"lineNumber" : 20
|
||||||
@@ -166,6 +183,7 @@
|
|||||||
"name" : "POST /api/orders/cancel",
|
"name" : "POST /api/orders/cancel",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "cancelOrder",
|
"methodName" : "cancelOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/cancel",
|
"path" : "/api/orders/cancel",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -177,6 +195,7 @@
|
|||||||
"event" : "CANCEL_EVENT",
|
"event" : "CANCEL_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "processCancel",
|
"methodName" : "processCancel",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/OrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 25
|
"lineNumber" : 25
|
||||||
@@ -187,6 +206,7 @@
|
|||||||
"name" : "POST /api/orders/finish",
|
"name" : "POST /api/orders/finish",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "finishOrder",
|
"methodName" : "finishOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/finish",
|
"path" : "/api/orders/finish",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -198,6 +218,7 @@
|
|||||||
"event" : "FINISH",
|
"event" : "FINISH",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "finishOrder",
|
"methodName" : "finishOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 34
|
"lineNumber" : 34
|
||||||
@@ -208,6 +229,7 @@
|
|||||||
"name" : "POST /api/orders/resume",
|
"name" : "POST /api/orders/resume",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "resumeOrder",
|
"methodName" : "resumeOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/resume",
|
"path" : "/api/orders/resume",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -223,6 +245,7 @@
|
|||||||
"event" : "[LIFECYCLE:RESTORE]",
|
"event" : "[LIFECYCLE:RESTORE]",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.OrderService",
|
||||||
"methodName" : "resumeOrder",
|
"methodName" : "resumeOrder",
|
||||||
|
"sourceFile" : null,
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 29
|
"lineNumber" : 29
|
||||||
@@ -233,6 +256,7 @@
|
|||||||
"name" : "POST /api/orders/reactive",
|
"name" : "POST /api/orders/reactive",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
"className" : "click.kamil.examples.statemachine.extended.web.OrderController",
|
||||||
"methodName" : "reactiveOrder",
|
"methodName" : "reactiveOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/orders/reactive",
|
"path" : "/api/orders/reactive",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -248,6 +272,7 @@
|
|||||||
"event" : "REACTIVE_EVENT",
|
"event" : "REACTIVE_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.service.ReactiveOrderService",
|
"className" : "click.kamil.examples.statemachine.extended.service.ReactiveOrderService",
|
||||||
"methodName" : "processReactive",
|
"methodName" : "processReactive",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/service/ReactiveOrderService.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
@@ -258,6 +283,7 @@
|
|||||||
"name" : "INTERCEPTOR: AuditInterceptor.preHandle",
|
"name" : "INTERCEPTOR: AuditInterceptor.preHandle",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
||||||
"methodName" : "preHandle",
|
"methodName" : "preHandle",
|
||||||
|
"sourceFile" : null,
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"interceptorType" : "Spring MVC Interceptor"
|
"interceptorType" : "Spring MVC Interceptor"
|
||||||
},
|
},
|
||||||
@@ -268,6 +294,7 @@
|
|||||||
"event" : "AUDIT_EVENT",
|
"event" : "AUDIT_EVENT",
|
||||||
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
"className" : "click.kamil.examples.statemachine.extended.web.AuditInterceptor",
|
||||||
"methodName" : "preHandle",
|
"methodName" : "preHandle",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/extended/web/AuditInterceptor.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 16
|
"lineNumber" : 16
|
||||||
|
|||||||
@@ -320,8 +320,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value1\")",
|
"expression" : "guardVarEquals(\"value1\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 120
|
"lineNumber" : 120,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -353,8 +355,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value1\")",
|
"expression" : "guardVarEquals(\"value1\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 126
|
"lineNumber" : 126,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -372,8 +376,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value2\")",
|
"expression" : "guardVarEquals(\"value2\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 127
|
"lineNumber" : 127,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -405,8 +411,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 132
|
"lineNumber" : 132,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -438,8 +446,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value3\")",
|
"expression" : "guardVarEquals(\"value3\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 137
|
"lineNumber" : 137,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -471,8 +481,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"reset\")",
|
"expression" : "guardVarEquals(\"reset\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 142
|
"lineNumber" : 142,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -504,8 +516,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header2\",\"bar\")",
|
"expression" : "guardEventHeaderEquals(\"header2\",\"bar\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 147
|
"lineNumber" : 147,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -537,8 +551,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goTo13\")",
|
"expression" : "guardVarEquals(\"goTo13\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 152
|
"lineNumber" : 152,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -556,8 +572,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goTo14\")",
|
"expression" : "guardVarEquals(\"goTo14\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 153
|
"lineNumber" : 153,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -589,8 +607,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goBack10\")",
|
"expression" : "guardVarEquals(\"goBack10\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 158
|
"lineNumber" : 158,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -622,8 +642,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"loop12\")",
|
"expression" : "guardVarEquals(\"loop12\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 163
|
"lineNumber" : 163,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -655,8 +677,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBack\")",
|
"expression" : "guardVarEquals(\"stepBack\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 168
|
"lineNumber" : 168,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -674,8 +698,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBackMore\")",
|
"expression" : "guardVarEquals(\"stepBackMore\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 169
|
"lineNumber" : 169,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -707,8 +733,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"forward9\")",
|
"expression" : "guardVarEquals(\"forward9\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 174
|
"lineNumber" : 174,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -754,8 +782,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 31
|
"lineNumber" : 31,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.F1StateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/F1StateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
|
|||||||
@@ -320,8 +320,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value1\")",
|
"expression" : "guardVarEquals(\"value1\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 120
|
"lineNumber" : 120,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -353,8 +355,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value1\")",
|
"expression" : "guardVarEquals(\"value1\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 126
|
"lineNumber" : 126,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -372,8 +376,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value2\")",
|
"expression" : "guardVarEquals(\"value2\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 127
|
"lineNumber" : 127,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -405,8 +411,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 132
|
"lineNumber" : 132,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -438,8 +446,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value3\")",
|
"expression" : "guardVarEquals(\"value3\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 137
|
"lineNumber" : 137,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -471,8 +481,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"reset\")",
|
"expression" : "guardVarEquals(\"reset\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 142
|
"lineNumber" : 142,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -504,8 +516,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header2\",\"bar\")",
|
"expression" : "guardEventHeaderEquals(\"header2\",\"bar\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 147
|
"lineNumber" : 147,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -537,8 +551,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goTo13\")",
|
"expression" : "guardVarEquals(\"goTo13\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 152
|
"lineNumber" : 152,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -556,8 +572,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goTo14\")",
|
"expression" : "guardVarEquals(\"goTo14\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 153
|
"lineNumber" : 153,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -589,8 +607,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goBack10\")",
|
"expression" : "guardVarEquals(\"goBack10\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 158
|
"lineNumber" : 158,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -622,8 +642,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"loop12\")",
|
"expression" : "guardVarEquals(\"loop12\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 163
|
"lineNumber" : 163,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -655,8 +677,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBack\")",
|
"expression" : "guardVarEquals(\"stepBack\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 168
|
"lineNumber" : 168,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -674,8 +698,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBackMore\")",
|
"expression" : "guardVarEquals(\"stepBackMore\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 169
|
"lineNumber" : 169,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -707,8 +733,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"forward9\")",
|
"expression" : "guardVarEquals(\"forward9\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 174
|
"lineNumber" : 174,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractFStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractFStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -754,8 +782,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 33
|
"lineNumber" : 33,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.F2StateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/F2StateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
|
|||||||
@@ -236,8 +236,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value1\")",
|
"expression" : "guardVarEquals(\"value1\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 98
|
"lineNumber" : 98,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractGStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractGStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -269,8 +271,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBack\")",
|
"expression" : "guardVarEquals(\"stepBack\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 104
|
"lineNumber" : 104,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractGStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractGStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -288,8 +292,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBackMore\")",
|
"expression" : "guardVarEquals(\"stepBackMore\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 105
|
"lineNumber" : 105,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractGStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractGStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -321,8 +327,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"forward9\")",
|
"expression" : "guardVarEquals(\"forward9\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 110
|
"lineNumber" : 110,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractGStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractGStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
|
|||||||
@@ -236,8 +236,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value1\")",
|
"expression" : "guardVarEquals(\"value1\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 98
|
"lineNumber" : 98,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractGStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractGStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -269,8 +271,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBack\")",
|
"expression" : "guardVarEquals(\"stepBack\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 104
|
"lineNumber" : 104,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractGStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractGStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -288,8 +292,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBackMore\")",
|
"expression" : "guardVarEquals(\"stepBackMore\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 105
|
"lineNumber" : 105,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractGStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractGStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -321,8 +327,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"forward9\")",
|
"expression" : "guardVarEquals(\"forward9\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 110
|
"lineNumber" : 110,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate3.AbstractGStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate3/AbstractGStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"event" : "INHERITED_SUBMIT",
|
"event" : "INHERITED_SUBMIT",
|
||||||
"className" : "click.kamil.examples.statemachine.inheritance.service.ProcessingServiceImpl",
|
"className" : "click.kamil.examples.statemachine.inheritance.service.ProcessingServiceImpl",
|
||||||
"methodName" : "doProcess",
|
"methodName" : "doProcess",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritance/service/ProcessingServiceImpl.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 15
|
"lineNumber" : 15
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
"name" : "POST /api/v2/orders/submit",
|
"name" : "POST /api/v2/orders/submit",
|
||||||
"className" : "click.kamil.examples.statemachine.inheritance.api.OrderApi",
|
"className" : "click.kamil.examples.statemachine.inheritance.api.OrderApi",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritance/api/OrderApi.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/v2/orders/submit",
|
"path" : "/api/v2/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -23,6 +25,7 @@
|
|||||||
"name" : "POST /api/v2/orders/submit",
|
"name" : "POST /api/v2/orders/submit",
|
||||||
"className" : "click.kamil.examples.statemachine.inheritance.api.OrderControllerImpl",
|
"className" : "click.kamil.examples.statemachine.inheritance.api.OrderControllerImpl",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritance/api/OrderControllerImpl.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/v2/orders/submit",
|
"path" : "/api/v2/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -35,6 +38,7 @@
|
|||||||
"name" : "POST /api/v2/orders/submit",
|
"name" : "POST /api/v2/orders/submit",
|
||||||
"className" : "click.kamil.examples.statemachine.inheritance.api.OrderControllerImpl",
|
"className" : "click.kamil.examples.statemachine.inheritance.api.OrderControllerImpl",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritance/api/OrderControllerImpl.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/api/v2/orders/submit",
|
"path" : "/api/v2/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -46,6 +50,7 @@
|
|||||||
"event" : "INHERITED_SUBMIT",
|
"event" : "INHERITED_SUBMIT",
|
||||||
"className" : "click.kamil.examples.statemachine.inheritance.service.ProcessingServiceImpl",
|
"className" : "click.kamil.examples.statemachine.inheritance.service.ProcessingServiceImpl",
|
||||||
"methodName" : "doProcess",
|
"methodName" : "doProcess",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritance/service/ProcessingServiceImpl.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 15
|
"lineNumber" : 15
|
||||||
|
|||||||
@@ -55,7 +55,9 @@
|
|||||||
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
||||||
"isLambda" : true,
|
"isLambda" : true,
|
||||||
"internalLogic" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
"internalLogic" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
||||||
"lineNumber" : 29
|
"lineNumber" : 29,
|
||||||
|
"className" : "click.kamil.examples.statemachine.enumstate.KamilEnumStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/enumstate/KamilEnumStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -113,7 +115,9 @@
|
|||||||
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return true;\n }\n}\n",
|
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return true;\n }\n}\n",
|
||||||
"isLambda" : true,
|
"isLambda" : true,
|
||||||
"internalLogic" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return true;\n }\n}\n",
|
"internalLogic" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return true;\n }\n}\n",
|
||||||
"lineNumber" : 46
|
"lineNumber" : 46,
|
||||||
|
"className" : "click.kamil.examples.statemachine.enumstate.KamilEnumStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/enumstate/KamilEnumStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -132,7 +136,9 @@
|
|||||||
"expression" : "guard1",
|
"expression" : "guard1",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : null,
|
||||||
"lineNumber" : 52
|
"lineNumber" : 52,
|
||||||
|
"className" : "click.kamil.examples.statemachine.enumstate.KamilEnumStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/enumstate/KamilEnumStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -151,7 +157,9 @@
|
|||||||
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
||||||
"isLambda" : true,
|
"isLambda" : true,
|
||||||
"internalLogic" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
"internalLogic" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
||||||
"lineNumber" : 53
|
"lineNumber" : 53,
|
||||||
|
"className" : "click.kamil.examples.statemachine.enumstate.KamilEnumStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/enumstate/KamilEnumStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 2
|
"order" : 2
|
||||||
@@ -210,12 +218,16 @@
|
|||||||
"expression" : "new Action<OrderStates,OrderEvents>(){\n @Override public void execute( StateContext<OrderStates,OrderEvents> context){\n }\n}\n",
|
"expression" : "new Action<OrderStates,OrderEvents>(){\n @Override public void execute( StateContext<OrderStates,OrderEvents> context){\n }\n}\n",
|
||||||
"isLambda" : true,
|
"isLambda" : true,
|
||||||
"internalLogic" : "new Action<OrderStates,OrderEvents>(){\n @Override public void execute( StateContext<OrderStates,OrderEvents> context){\n }\n}\n",
|
"internalLogic" : "new Action<OrderStates,OrderEvents>(){\n @Override public void execute( StateContext<OrderStates,OrderEvents> context){\n }\n}\n",
|
||||||
"lineNumber" : 63
|
"lineNumber" : 63,
|
||||||
|
"className" : "click.kamil.examples.statemachine.enumstate.KamilEnumStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/enumstate/KamilEnumStateMachineConfiguration.java"
|
||||||
}, {
|
}, {
|
||||||
"expression" : "action2",
|
"expression" : "action2",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : null,
|
||||||
"lineNumber" : 67
|
"lineNumber" : 67,
|
||||||
|
"className" : "click.kamil.examples.statemachine.enumstate.KamilEnumStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/enumstate/KamilEnumStateMachineConfiguration.java"
|
||||||
} ],
|
} ],
|
||||||
"order" : null
|
"order" : null
|
||||||
} ],
|
} ],
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
digraph statemachine {
|
||||||
|
rankdir=LR;
|
||||||
|
node [shape=rounded, style=filled, fillcolor=white, fontname="Arial"];
|
||||||
|
edge [fontname="Arial", fontsize=10];
|
||||||
|
|
||||||
|
_start [shape=circle, label="", fillcolor=black, width=0.1];
|
||||||
|
_start -> INIT;
|
||||||
|
DONE [fillcolor=lightgray];
|
||||||
|
INIT -> BUSY [label="SUBMIT / loggingAction()", style="solid", color="black"];
|
||||||
|
BUSY -> DONE [label="ORDER_EVENT", style="solid", color="black"];
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
{
|
||||||
|
"metadata" : {
|
||||||
|
"triggers" : [ {
|
||||||
|
"event" : "SUBMIT",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"lineNumber" : 40
|
||||||
|
}, {
|
||||||
|
"event" : "ORDER_EVENT",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderService",
|
||||||
|
"methodName" : "onMessage",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"lineNumber" : 52
|
||||||
|
} ],
|
||||||
|
"entryPoints" : [ {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /maven/orders/submit",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/maven/orders/submit",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "orderId",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ "RequestBody" ]
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /reactive/order",
|
||||||
|
"className" : "click.kamil.maven.api.ReactiveOrderApi",
|
||||||
|
"methodName" : "orderRoutes",
|
||||||
|
"sourceFile" : "api-module/src/main/java/click/kamil/maven/api/ReactiveOrderApi.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/reactive/order",
|
||||||
|
"verb" : "POST",
|
||||||
|
"style" : "WebFlux Functional"
|
||||||
|
},
|
||||||
|
"parameters" : [ ]
|
||||||
|
}, {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /maven/orders/submit",
|
||||||
|
"className" : "click.kamil.maven.api.MavenOrderApi",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "api-module/src/main/java/click/kamil/maven/api/MavenOrderApi.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/maven/orders/submit",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "orderId",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ "RequestBody" ]
|
||||||
|
} ]
|
||||||
|
}, {
|
||||||
|
"type" : "JMS",
|
||||||
|
"name" : "JMS: order.queue",
|
||||||
|
"className" : "click.kamil.maven.api.JmsOrderListener",
|
||||||
|
"methodName" : "onMessage",
|
||||||
|
"sourceFile" : null,
|
||||||
|
"metadata" : {
|
||||||
|
"protocol" : "JMS",
|
||||||
|
"destination" : "order.queue"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "message",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ ]
|
||||||
|
} ]
|
||||||
|
} ],
|
||||||
|
"callChains" : [ {
|
||||||
|
"entryPoint" : {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /maven/orders/submit",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/maven/orders/submit",
|
||||||
|
"verb" : "POST"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "orderId",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ "RequestBody" ]
|
||||||
|
} ]
|
||||||
|
},
|
||||||
|
"methodChain" : [ "click.kamil.maven.core.MavenOrderStateMachine.OrderController.submitOrder" ],
|
||||||
|
"triggerPoint" : {
|
||||||
|
"event" : "SUBMIT",
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine.OrderController",
|
||||||
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"lineNumber" : 40
|
||||||
|
}
|
||||||
|
} ],
|
||||||
|
"properties" : {
|
||||||
|
"default" : { }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name" : "click.kamil.maven.core.MavenOrderStateMachine",
|
||||||
|
"renderChoicesAsDiamonds" : true,
|
||||||
|
"startStates" : [ "INIT" ],
|
||||||
|
"transitions" : [ {
|
||||||
|
"type" : "EXTERNAL",
|
||||||
|
"sourceStates" : [ {
|
||||||
|
"rawName" : "\"INIT\"",
|
||||||
|
"fullIdentifier" : "INIT"
|
||||||
|
} ],
|
||||||
|
"targetStates" : [ {
|
||||||
|
"rawName" : "\"BUSY\"",
|
||||||
|
"fullIdentifier" : "BUSY"
|
||||||
|
} ],
|
||||||
|
"event" : "SUBMIT",
|
||||||
|
"guard" : null,
|
||||||
|
"actions" : [ {
|
||||||
|
"expression" : "loggingAction()",
|
||||||
|
"isLambda" : false,
|
||||||
|
"internalLogic" : "context -> {\n System.out.println(\"LOG: State transition in progress...\");\n}\n",
|
||||||
|
"lineNumber" : 25,
|
||||||
|
"className" : "click.kamil.maven.core.MavenOrderStateMachine",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/maven/core/MavenOrderStateMachine.java"
|
||||||
|
} ],
|
||||||
|
"order" : null
|
||||||
|
}, {
|
||||||
|
"type" : "EXTERNAL",
|
||||||
|
"sourceStates" : [ {
|
||||||
|
"rawName" : "\"BUSY\"",
|
||||||
|
"fullIdentifier" : "BUSY"
|
||||||
|
} ],
|
||||||
|
"targetStates" : [ {
|
||||||
|
"rawName" : "\"DONE\"",
|
||||||
|
"fullIdentifier" : "DONE"
|
||||||
|
} ],
|
||||||
|
"event" : "ORDER_EVENT",
|
||||||
|
"guard" : null,
|
||||||
|
"actions" : [ ],
|
||||||
|
"order" : null
|
||||||
|
} ],
|
||||||
|
"endStates" : [ "DONE" ]
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
@startuml
|
||||||
|
!pragma layout smetana
|
||||||
|
set separator none
|
||||||
|
hide empty description
|
||||||
|
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
|
||||||
|
|
||||||
|
[*] --> INIT
|
||||||
|
|
||||||
|
|
||||||
|
INIT -[#1E90FF,bold]-> BUSY <<external>> <<e_SUBMIT>> : SUBMIT / loggingAction()
|
||||||
|
BUSY -[#1E90FF,bold]-> DONE <<external>> <<e_ORDER_EVENT>> : ORDER_EVENT
|
||||||
|
|
||||||
|
DONE --> [*]
|
||||||
|
@enduml
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="INIT">
|
||||||
|
<state id="INIT">
|
||||||
|
<transition target="BUSY" event="SUBMIT"/>
|
||||||
|
</state>
|
||||||
|
<state id="BUSY">
|
||||||
|
<transition target="DONE" event="ORDER_EVENT"/>
|
||||||
|
</state>
|
||||||
|
<state id="DONE">
|
||||||
|
</state>
|
||||||
|
</scxml>
|
||||||
|
|
||||||
@@ -0,0 +1,679 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>State Machine Explorer - click.kamil.maven.core.MavenOrderStateMachine</title>
|
||||||
|
<!-- Popper and Tippy for tooltips -->
|
||||||
|
<script src="https://unpkg.com/@popperjs/core@2"></script>
|
||||||
|
<script src="https://unpkg.com/tippy.js@6"></script>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/tippy.js@6/animations/scale.css"/>
|
||||||
|
<!-- SVG Pan & Zoom -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/svg-pan-zoom@3.6.1/dist/svg-pan-zoom.min.js"></script>
|
||||||
|
<!-- Google Fonts -->
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;900&family=JetBrains+Mono:wght@400;700&display=swap" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--sidebar-bg: #ffffff;
|
||||||
|
--main-bg: #f8fafc;
|
||||||
|
--accent: #ef4444;
|
||||||
|
--primary: #3b82f6;
|
||||||
|
--text: #0f172a;
|
||||||
|
--text-muted: #64748b;
|
||||||
|
--border: #e2e8f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
display: flex;
|
||||||
|
height: 100vh;
|
||||||
|
font-family: 'Inter', -apple-system, sans-serif;
|
||||||
|
background: var(--main-bg);
|
||||||
|
color: var(--text);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar {
|
||||||
|
width: 480px;
|
||||||
|
min-width: 350px;
|
||||||
|
max-width: 900px;
|
||||||
|
background: var(--sidebar-bg);
|
||||||
|
border-right: 2px solid var(--border);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
box-shadow: 10px 0 15px rgba(0,0,0,0.02);
|
||||||
|
z-index: 10;
|
||||||
|
overflow-x: hidden;
|
||||||
|
resize: horizontal;
|
||||||
|
position: relative;
|
||||||
|
transition: width 0.3s ease, min-width 0.3s ease, padding 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar.collapsed {
|
||||||
|
width: 0 !important;
|
||||||
|
min-width: 0 !important;
|
||||||
|
border-right: none;
|
||||||
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
resize: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toggle-sidebar {
|
||||||
|
position: absolute;
|
||||||
|
top: 20px;
|
||||||
|
left: 20px;
|
||||||
|
z-index: 50;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
#toggle-sidebar:hover {
|
||||||
|
background: #f8fafc;
|
||||||
|
border-color: var(--primary);
|
||||||
|
}
|
||||||
|
#toggle-sidebar svg {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
fill: none;
|
||||||
|
stroke: var(--text-muted);
|
||||||
|
stroke-width: 2;
|
||||||
|
stroke-linecap: round;
|
||||||
|
stroke-linejoin: round;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar::after {
|
||||||
|
content: '⋮';
|
||||||
|
position: absolute;
|
||||||
|
right: 2px; top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
color: var(--border);
|
||||||
|
font-size: 1.2rem;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-header {
|
||||||
|
padding: 30px 30px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 { font-weight: 900; font-size: 1.6rem; color: var(--text); margin: 0 0 5px 0; letter-spacing: -0.5px; }
|
||||||
|
header p { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--text-muted); margin: 0 0 15px 0; opacity: 0.7; }
|
||||||
|
|
||||||
|
.tabs {
|
||||||
|
display: flex;
|
||||||
|
padding: 0 30px;
|
||||||
|
border-bottom: 1px solid var(--border);
|
||||||
|
gap: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab {
|
||||||
|
padding: 10px 0;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--text-muted);
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
transition: color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab:hover { color: var(--text); }
|
||||||
|
.tab.active { color: var(--primary); }
|
||||||
|
.tab.active::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
bottom: -1px; left: 0; right: 0;
|
||||||
|
height: 2px;
|
||||||
|
background: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-content {
|
||||||
|
flex-grow: 1;
|
||||||
|
padding: 25px 30px;
|
||||||
|
overflow-y: auto;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-content.active { display: block; }
|
||||||
|
|
||||||
|
.ep-card, .flow-card {
|
||||||
|
padding: 18px;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: 14px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
box-shadow: 0 1px 3px rgba(0,0,0,0.04);
|
||||||
|
position: relative;
|
||||||
|
word-break: break-all;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ep-card:hover, .flow-card:hover {
|
||||||
|
border-color: var(--primary);
|
||||||
|
transform: translateX(5px);
|
||||||
|
box-shadow: 0 15px 30px -10px rgba(59, 130, 246, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.ep-type {
|
||||||
|
font-size: 0.6rem;
|
||||||
|
font-weight: 900;
|
||||||
|
padding: 3px 8px;
|
||||||
|
border-radius: 6px;
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.8px;
|
||||||
|
}
|
||||||
|
.type-rest { background: #eff6ff; color: #1d4ed8; }
|
||||||
|
.type-custom { background: #fef2f2; color: #b91c1c; }
|
||||||
|
.type-jms { background: #f5f3ff; color: #7c3aed; }
|
||||||
|
.type-sqs { background: #fff7ed; color: #ea580c; }
|
||||||
|
.type-sns { background: #fff1f2; color: #e11d48; }
|
||||||
|
.type-kafka { background: #fefce8; color: #854d0e; }
|
||||||
|
.type-rabbit { background: #f0fdf4; color: #166534; }
|
||||||
|
|
||||||
|
.ep-name, .flow-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; color: var(--text); }
|
||||||
|
.ep-fqn, .flow-desc { font-family: 'Inter', sans-serif; font-size: 0.75rem; color: var(--text-muted); opacity: 0.9; line-height: 1.4; }
|
||||||
|
|
||||||
|
#main { flex-grow: 1; position: relative; background: var(--main-bg); overflow: hidden; }
|
||||||
|
#svg-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 0; left: 0; right: 0; bottom: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SVG Interactivity Styles */
|
||||||
|
svg a { text-decoration: none !important; }
|
||||||
|
|
||||||
|
.active-path {
|
||||||
|
stroke: var(--accent) !important;
|
||||||
|
stroke-width: 2.5px !important;
|
||||||
|
filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.3));
|
||||||
|
transition: all 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active-path text, a.active-path text {
|
||||||
|
fill: #000 !important;
|
||||||
|
font-weight: 900 !important;
|
||||||
|
paint-order: stroke;
|
||||||
|
stroke: #fff;
|
||||||
|
stroke-width: 3.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dimmed {
|
||||||
|
opacity: 0.2 !important;
|
||||||
|
filter: grayscale(1);
|
||||||
|
transition: opacity 0.4s ease;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 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);
|
||||||
|
border-radius: 16px;
|
||||||
|
padding: 0;
|
||||||
|
max-width: 550px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip-content {
|
||||||
|
padding: 20px;
|
||||||
|
max-width: 500px;
|
||||||
|
word-break: break-word;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
|
|
||||||
|
.payload-box {
|
||||||
|
background: #0f172a;
|
||||||
|
color: #e2e8f0;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 12px;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.payload-param {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
.payload-param:last-child { margin-bottom: 0; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<header>
|
||||||
|
<h1>Explorer</h1>
|
||||||
|
<p>click.kamil.maven.core.MavenOrderStateMachine</p>
|
||||||
|
</header>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tabs">
|
||||||
|
<div class="tab active" data-tab="explorer">Explorer</div>
|
||||||
|
<div class="tab" data-tab="flows">Business Flows</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="tab-explorer" class="tab-content active">
|
||||||
|
<div id="ep-list"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="tab-flows" class="tab-content">
|
||||||
|
<div id="flow-list"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
<button id="toggle-sidebar" aria-label="Toggle Sidebar" title="Toggle Sidebar">
|
||||||
|
<svg viewBox="0 0 24 24"><path d="M4 6h16M4 12h16M4 18h16"></path></svg>
|
||||||
|
</button>
|
||||||
|
<div id="svg-container">
|
||||||
|
<?xml version="1.0" encoding="us-ascii" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 187 255" width="100%" zoomAndPan="magnify"><defs/><g><ellipse cx="35.5208" cy="34.375" fill="#222222" rx="11.4583" ry="11.4583" style="stroke:#222222;stroke-width:1.1458333333333333;"/><rect fill="#FFFFFF" height="45.8333" rx="14.3229" ry="14.3229" style="stroke:#94A3B8;stroke-width:1.1458333333333333;" width="57.2917" x="6.875" y="101.9792"/><text fill="#000000" font-family="Inter" font-size="10.3125" font-weight="bold" lengthAdjust="spacing" textLength="21.7708" x="24.6354" y="128.7932">INIT</text><rect fill="#FFFFFF" height="45.8333" rx="14.3229" ry="14.3229" style="stroke:#94A3B8;stroke-width:1.1458333333333333;" width="57.2917" x="6.875" y="202.8125"/><text fill="#000000" font-family="Inter" font-size="10.3125" font-weight="bold" lengthAdjust="spacing" textLength="27.5" x="21.7708" y="229.6266">BUSY</text><rect fill="#FFFFFF" height="45.8333" rx="14.3229" ry="14.3229" style="stroke:#94A3B8;stroke-width:1.1458333333333333;" width="57.2917" x="68.75" y="13.75"/><text fill="#000000" font-family="Inter" font-size="10.3125" font-weight="bold" lengthAdjust="spacing" textLength="29.7917" x="82.5" y="40.5641">DONE</text><ellipse cx="97.3958" cy="123.75" fill="none" rx="12.6042" ry="12.6042" style="stroke:#222222;stroke-width:1.1458333333333333;"/><ellipse cx="97.3958" cy="123.75" fill="#222222" rx="6.875" ry="6.875" style="stroke:#222222;stroke-width:1.1458333333333333;"/><polygon fill="#CBD5E1" points="35.5208,101.6748,40.1042,91.3623,35.5208,95.9456,30.9375,91.3623,35.5208,101.6748" style="stroke:#CBD5E1;stroke-width:1.1458333333333333;"/><path d="M35.5208,50.4929 C35.5208,63.9394 35.5208,78.5626 35.5208,94.7998 " fill="none" style="stroke:#CBD5E1;stroke-width:1.1458333333333333;"/><polygon fill="#1E90FF" points="35.5208,202.7749,40.1042,192.4624,35.5208,197.0457,30.9375,192.4624,35.5208,202.7749" style="stroke:#1E90FF;stroke-width:1.1458333333333333;"/><path d="M35.5208,147.9113 C35.5208,164.2413 35.5208,179.5846 35.5208,195.8999 " fill="none" style="stroke:#1E90FF;stroke-width:2.2916666666666665;"/><a href="#link_ORDER_EVENT" target="_self" title="#link_ORDER_EVENT" xlink:actuate="onRequest" xlink:href="#link_ORDER_EVENT" xlink:show="new" xlink:title="#link_ORDER_EVENT" xlink:type="simple"><text fill="#0000FF" font-family="JetBrains Mono" font-size="9.1667" lengthAdjust="spacing" text-decoration="underline" textLength="142.0833" x="36.6667" y="178.4456">ORDER_EVENT / loggingAction()</text></a><polygon fill="#CBD5E1" points="97.3958,110.7767,101.9792,100.4642,97.3958,105.0475,92.8125,100.4642,97.3958,110.7767" style="stroke:#CBD5E1;stroke-width:1.1458333333333333;"/><path d="M97.3958,59.9435 C97.3958,76.0566 97.3958,90.453 97.3958,103.9017 " fill="none" style="stroke:#CBD5E1;stroke-width:1.1458333333333333;"/><!--SRC=[RP5lJy8m4CRVzrESuOqQYSm_2HX20Z8IZ881D364a6CzjeQkNTeYJkDtjmF4XVYgrz-rzpntTv8PZ5C4YRbUEx0fELJ8BFcOCZJej06b5R54S09ACvS39niPaJcXrGvRHuQqopDYTYLKyI_r41t15mFeOBIAZLuhVg-bhxT9XAE2QyF9x5YbSOFNY_g1JX8HhHHP2u5dFQtS05E2ll9IUp0MdmIDtulB9S52I-x1QATb51cugddmZ9mB5VjQtsM72NAzAVWIfIrxRnkZDmVH1t8TWq9PUD9A__TiQwL-dDbt5YtuBGN7oNA3VocU2GY2MjdaU_mer6g29lPBcLkIIyQcvpEeLblG7_GdZB7YWEgq4eIDMgztKKnXvhETb_4RD9lquMUcKBPQnMK-77N3qJny3GSJJ-vWEgr8Br3cK8ulGUeuzbDgHyN6JyzcCyQwmq6uTU2T_000]--></g></svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script id="metadata-json" type="application/json">
|
||||||
|
{
|
||||||
|
"name" : "click.kamil.maven.core.MavenOrderStateMachine",
|
||||||
|
"states" : [ {
|
||||||
|
"rawName" : "DONE",
|
||||||
|
"fullIdentifier" : "DONE"
|
||||||
|
}, {
|
||||||
|
"rawName" : "\"INIT\"",
|
||||||
|
"fullIdentifier" : "INIT"
|
||||||
|
}, {
|
||||||
|
"rawName" : "\"BUSY\"",
|
||||||
|
"fullIdentifier" : "BUSY"
|
||||||
|
}, {
|
||||||
|
"rawName" : "INIT",
|
||||||
|
"fullIdentifier" : "INIT"
|
||||||
|
} ],
|
||||||
|
"transitions" : [ {
|
||||||
|
"type" : "EXTERNAL",
|
||||||
|
"sourceStates" : [ {
|
||||||
|
"rawName" : "\"INIT\"",
|
||||||
|
"fullIdentifier" : "INIT"
|
||||||
|
} ],
|
||||||
|
"targetStates" : [ {
|
||||||
|
"rawName" : "\"BUSY\"",
|
||||||
|
"fullIdentifier" : "BUSY"
|
||||||
|
} ],
|
||||||
|
"event" : "ORDER_EVENT",
|
||||||
|
"guard" : null,
|
||||||
|
"actions" : [ {
|
||||||
|
"expression" : "loggingAction()",
|
||||||
|
"isLambda" : false,
|
||||||
|
"internalLogic" : "context -> {\n System.out.println(\"LOG: State transition in progress...\");\n}\n",
|
||||||
|
"lineNumber" : 23
|
||||||
|
} ],
|
||||||
|
"order" : null
|
||||||
|
} ],
|
||||||
|
"startStates" : [ "INIT" ],
|
||||||
|
"endStates" : [ "DONE" ],
|
||||||
|
"renderChoicesAsDiamonds" : true,
|
||||||
|
"flows" : [ ],
|
||||||
|
"metadata" : {
|
||||||
|
"triggers" : [ {
|
||||||
|
"event" : "ORDER_EVENT",
|
||||||
|
"className" : "click.kamil.maven.core.OrderService",
|
||||||
|
"methodName" : "onMessage",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"lineNumber" : 34
|
||||||
|
} ],
|
||||||
|
"entryPoints" : [ {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /reactive/order",
|
||||||
|
"className" : "click.kamil.maven.api.ReactiveOrderApi",
|
||||||
|
"methodName" : "orderRoutes",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/reactive/order",
|
||||||
|
"verb" : "POST",
|
||||||
|
"style" : "WebFlux Functional"
|
||||||
|
},
|
||||||
|
"parameters" : [ ]
|
||||||
|
}, {
|
||||||
|
"type" : "JMS",
|
||||||
|
"name" : "JMS: order.queue",
|
||||||
|
"className" : "click.kamil.maven.api.JmsOrderListener",
|
||||||
|
"methodName" : "onMessage",
|
||||||
|
"metadata" : {
|
||||||
|
"protocol" : "JMS",
|
||||||
|
"destination" : "order.queue"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "message",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ ]
|
||||||
|
} ]
|
||||||
|
} ],
|
||||||
|
"callChains" : [ ],
|
||||||
|
"properties" : {
|
||||||
|
"default" : { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const metadata = JSON.parse(document.getElementById('metadata-json').textContent);
|
||||||
|
let panZoomInstance;
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const svg = document.querySelector('#svg-container svg');
|
||||||
|
panZoomInstance = svgPanZoom(svg, { zoomEnabled: true, controlIconsEnabled: true, fit: true, center: true });
|
||||||
|
|
||||||
|
document.getElementById('toggle-sidebar').addEventListener('click', () => {
|
||||||
|
const sidebar = document.getElementById('sidebar');
|
||||||
|
sidebar.classList.toggle('collapsed');
|
||||||
|
|
||||||
|
// Re-center SVG pan-zoom after transition
|
||||||
|
setTimeout(() => {
|
||||||
|
if (panZoomInstance) {
|
||||||
|
panZoomInstance.resize();
|
||||||
|
panZoomInstance.center();
|
||||||
|
}
|
||||||
|
}, 300);
|
||||||
|
});
|
||||||
|
|
||||||
|
setupTabs();
|
||||||
|
populateSidebar();
|
||||||
|
populateFlows();
|
||||||
|
attachInteractivity();
|
||||||
|
});
|
||||||
|
|
||||||
|
function setupTabs() {
|
||||||
|
const flows = metadata.flows || [];
|
||||||
|
if (flows.length === 0) {
|
||||||
|
document.querySelector('.tabs').style.display = 'none';
|
||||||
|
document.querySelector('.tab-content[data-tab="flows"]')?.remove();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.querySelectorAll('.tab').forEach(tab => {
|
||||||
|
tab.addEventListener('click', () => {
|
||||||
|
document.querySelectorAll('.tab, .tab-content').forEach(el => el.classList.remove('active'));
|
||||||
|
tab.classList.add('active');
|
||||||
|
document.getElementById('tab-' + tab.dataset.tab).classList.add('active');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function populateSidebar() {
|
||||||
|
const list = document.getElementById('ep-list');
|
||||||
|
const entryPoints = metadata.metadata.entryPoints || [];
|
||||||
|
const machineEvents = new Set(metadata.transitions.map(t => t.event).filter(Boolean));
|
||||||
|
|
||||||
|
entryPoints.forEach(ep => {
|
||||||
|
// Quality Filter: Hide if it doesn't trigger a machine event
|
||||||
|
const chains = (metadata.metadata.callChains || []).filter(c =>
|
||||||
|
c.entryPoint.className === ep.className &&
|
||||||
|
c.entryPoint.methodName === ep.methodName &&
|
||||||
|
machineEvents.has(c.triggerPoint.event)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (chains.length === 0) return;
|
||||||
|
|
||||||
|
const card = document.createElement('div');
|
||||||
|
card.className = 'ep-card';
|
||||||
|
card.innerHTML = `
|
||||||
|
<div class="ep-type type-${ep.type.toLowerCase()}">${ep.type}</div>
|
||||||
|
<div class="ep-name">${ep.name}</div>
|
||||||
|
<div class="ep-fqn">${ep.className}.${ep.methodName}</div>
|
||||||
|
`;
|
||||||
|
card.onmouseenter = () => highlightEntryPoint(ep);
|
||||||
|
card.onmouseleave = clearHighlights;
|
||||||
|
list.appendChild(card);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function populateFlows() {
|
||||||
|
const list = document.getElementById('flow-list');
|
||||||
|
const flows = metadata.flows || [];
|
||||||
|
|
||||||
|
if (flows.length === 0) {
|
||||||
|
list.innerHTML = '<p style="color:var(--text-muted); font-size:0.8rem; font-style:italic;">No business flows defined.</p>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
flows.forEach(flow => {
|
||||||
|
const card = document.createElement('div');
|
||||||
|
card.className = 'flow-card';
|
||||||
|
card.innerHTML = `
|
||||||
|
<div class="flow-name">${flow.name}</div>
|
||||||
|
<div class="flow-desc">${flow.description}</div>
|
||||||
|
`;
|
||||||
|
card.onmouseenter = () => highlightFlow(flow);
|
||||||
|
card.onmouseleave = clearHighlights;
|
||||||
|
list.appendChild(card);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function highlightEntryPoint(ep) {
|
||||||
|
clearHighlights();
|
||||||
|
const machineEvents = new Set(metadata.transitions.map(t => t.event).filter(Boolean));
|
||||||
|
const chains = metadata.metadata.callChains || [];
|
||||||
|
const relevantEvents = chains
|
||||||
|
.filter(c => c.entryPoint.className === ep.className && c.entryPoint.methodName === ep.methodName && machineEvents.has(c.triggerPoint.event))
|
||||||
|
.map(c => c.triggerPoint.event);
|
||||||
|
|
||||||
|
if (relevantEvents.length === 0) return;
|
||||||
|
highlightEvents(relevantEvents);
|
||||||
|
}
|
||||||
|
|
||||||
|
function highlightFlow(flow) {
|
||||||
|
clearHighlights();
|
||||||
|
if (!flow.steps || flow.steps.length === 0) return;
|
||||||
|
highlightEvents(flow.steps);
|
||||||
|
}
|
||||||
|
|
||||||
|
function highlightEvents(steps) {
|
||||||
|
const svg = document.querySelector('#svg-container svg');
|
||||||
|
|
||||||
|
// Dim everything first
|
||||||
|
svg.querySelectorAll('path, rect, circle, ellipse, text, polygon').forEach(el => {
|
||||||
|
el.classList.add('dimmed');
|
||||||
|
});
|
||||||
|
|
||||||
|
steps.forEach(step => {
|
||||||
|
let linkId = "";
|
||||||
|
if (step.includes("->")) {
|
||||||
|
// Named Choice Branch: "SRC->TGT"
|
||||||
|
const parts = step.split("->");
|
||||||
|
linkId = "#link_anon_" + normalize(parts[0]) + "_" + normalize(parts[1]);
|
||||||
|
} else {
|
||||||
|
// Standard Event
|
||||||
|
linkId = "#link_" + normalize(step);
|
||||||
|
}
|
||||||
|
|
||||||
|
svg.querySelectorAll('a').forEach(link => {
|
||||||
|
const href = link.getAttribute('xlink:href') || link.getAttribute('href');
|
||||||
|
if (href === linkId) {
|
||||||
|
highlightLinkGroup(link);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Un-dim all state nodes for context
|
||||||
|
svg.querySelectorAll('rect, circle, ellipse, polygon').forEach(el => {
|
||||||
|
const isChoice = el.tagName === 'polygon' && el.points?.numberOfItems === 4;
|
||||||
|
if (isChoice || ['rect', 'circle', 'ellipse'].includes(el.tagName)) {
|
||||||
|
el.classList.remove('dimmed');
|
||||||
|
let next = el.nextElementSibling;
|
||||||
|
while(next && next.tagName === 'text') {
|
||||||
|
next.classList.remove('dimmed');
|
||||||
|
next = next.nextElementSibling;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function highlightLinkGroup(link) {
|
||||||
|
link.classList.add('active-path');
|
||||||
|
link.querySelectorAll('*').forEach(child => child.classList.remove('dimmed'));
|
||||||
|
|
||||||
|
// Find path and polygon immediately before the <a> tag (interleaved)
|
||||||
|
let prev = link.previousElementSibling;
|
||||||
|
let foundPath = false;
|
||||||
|
let foundPolygon = false;
|
||||||
|
while (prev) {
|
||||||
|
if (prev.tagName === 'path' && !foundPath) {
|
||||||
|
prev.classList.remove('dimmed');
|
||||||
|
prev.classList.add('active-path');
|
||||||
|
foundPath = true;
|
||||||
|
} else if (prev.tagName === 'polygon' && !foundPolygon && prev.points?.numberOfItems !== 4) {
|
||||||
|
prev.classList.remove('dimmed');
|
||||||
|
prev.classList.add('active-path');
|
||||||
|
foundPolygon = true;
|
||||||
|
} else if (['rect', 'circle', 'ellipse'].includes(prev.tagName) ||
|
||||||
|
(prev.tagName === 'polygon' && prev.points?.numberOfItems === 4)) {
|
||||||
|
// Hit a state node, stop traversal
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (foundPath && foundPolygon) break;
|
||||||
|
prev = prev.previousElementSibling;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearHighlights() {
|
||||||
|
document.querySelectorAll('.dimmed, .active-path').forEach(el => {
|
||||||
|
el.classList.remove('dimmed', 'active-path');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function attachInteractivity() {
|
||||||
|
const svg = document.querySelector('#svg-container svg');
|
||||||
|
const transitions = metadata.transitions || [];
|
||||||
|
|
||||||
|
svg.querySelectorAll('a').forEach(link => {
|
||||||
|
const href = link.getAttribute('xlink:href') || link.getAttribute('href');
|
||||||
|
if (!href || !href.startsWith('#link_')) return;
|
||||||
|
|
||||||
|
const linkId = href.replace('#link_', '');
|
||||||
|
const isAnon = linkId.startsWith('anon_');
|
||||||
|
|
||||||
|
let metaTrans = null;
|
||||||
|
if (isAnon) {
|
||||||
|
metaTrans = transitions.find(t =>
|
||||||
|
!t.event &&
|
||||||
|
"anon_" + normalize(t.sourceStates[0].fullIdentifier) + "_" + normalize(t.targetStates[0].fullIdentifier) === linkId
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
metaTrans = transitions.find(t => normalize(t.event) === linkId);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (metaTrans || isAnon) {
|
||||||
|
link.style.cursor = 'pointer';
|
||||||
|
const setupTippy = (el) => {
|
||||||
|
tippy(el, {
|
||||||
|
content: createTooltip(isAnon ? "Internal logic" : linkId, metaTrans),
|
||||||
|
allowHTML: true,
|
||||||
|
theme: 'modern',
|
||||||
|
interactive: true,
|
||||||
|
appendTo: document.body,
|
||||||
|
placement: 'right',
|
||||||
|
offset: [0, 20]
|
||||||
|
});
|
||||||
|
};
|
||||||
|
setupTippy(link);
|
||||||
|
let path = link.previousElementSibling;
|
||||||
|
while(path && path.tagName !== 'path') path = path.previousElementSibling;
|
||||||
|
if (path) {
|
||||||
|
path.style.cursor = 'pointer';
|
||||||
|
setupTippy(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalize(s) {
|
||||||
|
if (!s) return "";
|
||||||
|
return s.replace(/[^a-zA-Z0-9]/g, '_');
|
||||||
|
}
|
||||||
|
|
||||||
|
function createTooltip(name, trans) {
|
||||||
|
const chains = (metadata.metadata.callChains || []).filter(c => normalize(c.triggerPoint.event) === name);
|
||||||
|
|
||||||
|
let html = `<div class="tooltip-content">
|
||||||
|
<div style="font-weight:900; font-size:1.1rem; margin-bottom:12px; border-bottom:1px solid #eee; padding-bottom:8px; line-height:1.3;">
|
||||||
|
${name === 'Internal logic' ? name : 'Event: <span style="color:var(--accent)">' + name + '</span>'}
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
if (trans && trans.guard) {
|
||||||
|
const lineInfo = trans.guard.lineNumber ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(Line: ${trans.guard.lineNumber})</span>` : '';
|
||||||
|
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Guard${lineInfo}</div>
|
||||||
|
<div style="background:#f1f5f9; padding:6px; border-radius:4px; font-family:monospace; font-size:0.8rem; margin-bottom:12px; border:1px solid #e2e8f0;">${trans.guard.expression}</div>`;
|
||||||
|
if (trans.guard.internalLogic) {
|
||||||
|
html += `<div style="font-size:0.65rem; font-weight:800; color:#cbd5e1; text-transform:uppercase; margin-bottom:4px">Internal Logic</div>
|
||||||
|
<pre style="background:#1e293b; color:#f8fafc; padding:8px; border-radius:4px; font-family:'JetBrains Mono', monospace; font-size:0.7rem; overflow-x:auto; margin-bottom:12px;"><code>${trans.guard.internalLogic.replace(/</g, '<').replace(/>/g, '>')}</code></pre>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (trans && trans.actions && trans.actions.length > 0) {
|
||||||
|
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Actions</div>`;
|
||||||
|
trans.actions.forEach(action => {
|
||||||
|
const lineInfo = action.lineNumber ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(Line: ${action.lineNumber})</span>` : '';
|
||||||
|
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Action${lineInfo}</div>
|
||||||
|
<div style="background:#f1f5f9; padding:6px; border-radius:4px; font-family:monospace; font-size:0.8rem; margin-bottom:12px; border:1px solid #e2e8f0;">${action.expression}</div>`;
|
||||||
|
if (action.internalLogic) {
|
||||||
|
html += `<div style="font-size:0.65rem; font-weight:800; color:#cbd5e1; text-transform:uppercase; margin-bottom:4px">Internal Logic</div>
|
||||||
|
<pre style="background:#1e293b; color:#f8fafc; padding:8px; border-radius:4px; font-family:'JetBrains Mono', monospace; font-size:0.7rem; overflow-x:auto; margin-bottom:12px;"><code>${action.internalLogic.replace(/</g, '<').replace(/>/g, '>')}</code></pre>`;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
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 #eee; padding-top:10px">Triggered by</div>`;
|
||||||
|
chains.forEach(c => {
|
||||||
|
html += `<div style="margin-bottom:20px">
|
||||||
|
<div style="font-weight:700; font-size:0.85rem; color:var(--text);">${c.entryPoint.name}</div>
|
||||||
|
${renderParameters(c.entryPoint.parameters)}
|
||||||
|
<div style="margin-left:10px; border-left:2px solid #e2e8f0; padding-left:12px; margin-top:10px">
|
||||||
|
${c.methodChain.map((m, i) => `<div style="font-size:0.7rem; color:#475569; margin-top:4px; font-family:'JetBrains Mono', monospace;"><b>${i+1}</b> ${m}</div>`).join('')}
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
html += `</div>`;
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderParameters(params) {
|
||||||
|
if (!params || params.length === 0) return "";
|
||||||
|
let html = `<div style="font-size:0.65rem; font-weight:700; color:#94a3b8; margin-top:8px; margin-bottom:4px; text-transform:uppercase;">Input Data</div>`;
|
||||||
|
html += `<div class="payload-box">`;
|
||||||
|
params.forEach(p => {
|
||||||
|
const annotation = (p.annotations || []).find(a => a.endsWith("RequestBody") || a.endsWith("PathVariable") || a.endsWith("RequestParam"));
|
||||||
|
const cleanAnn = annotation ? "@" + annotation.substring(annotation.lastIndexOf('.') + 1) : "";
|
||||||
|
html += `<div class="payload-param">
|
||||||
|
<span style="color:#f43f5e; font-size:0.65rem; font-weight:bold;">${cleanAnn}</span>
|
||||||
|
<span style="color:#38bdf8;">${p.type}</span>
|
||||||
|
<span style="color:#a3e635;">${p.name}</span>
|
||||||
|
</div>`;
|
||||||
|
});
|
||||||
|
html += `</div>`;
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
{
|
||||||
|
"metadata" : {
|
||||||
|
"triggers" : [ {
|
||||||
|
"event" : "ORDER_EVENT",
|
||||||
|
"className" : "click.kamil.maven.core.OrderService",
|
||||||
|
"methodName" : "onMessage",
|
||||||
|
"sourceModule" : null,
|
||||||
|
"stateMachineId" : null,
|
||||||
|
"lineNumber" : 34
|
||||||
|
} ],
|
||||||
|
"entryPoints" : [ {
|
||||||
|
"type" : "REST",
|
||||||
|
"name" : "POST /reactive/order",
|
||||||
|
"className" : "click.kamil.maven.api.ReactiveOrderApi",
|
||||||
|
"methodName" : "orderRoutes",
|
||||||
|
"metadata" : {
|
||||||
|
"path" : "/reactive/order",
|
||||||
|
"verb" : "POST",
|
||||||
|
"style" : "WebFlux Functional"
|
||||||
|
},
|
||||||
|
"parameters" : [ ]
|
||||||
|
}, {
|
||||||
|
"type" : "JMS",
|
||||||
|
"name" : "JMS: order.queue",
|
||||||
|
"className" : "click.kamil.maven.api.JmsOrderListener",
|
||||||
|
"methodName" : "onMessage",
|
||||||
|
"metadata" : {
|
||||||
|
"protocol" : "JMS",
|
||||||
|
"destination" : "order.queue"
|
||||||
|
},
|
||||||
|
"parameters" : [ {
|
||||||
|
"name" : "message",
|
||||||
|
"type" : "String",
|
||||||
|
"annotations" : [ ]
|
||||||
|
} ]
|
||||||
|
} ],
|
||||||
|
"callChains" : [ ],
|
||||||
|
"properties" : {
|
||||||
|
"default" : { }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name" : "click.kamil.maven.core.MavenOrderStateMachine",
|
||||||
|
"renderChoicesAsDiamonds" : true,
|
||||||
|
"startStates" : [ "INIT" ],
|
||||||
|
"transitions" : [ {
|
||||||
|
"type" : "EXTERNAL",
|
||||||
|
"sourceStates" : [ {
|
||||||
|
"rawName" : "\"INIT\"",
|
||||||
|
"fullIdentifier" : "INIT"
|
||||||
|
} ],
|
||||||
|
"targetStates" : [ {
|
||||||
|
"rawName" : "\"BUSY\"",
|
||||||
|
"fullIdentifier" : "BUSY"
|
||||||
|
} ],
|
||||||
|
"event" : "ORDER_EVENT",
|
||||||
|
"guard" : null,
|
||||||
|
"actions" : [ {
|
||||||
|
"expression" : "loggingAction()",
|
||||||
|
"isLambda" : false,
|
||||||
|
"internalLogic" : "context -> {\n System.out.println(\"LOG: State transition in progress...\");\n}\n",
|
||||||
|
"lineNumber" : 23
|
||||||
|
} ],
|
||||||
|
"order" : null
|
||||||
|
} ],
|
||||||
|
"endStates" : [ "DONE" ]
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
@startuml
|
||||||
|
!pragma layout smetana
|
||||||
|
set separator none
|
||||||
|
hide empty description
|
||||||
|
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
|
||||||
|
|
||||||
|
[*] --> INIT
|
||||||
|
|
||||||
|
|
||||||
|
INIT -[#1E90FF,bold]-> BUSY <<external>> <<e_ORDER_EVENT>> : ORDER_EVENT / loggingAction()
|
||||||
|
|
||||||
|
DONE --> [*]
|
||||||
|
@enduml
|
||||||
|
|
||||||
@@ -250,8 +250,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value1\")",
|
"expression" : "guardVarEquals(\"value1\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 91
|
"lineNumber" : 91,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritancestate.AbstractOneStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritancestate/AbstractOneStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -283,8 +285,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value1\")",
|
"expression" : "guardVarEquals(\"value1\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 97
|
"lineNumber" : 97,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritancestate.AbstractOneStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritancestate/AbstractOneStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -302,8 +306,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value2\")",
|
"expression" : "guardVarEquals(\"value2\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 98
|
"lineNumber" : 98,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritancestate.AbstractOneStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritancestate/AbstractOneStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -335,8 +341,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 103
|
"lineNumber" : 103,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritancestate.AbstractOneStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritancestate/AbstractOneStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -368,8 +376,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value3\")",
|
"expression" : "guardVarEquals(\"value3\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 108
|
"lineNumber" : 108,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritancestate.AbstractOneStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritancestate/AbstractOneStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -401,8 +411,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"reset\")",
|
"expression" : "guardVarEquals(\"reset\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 113
|
"lineNumber" : 113,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritancestate.AbstractOneStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritancestate/AbstractOneStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -434,8 +446,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header2\",\"bar\")",
|
"expression" : "guardEventHeaderEquals(\"header2\",\"bar\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 118
|
"lineNumber" : 118,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritancestate.AbstractOneStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritancestate/AbstractOneStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -467,8 +481,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goTo13\")",
|
"expression" : "guardVarEquals(\"goTo13\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 123
|
"lineNumber" : 123,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritancestate.AbstractOneStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritancestate/AbstractOneStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -486,8 +502,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goTo14\")",
|
"expression" : "guardVarEquals(\"goTo14\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 124
|
"lineNumber" : 124,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritancestate.AbstractOneStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritancestate/AbstractOneStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -519,8 +537,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goBack10\")",
|
"expression" : "guardVarEquals(\"goBack10\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 129
|
"lineNumber" : 129,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritancestate.AbstractOneStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritancestate/AbstractOneStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -552,8 +572,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"loop12\")",
|
"expression" : "guardVarEquals(\"loop12\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 134
|
"lineNumber" : 134,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritancestate.AbstractOneStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritancestate/AbstractOneStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -585,8 +607,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBack\")",
|
"expression" : "guardVarEquals(\"stepBack\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 139
|
"lineNumber" : 139,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritancestate.AbstractOneStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritancestate/AbstractOneStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -604,8 +628,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBackMore\")",
|
"expression" : "guardVarEquals(\"stepBackMore\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 140
|
"lineNumber" : 140,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritancestate.AbstractOneStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritancestate/AbstractOneStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -637,8 +663,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"forward9\")",
|
"expression" : "guardVarEquals(\"forward9\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 145
|
"lineNumber" : 145,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritancestate.AbstractOneStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritancestate/AbstractOneStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"event" : "SUBMIT",
|
"event" : "SUBMIT",
|
||||||
"className" : "click.kamil.multi.core.OrderController",
|
"className" : "click.kamil.multi.core.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
@@ -13,6 +14,7 @@
|
|||||||
"name" : "POST /orders/submit",
|
"name" : "POST /orders/submit",
|
||||||
"className" : "click.kamil.multi.core.OrderController",
|
"className" : "click.kamil.multi.core.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/orders/submit",
|
"path" : "/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -27,6 +29,7 @@
|
|||||||
"name" : "POST /orders/submit",
|
"name" : "POST /orders/submit",
|
||||||
"className" : "click.kamil.multi.api.OrderApi",
|
"className" : "click.kamil.multi.api.OrderApi",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "api-module/src/main/java/click/kamil/multi/api/OrderApi.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/orders/submit",
|
"path" : "/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -43,6 +46,7 @@
|
|||||||
"name" : "POST /orders/submit",
|
"name" : "POST /orders/submit",
|
||||||
"className" : "click.kamil.multi.core.OrderController",
|
"className" : "click.kamil.multi.core.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
||||||
"metadata" : {
|
"metadata" : {
|
||||||
"path" : "/orders/submit",
|
"path" : "/orders/submit",
|
||||||
"verb" : "POST"
|
"verb" : "POST"
|
||||||
@@ -58,6 +62,7 @@
|
|||||||
"event" : "SUBMIT",
|
"event" : "SUBMIT",
|
||||||
"className" : "click.kamil.multi.core.OrderController",
|
"className" : "click.kamil.multi.core.OrderController",
|
||||||
"methodName" : "submitOrder",
|
"methodName" : "submitOrder",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderController.java",
|
||||||
"sourceModule" : null,
|
"sourceModule" : null,
|
||||||
"stateMachineId" : null,
|
"stateMachineId" : null,
|
||||||
"lineNumber" : 18
|
"lineNumber" : 18
|
||||||
@@ -86,7 +91,9 @@
|
|||||||
"expression" : "processAction()",
|
"expression" : "processAction()",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : "@Override default void execute(StateContext<String,String> context){\n System.out.println(\"Processing order: \" + context.getMessageHeader(\"orderId\"));\n}\n",
|
"internalLogic" : "@Override default void execute(StateContext<String,String> context){\n System.out.println(\"Processing order: \" + context.getMessageHeader(\"orderId\"));\n}\n",
|
||||||
"lineNumber" : 31
|
"lineNumber" : 31,
|
||||||
|
"className" : "click.kamil.multi.core.OrderStateMachineConfig",
|
||||||
|
"sourceFile" : "core-module/src/main/java/click/kamil/multi/core/OrderStateMachineConfig.java"
|
||||||
} ],
|
} ],
|
||||||
"order" : null
|
"order" : null
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
@@ -55,7 +55,9 @@
|
|||||||
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
||||||
"isLambda" : true,
|
"isLambda" : true,
|
||||||
"internalLogic" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
"internalLogic" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
||||||
"lineNumber" : 29
|
"lineNumber" : 29,
|
||||||
|
"className" : "click.kamil.examples.statemachine.simple.SimpleEnumStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/simple/SimpleEnumStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : null
|
"order" : null
|
||||||
@@ -99,7 +101,9 @@
|
|||||||
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
||||||
"isLambda" : true,
|
"isLambda" : true,
|
||||||
"internalLogic" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
"internalLogic" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
||||||
"lineNumber" : 46
|
"lineNumber" : 46,
|
||||||
|
"className" : "click.kamil.examples.statemachine.simple.SimpleEnumStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/simple/SimpleEnumStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -132,7 +136,9 @@
|
|||||||
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return true;\n }\n}\n",
|
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return true;\n }\n}\n",
|
||||||
"isLambda" : true,
|
"isLambda" : true,
|
||||||
"internalLogic" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return true;\n }\n}\n",
|
"internalLogic" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return true;\n }\n}\n",
|
||||||
"lineNumber" : 55
|
"lineNumber" : 55,
|
||||||
|
"className" : "click.kamil.examples.statemachine.simple.SimpleEnumStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/simple/SimpleEnumStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -151,7 +157,9 @@
|
|||||||
"expression" : "guard1",
|
"expression" : "guard1",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : null,
|
||||||
"lineNumber" : 61
|
"lineNumber" : 61,
|
||||||
|
"className" : "click.kamil.examples.statemachine.simple.SimpleEnumStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/simple/SimpleEnumStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -170,7 +178,9 @@
|
|||||||
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
"expression" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
||||||
"isLambda" : true,
|
"isLambda" : true,
|
||||||
"internalLogic" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
"internalLogic" : "new Guard<OrderStates,OrderEvents>(){\n @Override public boolean evaluate( StateContext<OrderStates,OrderEvents> context){\n return false;\n }\n}\n",
|
||||||
"lineNumber" : 62
|
"lineNumber" : 62,
|
||||||
|
"className" : "click.kamil.examples.statemachine.simple.SimpleEnumStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/simple/SimpleEnumStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 2
|
"order" : 2
|
||||||
@@ -229,12 +239,16 @@
|
|||||||
"expression" : "new Action<OrderStates,OrderEvents>(){\n @Override public void execute( StateContext<OrderStates,OrderEvents> context){\n ;\n }\n}\n",
|
"expression" : "new Action<OrderStates,OrderEvents>(){\n @Override public void execute( StateContext<OrderStates,OrderEvents> context){\n ;\n }\n}\n",
|
||||||
"isLambda" : true,
|
"isLambda" : true,
|
||||||
"internalLogic" : "new Action<OrderStates,OrderEvents>(){\n @Override public void execute( StateContext<OrderStates,OrderEvents> context){\n ;\n }\n}\n",
|
"internalLogic" : "new Action<OrderStates,OrderEvents>(){\n @Override public void execute( StateContext<OrderStates,OrderEvents> context){\n ;\n }\n}\n",
|
||||||
"lineNumber" : 72
|
"lineNumber" : 72,
|
||||||
|
"className" : "click.kamil.examples.statemachine.simple.SimpleEnumStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/simple/SimpleEnumStateMachineConfiguration.java"
|
||||||
}, {
|
}, {
|
||||||
"expression" : "action2",
|
"expression" : "action2",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : null,
|
||||||
"lineNumber" : 77
|
"lineNumber" : 77,
|
||||||
|
"className" : "click.kamil.examples.statemachine.simple.SimpleEnumStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/simple/SimpleEnumStateMachineConfiguration.java"
|
||||||
} ],
|
} ],
|
||||||
"order" : null
|
"order" : null
|
||||||
} ],
|
} ],
|
||||||
|
|||||||
@@ -320,8 +320,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value1\")",
|
"expression" : "guardVarEquals(\"value1\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 120
|
"lineNumber" : 120,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.AbstractThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/AbstractThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -353,8 +355,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value1\")",
|
"expression" : "guardVarEquals(\"value1\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 126
|
"lineNumber" : 126,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.AbstractThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/AbstractThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -372,8 +376,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value2\")",
|
"expression" : "guardVarEquals(\"value2\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 127
|
"lineNumber" : 127,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.AbstractThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/AbstractThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -405,8 +411,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 132
|
"lineNumber" : 132,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.AbstractThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/AbstractThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -438,8 +446,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value3\")",
|
"expression" : "guardVarEquals(\"value3\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 137
|
"lineNumber" : 137,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.AbstractThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/AbstractThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -471,8 +481,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"reset\")",
|
"expression" : "guardVarEquals(\"reset\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 142
|
"lineNumber" : 142,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.AbstractThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/AbstractThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -504,8 +516,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header2\",\"bar\")",
|
"expression" : "guardEventHeaderEquals(\"header2\",\"bar\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 147
|
"lineNumber" : 147,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.AbstractThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/AbstractThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -537,8 +551,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goTo13\")",
|
"expression" : "guardVarEquals(\"goTo13\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 152
|
"lineNumber" : 152,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.AbstractThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/AbstractThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -556,8 +572,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goTo14\")",
|
"expression" : "guardVarEquals(\"goTo14\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 153
|
"lineNumber" : 153,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.AbstractThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/AbstractThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -589,8 +607,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goBack10\")",
|
"expression" : "guardVarEquals(\"goBack10\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 158
|
"lineNumber" : 158,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.AbstractThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/AbstractThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -622,8 +642,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"loop12\")",
|
"expression" : "guardVarEquals(\"loop12\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 163
|
"lineNumber" : 163,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.AbstractThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/AbstractThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -655,8 +677,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBack\")",
|
"expression" : "guardVarEquals(\"stepBack\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 168
|
"lineNumber" : 168,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.AbstractThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/AbstractThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -674,8 +698,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBackMore\")",
|
"expression" : "guardVarEquals(\"stepBackMore\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 169
|
"lineNumber" : 169,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.AbstractThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/AbstractThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -707,8 +733,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"forward9\")",
|
"expression" : "guardVarEquals(\"forward9\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 174
|
"lineNumber" : 174,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.AbstractThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/AbstractThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -754,8 +782,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 31
|
"lineNumber" : 31,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate2.ThreeStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate2/ThreeStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
|
|||||||
@@ -320,8 +320,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value1\")",
|
"expression" : "guardVarEquals(\"value1\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 120
|
"lineNumber" : 120,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.AbstractTwoStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate/AbstractTwoStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -353,8 +355,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value1\")",
|
"expression" : "guardVarEquals(\"value1\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 126
|
"lineNumber" : 126,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.AbstractTwoStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate/AbstractTwoStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -372,8 +376,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value2\")",
|
"expression" : "guardVarEquals(\"value2\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 127
|
"lineNumber" : 127,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.AbstractTwoStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate/AbstractTwoStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -405,8 +411,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
"expression" : "guardEventHeaderEquals(\"header1\",\"foo\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 132
|
"lineNumber" : 132,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.AbstractTwoStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate/AbstractTwoStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -438,8 +446,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"value3\")",
|
"expression" : "guardVarEquals(\"value3\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 137
|
"lineNumber" : 137,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.AbstractTwoStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate/AbstractTwoStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -471,8 +481,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"reset\")",
|
"expression" : "guardVarEquals(\"reset\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 142
|
"lineNumber" : 142,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.AbstractTwoStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate/AbstractTwoStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -504,8 +516,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardEventHeaderEquals(\"header2\",\"bar\")",
|
"expression" : "guardEventHeaderEquals(\"header2\",\"bar\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object header=context.getMessageHeader(headerName);\n return expected.equals(header);\n}\n",
|
||||||
"lineNumber" : 147
|
"lineNumber" : 147,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.AbstractTwoStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate/AbstractTwoStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -537,8 +551,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goTo13\")",
|
"expression" : "guardVarEquals(\"goTo13\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 152
|
"lineNumber" : 152,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.AbstractTwoStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate/AbstractTwoStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -556,8 +572,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goTo14\")",
|
"expression" : "guardVarEquals(\"goTo14\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 153
|
"lineNumber" : 153,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.AbstractTwoStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate/AbstractTwoStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -589,8 +607,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"goBack10\")",
|
"expression" : "guardVarEquals(\"goBack10\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 158
|
"lineNumber" : 158,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.AbstractTwoStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate/AbstractTwoStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -622,8 +642,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"loop12\")",
|
"expression" : "guardVarEquals(\"loop12\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 163
|
"lineNumber" : 163,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.AbstractTwoStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate/AbstractTwoStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -655,8 +677,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBack\")",
|
"expression" : "guardVarEquals(\"stepBack\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 168
|
"lineNumber" : 168,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.AbstractTwoStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate/AbstractTwoStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
@@ -674,8 +698,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"stepBackMore\")",
|
"expression" : "guardVarEquals(\"stepBackMore\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 169
|
"lineNumber" : 169,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.AbstractTwoStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate/AbstractTwoStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 1
|
"order" : 1
|
||||||
@@ -707,8 +733,10 @@
|
|||||||
"guard" : {
|
"guard" : {
|
||||||
"expression" : "guardVarEquals(\"forward9\")",
|
"expression" : "guardVarEquals(\"forward9\")",
|
||||||
"isLambda" : false,
|
"isLambda" : false,
|
||||||
"internalLogic" : null,
|
"internalLogic" : "context -> {\n Object var=context.getExtendedState().getVariables().get(\"var\");\n return expected.equals(var);\n}\n",
|
||||||
"lineNumber" : 174
|
"lineNumber" : 174,
|
||||||
|
"className" : "click.kamil.examples.statemachine.inheritanceextrafunctionsstate.AbstractTwoStateMachineConfiguration",
|
||||||
|
"sourceFile" : "src/main/java/click/kamil/examples/statemachine/inheritanceextrafunctionsstate/AbstractTwoStateMachineConfiguration.java"
|
||||||
},
|
},
|
||||||
"actions" : [ ],
|
"actions" : [ ],
|
||||||
"order" : 0
|
"order" : 0
|
||||||
|
|||||||
@@ -357,10 +357,12 @@
|
|||||||
|
|
||||||
const card = document.createElement('div');
|
const card = document.createElement('div');
|
||||||
card.className = 'ep-card';
|
card.className = 'ep-card';
|
||||||
|
const sourceHint = ep.sourceFile ? `<div style="font-size:0.65rem; color:var(--text-muted); margin-top:4px; font-style:italic;">${ep.sourceFile}</div>` : '';
|
||||||
card.innerHTML = `
|
card.innerHTML = `
|
||||||
<div class="ep-type type-${ep.type.toLowerCase()}">${ep.type}</div>
|
<div class="ep-type type-${ep.type.toLowerCase()}">${ep.type}</div>
|
||||||
<div class="ep-name">${ep.name}</div>
|
<div class="ep-name">${ep.name}</div>
|
||||||
<div class="ep-fqn">${ep.className}.${ep.methodName}</div>
|
<div class="ep-fqn">${ep.className}.${ep.methodName}</div>
|
||||||
|
${sourceHint}
|
||||||
`;
|
`;
|
||||||
card.onmouseenter = () => highlightEntryPoint(ep);
|
card.onmouseenter = () => highlightEntryPoint(ep);
|
||||||
card.onmouseleave = clearHighlights;
|
card.onmouseleave = clearHighlights;
|
||||||
@@ -541,7 +543,7 @@
|
|||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
if (trans && trans.guard) {
|
if (trans && trans.guard) {
|
||||||
const lineInfo = trans.guard.lineNumber ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(Line: ${trans.guard.lineNumber})</span>` : '';
|
const lineInfo = trans.guard.lineNumber ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(${trans.guard.sourceFile || 'Source'}:${trans.guard.lineNumber})</span>` : '';
|
||||||
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Guard${lineInfo}</div>
|
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Guard${lineInfo}</div>
|
||||||
<div style="background:#f1f5f9; padding:6px; border-radius:4px; font-family:monospace; font-size:0.8rem; margin-bottom:12px; border:1px solid #e2e8f0;">${trans.guard.expression}</div>`;
|
<div style="background:#f1f5f9; padding:6px; border-radius:4px; font-family:monospace; font-size:0.8rem; margin-bottom:12px; border:1px solid #e2e8f0;">${trans.guard.expression}</div>`;
|
||||||
if (trans.guard.internalLogic) {
|
if (trans.guard.internalLogic) {
|
||||||
@@ -553,7 +555,7 @@
|
|||||||
if (trans && trans.actions && trans.actions.length > 0) {
|
if (trans && trans.actions && trans.actions.length > 0) {
|
||||||
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Actions</div>`;
|
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Actions</div>`;
|
||||||
trans.actions.forEach(action => {
|
trans.actions.forEach(action => {
|
||||||
const lineInfo = action.lineNumber ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(Line: ${action.lineNumber})</span>` : '';
|
const lineInfo = action.lineNumber ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(${action.sourceFile || 'Source'}:${action.lineNumber})</span>` : '';
|
||||||
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Action${lineInfo}</div>
|
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:4px">Action${lineInfo}</div>
|
||||||
<div style="background:#f1f5f9; padding:6px; border-radius:4px; font-family:monospace; font-size:0.8rem; margin-bottom:12px; border:1px solid #e2e8f0;">${action.expression}</div>`;
|
<div style="background:#f1f5f9; padding:6px; border-radius:4px; font-family:monospace; font-size:0.8rem; margin-bottom:12px; border:1px solid #e2e8f0;">${action.expression}</div>`;
|
||||||
if (action.internalLogic) {
|
if (action.internalLogic) {
|
||||||
@@ -566,8 +568,10 @@
|
|||||||
if (chains && chains.length > 0) {
|
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 #eee; padding-top:10px">Triggered by</div>`;
|
html += `<div style="font-size:0.7rem; font-weight:800; color:#94a3b8; text-transform:uppercase; margin-bottom:10px; border-top:1px solid #eee; padding-top:10px">Triggered by</div>`;
|
||||||
chains.forEach(c => {
|
chains.forEach(c => {
|
||||||
|
const triggerInfo = c.triggerPoint.sourceFile ? ` <span style="color:#94a3b8; font-weight:400; font-size:0.6rem;">(${c.triggerPoint.sourceFile}:${c.triggerPoint.lineNumber})</span>` : '';
|
||||||
html += `<div style="margin-bottom:20px">
|
html += `<div style="margin-bottom:20px">
|
||||||
<div style="font-weight:700; font-size:0.85rem; color:var(--text);">${c.entryPoint.name}</div>
|
<div style="font-weight:700; font-size:0.85rem; color:var(--text);">${c.entryPoint.name}</div>
|
||||||
|
<div style="font-size:0.65rem; color:#64748b; font-family:monospace; margin-top:2px;">Trigger: ${c.triggerPoint.methodName}${triggerInfo}</div>
|
||||||
${renderParameters(c.entryPoint.parameters)}
|
${renderParameters(c.entryPoint.parameters)}
|
||||||
<div style="margin-left:10px; border-left:2px solid #e2e8f0; padding-left:12px; margin-top:10px">
|
<div style="margin-left:10px; border-left:2px solid #e2e8f0; padding-left:12px; margin-top:10px">
|
||||||
${c.methodChain.map((m, i) => `<div style="font-size:0.7rem; color:#475569; margin-top:4px; font-family:'JetBrains Mono', monospace;"><b>${i+1}</b> ${m}</div>`).join('')}
|
${c.methodChain.map((m, i) => `<div style="font-size:0.7rem; color:#475569; margin-top:4px; font-family:'JetBrains Mono', monospace;"><b>${i+1}</b> ${m}</div>`).join('')}
|
||||||
|
|||||||
33
state_machines/maven_multi_module/.gitignore
vendored
Normal file
33
state_machines/maven_multi_module/.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
HELP.md
|
||||||
|
target/
|
||||||
|
.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
3
state_machines/maven_multi_module/.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
3
state_machines/maven_multi_module/.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
wrapperVersion=3.3.4
|
||||||
|
distributionType=only-script
|
||||||
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
|
||||||
33
state_machines/maven_multi_module/api-module/.gitignore
vendored
Normal file
33
state_machines/maven_multi_module/api-module/.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
HELP.md
|
||||||
|
target/
|
||||||
|
.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
22
state_machines/maven_multi_module/api-module/pom.xml
Normal file
22
state_machines/maven_multi_module/api-module/pom.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>click.kamil.maven</groupId>
|
||||||
|
<artifactId>maven-multi-module</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</parent>
|
||||||
|
<artifactId>api-module</artifactId>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-webflux</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-activemq</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package click.kamil.maven.api;
|
||||||
|
|
||||||
|
import org.springframework.jms.annotation.JmsListener;
|
||||||
|
|
||||||
|
public interface JmsOrderListener {
|
||||||
|
|
||||||
|
@JmsListener(destination = "order.queue")
|
||||||
|
void onMessage(String message);
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package click.kamil.maven.api;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
@RequestMapping("/maven/orders")
|
||||||
|
public interface MavenOrderApi {
|
||||||
|
|
||||||
|
@PostMapping("/submit")
|
||||||
|
void submitOrder(@RequestBody String orderId);
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package click.kamil.maven.api;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.reactive.function.server.RouterFunction;
|
||||||
|
import org.springframework.web.reactive.function.server.ServerResponse;
|
||||||
|
import static org.springframework.web.reactive.function.server.RouterFunctions.route;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class ReactiveOrderApi {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public RouterFunction<ServerResponse> orderRoutes() {
|
||||||
|
return route().POST("/reactive/order", request -> ServerResponse.ok().build()).build();
|
||||||
|
}
|
||||||
|
}
|
||||||
33
state_machines/maven_multi_module/base-module/.gitignore
vendored
Normal file
33
state_machines/maven_multi_module/base-module/.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
HELP.md
|
||||||
|
target/
|
||||||
|
.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
19
state_machines/maven_multi_module/base-module/pom.xml
Normal file
19
state_machines/maven_multi_module/base-module/pom.xml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>click.kamil.maven</groupId>
|
||||||
|
<artifactId>maven-multi-module</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</parent>
|
||||||
|
<artifactId>base-module</artifactId>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.statemachine</groupId>
|
||||||
|
<artifactId>spring-statemachine-core</artifactId>
|
||||||
|
<version>3.2.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package click.kamil.maven.base;
|
||||||
|
|
||||||
|
import org.springframework.statemachine.StateContext;
|
||||||
|
import org.springframework.statemachine.action.Action;
|
||||||
|
import org.springframework.statemachine.config.StateMachineConfigurerAdapter;
|
||||||
|
import org.springframework.statemachine.config.builders.StateMachineStateConfigurer;
|
||||||
|
|
||||||
|
public abstract class AbstractMavenStateMachine extends StateMachineConfigurerAdapter<String, String> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void configure(StateMachineStateConfigurer<String, String> states) throws Exception {
|
||||||
|
states
|
||||||
|
.withStates()
|
||||||
|
.initial("INIT")
|
||||||
|
.state("BUSY")
|
||||||
|
.end("DONE");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Action<String, String> loggingAction() {
|
||||||
|
return context -> {
|
||||||
|
System.out.println("LOG: State transition in progress...");
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
33
state_machines/maven_multi_module/core-module/.gitignore
vendored
Normal file
33
state_machines/maven_multi_module/core-module/.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
HELP.md
|
||||||
|
target/
|
||||||
|
.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
38
state_machines/maven_multi_module/core-module/pom.xml
Normal file
38
state_machines/maven_multi_module/core-module/pom.xml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>click.kamil.maven</groupId>
|
||||||
|
<artifactId>maven-multi-module</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</parent>
|
||||||
|
<artifactId>core-module</artifactId>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>click.kamil.maven</groupId>
|
||||||
|
<artifactId>base-module</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>click.kamil.maven</groupId>
|
||||||
|
<artifactId>api-module</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-webflux</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.statemachine</groupId>
|
||||||
|
<artifactId>spring-statemachine-core</artifactId>
|
||||||
|
<version>3.2.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package click.kamil.maven.core;
|
||||||
|
|
||||||
|
import click.kamil.maven.api.JmsOrderListener;
|
||||||
|
import click.kamil.maven.api.MavenOrderApi;
|
||||||
|
import click.kamil.maven.base.AbstractMavenStateMachine;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.statemachine.StateMachine;
|
||||||
|
import org.springframework.statemachine.config.EnableStateMachineFactory;
|
||||||
|
import org.springframework.statemachine.config.StateMachineFactory;
|
||||||
|
import org.springframework.statemachine.config.builders.StateMachineTransitionConfigurer;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@EnableStateMachineFactory
|
||||||
|
public class MavenOrderStateMachine extends AbstractMavenStateMachine {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void configure(StateMachineTransitionConfigurer<String, String> transitions) throws Exception {
|
||||||
|
transitions
|
||||||
|
.withExternal()
|
||||||
|
.source("INIT").target("BUSY")
|
||||||
|
.event("SUBMIT")
|
||||||
|
.action(loggingAction())
|
||||||
|
.and()
|
||||||
|
.withExternal()
|
||||||
|
.source("BUSY").target("DONE")
|
||||||
|
.event("ORDER_EVENT");
|
||||||
|
}
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public static class OrderController implements MavenOrderApi {
|
||||||
|
private final StateMachineFactory<String, String> factory;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void submitOrder(String orderId) {
|
||||||
|
StateMachine<String, String> sm = factory.getStateMachine(orderId);
|
||||||
|
sm.sendEvent("SUBMIT");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public static class OrderService implements JmsOrderListener {
|
||||||
|
private final StateMachineFactory<String, String> factory;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onMessage(String message) {
|
||||||
|
StateMachine<String, String> sm = factory.getStateMachine();
|
||||||
|
sm.sendEvent("ORDER_EVENT");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
295
state_machines/maven_multi_module/mvnw
vendored
Executable file
295
state_machines/maven_multi_module/mvnw
vendored
Executable file
@@ -0,0 +1,295 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Apache Maven Wrapper startup batch script, version 3.3.4
|
||||||
|
#
|
||||||
|
# Optional ENV vars
|
||||||
|
# -----------------
|
||||||
|
# JAVA_HOME - location of a JDK home dir, required when download maven via java source
|
||||||
|
# MVNW_REPOURL - repo url base for downloading maven distribution
|
||||||
|
# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
|
||||||
|
# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
set -euf
|
||||||
|
[ "${MVNW_VERBOSE-}" != debug ] || set -x
|
||||||
|
|
||||||
|
# OS specific support.
|
||||||
|
native_path() { printf %s\\n "$1"; }
|
||||||
|
case "$(uname)" in
|
||||||
|
CYGWIN* | MINGW*)
|
||||||
|
[ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")"
|
||||||
|
native_path() { cygpath --path --windows "$1"; }
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# set JAVACMD and JAVACCMD
|
||||||
|
set_java_home() {
|
||||||
|
# For Cygwin and MinGW, ensure paths are in Unix format before anything is touched
|
||||||
|
if [ -n "${JAVA_HOME-}" ]; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ]; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
|
JAVACCMD="$JAVA_HOME/jre/sh/javac"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
JAVACCMD="$JAVA_HOME/bin/javac"
|
||||||
|
|
||||||
|
if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then
|
||||||
|
echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2
|
||||||
|
echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="$(
|
||||||
|
'set' +e
|
||||||
|
'unset' -f command 2>/dev/null
|
||||||
|
'command' -v java
|
||||||
|
)" || :
|
||||||
|
JAVACCMD="$(
|
||||||
|
'set' +e
|
||||||
|
'unset' -f command 2>/dev/null
|
||||||
|
'command' -v javac
|
||||||
|
)" || :
|
||||||
|
|
||||||
|
if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then
|
||||||
|
echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# hash string like Java String::hashCode
|
||||||
|
hash_string() {
|
||||||
|
str="${1:-}" h=0
|
||||||
|
while [ -n "$str" ]; do
|
||||||
|
char="${str%"${str#?}"}"
|
||||||
|
h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296))
|
||||||
|
str="${str#?}"
|
||||||
|
done
|
||||||
|
printf %x\\n $h
|
||||||
|
}
|
||||||
|
|
||||||
|
verbose() { :; }
|
||||||
|
[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; }
|
||||||
|
|
||||||
|
die() {
|
||||||
|
printf %s\\n "$1" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
trim() {
|
||||||
|
# MWRAPPER-139:
|
||||||
|
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
|
||||||
|
# Needed for removing poorly interpreted newline sequences when running in more
|
||||||
|
# exotic environments such as mingw bash on Windows.
|
||||||
|
printf "%s" "${1}" | tr -d '[:space:]'
|
||||||
|
}
|
||||||
|
|
||||||
|
scriptDir="$(dirname "$0")"
|
||||||
|
scriptName="$(basename "$0")"
|
||||||
|
|
||||||
|
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
|
||||||
|
while IFS="=" read -r key value; do
|
||||||
|
case "${key-}" in
|
||||||
|
distributionUrl) distributionUrl=$(trim "${value-}") ;;
|
||||||
|
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
|
||||||
|
esac
|
||||||
|
done <"$scriptDir/.mvn/wrapper/maven-wrapper.properties"
|
||||||
|
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
|
||||||
|
|
||||||
|
case "${distributionUrl##*/}" in
|
||||||
|
maven-mvnd-*bin.*)
|
||||||
|
MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/
|
||||||
|
case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in
|
||||||
|
*AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;;
|
||||||
|
:Darwin*x86_64) distributionPlatform=darwin-amd64 ;;
|
||||||
|
:Darwin*arm64) distributionPlatform=darwin-aarch64 ;;
|
||||||
|
:Linux*x86_64*) distributionPlatform=linux-amd64 ;;
|
||||||
|
*)
|
||||||
|
echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2
|
||||||
|
distributionPlatform=linux-amd64
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip"
|
||||||
|
;;
|
||||||
|
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;;
|
||||||
|
*) MVN_CMD="mvn${scriptName#mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# apply MVNW_REPOURL and calculate MAVEN_HOME
|
||||||
|
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
|
||||||
|
[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}"
|
||||||
|
distributionUrlName="${distributionUrl##*/}"
|
||||||
|
distributionUrlNameMain="${distributionUrlName%.*}"
|
||||||
|
distributionUrlNameMain="${distributionUrlNameMain%-bin}"
|
||||||
|
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}"
|
||||||
|
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
|
||||||
|
|
||||||
|
exec_maven() {
|
||||||
|
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :
|
||||||
|
exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -d "$MAVEN_HOME" ]; then
|
||||||
|
verbose "found existing MAVEN_HOME at $MAVEN_HOME"
|
||||||
|
exec_maven "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "${distributionUrl-}" in
|
||||||
|
*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;;
|
||||||
|
*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# prepare tmp dir
|
||||||
|
if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then
|
||||||
|
clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; }
|
||||||
|
trap clean HUP INT TERM EXIT
|
||||||
|
else
|
||||||
|
die "cannot create temp dir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p -- "${MAVEN_HOME%/*}"
|
||||||
|
|
||||||
|
# Download and Install Apache Maven
|
||||||
|
verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
|
||||||
|
verbose "Downloading from: $distributionUrl"
|
||||||
|
verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
|
||||||
|
|
||||||
|
# select .zip or .tar.gz
|
||||||
|
if ! command -v unzip >/dev/null; then
|
||||||
|
distributionUrl="${distributionUrl%.zip}.tar.gz"
|
||||||
|
distributionUrlName="${distributionUrl##*/}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# verbose opt
|
||||||
|
__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR=''
|
||||||
|
[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v
|
||||||
|
|
||||||
|
# normalize http auth
|
||||||
|
case "${MVNW_PASSWORD:+has-password}" in
|
||||||
|
'') MVNW_USERNAME='' MVNW_PASSWORD='' ;;
|
||||||
|
has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then
|
||||||
|
verbose "Found wget ... using wget"
|
||||||
|
wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl"
|
||||||
|
elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then
|
||||||
|
verbose "Found curl ... using curl"
|
||||||
|
curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl"
|
||||||
|
elif set_java_home; then
|
||||||
|
verbose "Falling back to use Java to download"
|
||||||
|
javaSource="$TMP_DOWNLOAD_DIR/Downloader.java"
|
||||||
|
targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName"
|
||||||
|
cat >"$javaSource" <<-END
|
||||||
|
public class Downloader extends java.net.Authenticator
|
||||||
|
{
|
||||||
|
protected java.net.PasswordAuthentication getPasswordAuthentication()
|
||||||
|
{
|
||||||
|
return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() );
|
||||||
|
}
|
||||||
|
public static void main( String[] args ) throws Exception
|
||||||
|
{
|
||||||
|
setDefault( new Downloader() );
|
||||||
|
java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
END
|
||||||
|
# For Cygwin/MinGW, switch paths to Windows format before running javac and java
|
||||||
|
verbose " - Compiling Downloader.java ..."
|
||||||
|
"$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java"
|
||||||
|
verbose " - Running Downloader.java ..."
|
||||||
|
"$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If specified, validate the SHA-256 sum of the Maven distribution zip file
|
||||||
|
if [ -n "${distributionSha256Sum-}" ]; then
|
||||||
|
distributionSha256Result=false
|
||||||
|
if [ "$MVN_CMD" = mvnd.sh ]; then
|
||||||
|
echo "Checksum validation is not supported for maven-mvnd." >&2
|
||||||
|
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
|
||||||
|
exit 1
|
||||||
|
elif command -v sha256sum >/dev/null; then
|
||||||
|
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then
|
||||||
|
distributionSha256Result=true
|
||||||
|
fi
|
||||||
|
elif command -v shasum >/dev/null; then
|
||||||
|
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then
|
||||||
|
distributionSha256Result=true
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2
|
||||||
|
echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ $distributionSha256Result = false ]; then
|
||||||
|
echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2
|
||||||
|
echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# unzip and move
|
||||||
|
if command -v unzip >/dev/null; then
|
||||||
|
unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip"
|
||||||
|
else
|
||||||
|
tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Find the actual extracted directory name (handles snapshots where filename != directory name)
|
||||||
|
actualDistributionDir=""
|
||||||
|
|
||||||
|
# First try the expected directory name (for regular distributions)
|
||||||
|
if [ -d "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" ]; then
|
||||||
|
if [ -f "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/bin/$MVN_CMD" ]; then
|
||||||
|
actualDistributionDir="$distributionUrlNameMain"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If not found, search for any directory with the Maven executable (for snapshots)
|
||||||
|
if [ -z "$actualDistributionDir" ]; then
|
||||||
|
# enable globbing to iterate over items
|
||||||
|
set +f
|
||||||
|
for dir in "$TMP_DOWNLOAD_DIR"/*; do
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
if [ -f "$dir/bin/$MVN_CMD" ]; then
|
||||||
|
actualDistributionDir="$(basename "$dir")"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
set -f
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$actualDistributionDir" ]; then
|
||||||
|
verbose "Contents of $TMP_DOWNLOAD_DIR:"
|
||||||
|
verbose "$(ls -la "$TMP_DOWNLOAD_DIR")"
|
||||||
|
die "Could not find Maven distribution directory in extracted archive"
|
||||||
|
fi
|
||||||
|
|
||||||
|
verbose "Found extracted Maven distribution directory: $actualDistributionDir"
|
||||||
|
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$actualDistributionDir/mvnw.url"
|
||||||
|
mv -- "$TMP_DOWNLOAD_DIR/$actualDistributionDir" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME"
|
||||||
|
|
||||||
|
clean || :
|
||||||
|
exec_maven "$@"
|
||||||
189
state_machines/maven_multi_module/mvnw.cmd
vendored
Normal file
189
state_machines/maven_multi_module/mvnw.cmd
vendored
Normal file
@@ -0,0 +1,189 @@
|
|||||||
|
<# : batch portion
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
@REM or more contributor license agreements. See the NOTICE file
|
||||||
|
@REM distributed with this work for additional information
|
||||||
|
@REM regarding copyright ownership. The ASF licenses this file
|
||||||
|
@REM to you under the Apache License, Version 2.0 (the
|
||||||
|
@REM "License"); you may not use this file except in compliance
|
||||||
|
@REM with the License. You may obtain a copy of the License at
|
||||||
|
@REM
|
||||||
|
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@REM
|
||||||
|
@REM Unless required by applicable law or agreed to in writing,
|
||||||
|
@REM software distributed under the License is distributed on an
|
||||||
|
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
@REM KIND, either express or implied. See the License for the
|
||||||
|
@REM specific language governing permissions and limitations
|
||||||
|
@REM under the License.
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
@REM Apache Maven Wrapper startup batch script, version 3.3.4
|
||||||
|
@REM
|
||||||
|
@REM Optional ENV vars
|
||||||
|
@REM MVNW_REPOURL - repo url base for downloading maven distribution
|
||||||
|
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
|
||||||
|
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
|
||||||
|
@SET __MVNW_CMD__=
|
||||||
|
@SET __MVNW_ERROR__=
|
||||||
|
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
|
||||||
|
@SET PSModulePath=
|
||||||
|
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @(
|
||||||
|
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B)
|
||||||
|
)
|
||||||
|
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
|
||||||
|
@SET __MVNW_PSMODULEP_SAVE=
|
||||||
|
@SET __MVNW_ARG0_NAME__=
|
||||||
|
@SET MVNW_USERNAME=
|
||||||
|
@SET MVNW_PASSWORD=
|
||||||
|
@IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*)
|
||||||
|
@echo Cannot start maven from wrapper >&2 && exit /b 1
|
||||||
|
@GOTO :EOF
|
||||||
|
: end batch / begin powershell #>
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
if ($env:MVNW_VERBOSE -eq "true") {
|
||||||
|
$VerbosePreference = "Continue"
|
||||||
|
}
|
||||||
|
|
||||||
|
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties
|
||||||
|
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl
|
||||||
|
if (!$distributionUrl) {
|
||||||
|
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
|
||||||
|
}
|
||||||
|
|
||||||
|
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {
|
||||||
|
"maven-mvnd-*" {
|
||||||
|
$USE_MVND = $true
|
||||||
|
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip"
|
||||||
|
$MVN_CMD = "mvnd.cmd"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
default {
|
||||||
|
$USE_MVND = $false
|
||||||
|
$MVN_CMD = $script -replace '^mvnw','mvn'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# apply MVNW_REPOURL and calculate MAVEN_HOME
|
||||||
|
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
|
||||||
|
if ($env:MVNW_REPOURL) {
|
||||||
|
$MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" }
|
||||||
|
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')"
|
||||||
|
}
|
||||||
|
$distributionUrlName = $distributionUrl -replace '^.*/',''
|
||||||
|
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
|
||||||
|
|
||||||
|
$MAVEN_M2_PATH = "$HOME/.m2"
|
||||||
|
if ($env:MAVEN_USER_HOME) {
|
||||||
|
$MAVEN_M2_PATH = "$env:MAVEN_USER_HOME"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not (Test-Path -Path $MAVEN_M2_PATH)) {
|
||||||
|
New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
$MAVEN_WRAPPER_DISTS = $null
|
||||||
|
if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) {
|
||||||
|
$MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists"
|
||||||
|
} else {
|
||||||
|
$MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists"
|
||||||
|
}
|
||||||
|
|
||||||
|
$MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain"
|
||||||
|
$MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
|
||||||
|
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
|
||||||
|
|
||||||
|
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
|
||||||
|
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME"
|
||||||
|
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
|
||||||
|
exit $?
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {
|
||||||
|
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl"
|
||||||
|
}
|
||||||
|
|
||||||
|
# prepare tmp dir
|
||||||
|
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile
|
||||||
|
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir"
|
||||||
|
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null
|
||||||
|
trap {
|
||||||
|
if ($TMP_DOWNLOAD_DIR.Exists) {
|
||||||
|
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
|
||||||
|
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null
|
||||||
|
|
||||||
|
# Download and Install Apache Maven
|
||||||
|
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
|
||||||
|
Write-Verbose "Downloading from: $distributionUrl"
|
||||||
|
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
|
||||||
|
|
||||||
|
$webclient = New-Object System.Net.WebClient
|
||||||
|
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {
|
||||||
|
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)
|
||||||
|
}
|
||||||
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||||
|
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null
|
||||||
|
|
||||||
|
# If specified, validate the SHA-256 sum of the Maven distribution zip file
|
||||||
|
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum
|
||||||
|
if ($distributionSha256Sum) {
|
||||||
|
if ($USE_MVND) {
|
||||||
|
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties."
|
||||||
|
}
|
||||||
|
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash
|
||||||
|
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {
|
||||||
|
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# unzip and move
|
||||||
|
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null
|
||||||
|
|
||||||
|
# Find the actual extracted directory name (handles snapshots where filename != directory name)
|
||||||
|
$actualDistributionDir = ""
|
||||||
|
|
||||||
|
# First try the expected directory name (for regular distributions)
|
||||||
|
$expectedPath = Join-Path "$TMP_DOWNLOAD_DIR" "$distributionUrlNameMain"
|
||||||
|
$expectedMvnPath = Join-Path "$expectedPath" "bin/$MVN_CMD"
|
||||||
|
if ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) {
|
||||||
|
$actualDistributionDir = $distributionUrlNameMain
|
||||||
|
}
|
||||||
|
|
||||||
|
# If not found, search for any directory with the Maven executable (for snapshots)
|
||||||
|
if (!$actualDistributionDir) {
|
||||||
|
Get-ChildItem -Path "$TMP_DOWNLOAD_DIR" -Directory | ForEach-Object {
|
||||||
|
$testPath = Join-Path $_.FullName "bin/$MVN_CMD"
|
||||||
|
if (Test-Path -Path $testPath -PathType Leaf) {
|
||||||
|
$actualDistributionDir = $_.Name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$actualDistributionDir) {
|
||||||
|
Write-Error "Could not find Maven distribution directory in extracted archive"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Verbose "Found extracted Maven distribution directory: $actualDistributionDir"
|
||||||
|
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$actualDistributionDir" -NewName $MAVEN_HOME_NAME | Out-Null
|
||||||
|
try {
|
||||||
|
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null
|
||||||
|
} catch {
|
||||||
|
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) {
|
||||||
|
Write-Error "fail to move MAVEN_HOME"
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
|
||||||
|
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
|
||||||
59
state_machines/maven_multi_module/pom.xml
Normal file
59
state_machines/maven_multi_module/pom.xml
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>click.kamil.maven</groupId>
|
||||||
|
<artifactId>maven-multi-module</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>base-module</module>
|
||||||
|
<module>api-module</module>
|
||||||
|
<module>core-module</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
|
<spring-boot.version>3.2.0</spring-boot.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-dependencies</artifactId>
|
||||||
|
<version>${spring-boot.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.30</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.11.0</version>
|
||||||
|
<configuration>
|
||||||
|
<annotationProcessorPaths>
|
||||||
|
<path>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.30</version>
|
||||||
|
</path>
|
||||||
|
</annotationProcessorPaths>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -7,6 +7,8 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compileOnly 'org.projectlombok:lombok:1.18.30'
|
||||||
|
annotationProcessor 'org.projectlombok:lombok:1.18.30'
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-web:3.2.0'
|
implementation 'org.springframework.boot:spring-boot-starter-web:3.2.0'
|
||||||
implementation 'org.springframework.statemachine:spring-statemachine-core:3.2.0'
|
implementation 'org.springframework.statemachine:spring-statemachine-core:3.2.0'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compileOnly 'org.projectlombok:lombok:1.18.30'
|
||||||
|
annotationProcessor 'org.projectlombok:lombok:1.18.30'
|
||||||
implementation project(':state_machines:multi_module_sample:api-module')
|
implementation project(':state_machines:multi_module_sample:api-module')
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-web:3.2.0'
|
implementation 'org.springframework.boot:spring-boot-starter-web:3.2.0'
|
||||||
implementation 'org.springframework.statemachine:spring-statemachine-core:3.2.0'
|
implementation 'org.springframework.statemachine:spring-statemachine-core:3.2.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user