There's some way to generate diagrams for spring integration dsl flows?
Asked Answered
H

1

7

I have a running app that defines some spring integration flows with inbound/outbound gateways, splitters, aggregators,routers and etc...

These flows are all created using spring integration dsl and annotations... so no XML's.

There is any tool out there that can generate the EE patterns diagrams for it?

This question states that Intellij can do it for xml configurations... I want something similar that works with dsl IntegrationFlow's

Hebbel answered 18/12, 2017 at 13:15 Comment(0)
J
7

There is Spring Flo project and based on its foundation we have expose the IntegrationGraphController with the Graph tree to represent integration flows as JSON. That model can be used to visualize realtime of your application.

In addition we have a sample application with the mentioned functionality.

EDIT

The spring-flo project is in the process of being migrated to angular 4/5.

To build and run the viewer:

git checkout angular-1.x
cd samples/spring-flo-si
mvn clean package
java -jar target/spring-flo-sample-si-0.0.1.BUILD-SNAPSHOT.jar

In a browser go to http://localhost:8082 and enter the URL for your app that has the integration graph enabled; click Load.

Enabling the graph endpoint is documented here.

Jetta answered 18/12, 2017 at 14:12 Comment(13)
I added instructions for building/running the viewer.Rycca
Is it possible to use Spring Flo for XML configuration based project?Lashay
The Flo output model is based on the IntegrationGraph result: docs.spring.io/spring-integration/docs/5.0.5.RELEASE/reference/…. Which is really just a reflection of application context state and that already doesn't matter from where we get Spring Integration beans: XML, Java DSL or just manual beans registration.Jetta
I just repeated the steps above, the build and run was successful, but in the browser console I get: Loading failed for the <script> with source “http://localhost:8082/webjars/lodash/lodash.js”. localhost:8082:1 Error: Script error for "lodash" require.js:168:17 http://requirejs.org/docs/errors.html#scripterror Error: Load timeout for modules: flo,joint,dagre,graphlib require.js:168:17 http://requirejs.org/docs/errors.html#timeout Meatiness
Is this still doable with new versions?Forelock
We don't support that project any more. We work on something new these days. And here is our latest version: si-view.cfapps.io. It's not available for the public yet.Jetta
I followed the steps and I am also getting the same error as Boris. Is there a way to make it work?Jew
When executing java -jar target/spring-flo-sample-si-0.0.1.BUILD-SNAPSHOT.jar I get an exception ... caused by ... Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1 at org.hibernate.validator.internal.util.Version.getJavaRelease(Version.java:36) ~[hibernate-validator-5.2.2.Final.jar!/:5.2.2.Final]Picturize
Then I tried doing what was written in the readme mvn spring-boot:run and got and exception ... Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @4243eac2Picturize
Finally I saw the collapsed comment saying that there was a new project at si-view.cfapps.io, but that link seems to be dead.Picturize
That’s correct. We’ve been side tracked and don’t support those projects at the moment and there is no any out-of-the-box visualizer in our hands right now. We will see in a nearest future what we may suggest. Meanwhile you can take some ideas from here: toparvion.pro/en/post/2020/integraphJetta
Thanks Artem ! I'll take a look !Picturize
In the mean time, these instructions with a pre built JAR actually still work ! github.com/spring-projects/sts4/issues/…Picturize

© 2022 - 2024 — McMap. All rights reserved.