March 25, 2015

How to Create a Diagram of an OSB Domain

A 10000-ft view of an OSB domain, in 5 minutes, with TransitMap.

Is it possible to understand the inter-connectivity of a complex OSB domain?

Is walking through the code step by step and making notes, both on paper and mentally, the only way?

Can we generate a diagram of the domain?

I have created a utility that visualizes an OSB domain or a selected subset of projects in one, to help me in figuring out some of the most complex projects I have to work with.

The utility is named TransitMap, and it can be downloaded free from a Bitbucket repository.

I believe it could be useful for many other OSB developers - to understand the code we deal with, for documenting, for knowledge transfers or to support a proposed solution.

Here are just a few short examples of how it can be used.

Build a Complete Domain Map

NOTE: If your domain includes a large number of dynamic routings, you may need to help TransitMap to find those dynamic links. Read the **Mapping Dynamic Routes** section in the overview in the repository.

To build a map of a full domain, I need to point TransitMap to the root of the OSB 11 source tree (i.e. the sources as checked out from version control and read by Eclipse):

C:\Users\GPS\Work\TransitMap\dist> java -jar TransitMap.jar C:\Work\OSB\Workspace\

Sources: C:\Users\GPS\Work\JSONDirect\
Reading C:\Users\GPS\Work\JSONDirect\...
Collected 25 resources, 16 links.
Removed 0 not-included or excluded services and links.
Total links: 16
Removed 3 duplicate link(s).
Wrote C:\Users\GPS\Work\TransitMap\dist\TransitMap.html.

TransitMapPostFullDomain

Build a Map of a Project (or a few)

Here I only mapping the resources that have the word “Transaction” in their path.

C:\Users\GPS\Work\TransitMap\dist>java -jar TransitMap.jar C:\Users\GPS\Work\JSONDirect\ -i ".*Transaction.*" -o Transaction.html

Sources: C:\Users\GPS\Work\JSONDirect\
Reading C:\Users\GPS\Work\JSONDirect\...
Collected 25 resources, 16 links.
Removed 20 not-included or excluded services and links.
Total links: 9
Removed 3 duplicate link(s).
Wrote C:\Users\GPS\Work\TransitMap\dist\Transaction.html.

The UnitOfOrder and JSONDirect projects are not included in the resulting diagram:

TransitMapPostIncluded

Amend the Existing Domain with Proposed Changes

Let’s add a totally imaginary set of resources to our domain.

I need a JSON relation file, let’s call it reliable-messaging.json:

{"name":"Submit/EntryProxy.proxy","uri":"/Submit","title":"/EntryProxy"}
{"name":"Submit/Store.biz","uri":"jms:///cf/StoreAndForwardQueue"}
{"name":"Process/Read.proxy","uri":"jms:///cf/StoreAndForwardQueue"}
{"name":"Process/Parallel.flow"}
{"name":"Process/Enrich.proxy"}
{"name":"Process/Callout.proxy"}
{"name":"Process/Callout.biz"}

{"source":"Submit/EntryProxy.proxy","target":"Submit/Store.biz"}
{"source":"Process/Read.proxy","target":"Process/Parallel.flow"}
{"source":"Process/Parallel.flow","target":"Process/Enrich.proxy"}
{"source":"Process/Parallel.flow","target":"Process/Callout.proxy"}
{"source":"Process/Callout.proxy","target":"Process/Callout.biz"}

Now I feed it to TransitMap along with the actual domain:

C:\Users\GPS\Work\TransitMap\dist>java -jar TransitMap.jar C:\Users\GPS\Work\JSONDirect\ reliable-messaging.json -o Amended.html

Sources: C:\Users\GPS\Work\JSONDirect\
Reading C:\Users\GPS\Work\JSONDirect\...
Collected 25 resources, 16 links.
Reading reliable-messaging.json...
Collected 7 resources, 5 links.
Removed 0 not-included or excluded services and links.
Total links: 21
Removed 3 duplicate link(s).
Wrote C:\Users\GPS\Work\TransitMap\dist\Amended.html.

And I get a diagram of the proposed change that includes two more projects: Submit and Process:

TransitMapPostAmended

Want to know more? Check out the repository or just email me!

Vladimir Dyuzhev, author of GenericParallel

About Me

My name is Vladimir Dyuzhev, and I'm the author of GenericParallel, an OSB proxy service for making parallel calls effortlessly and MockMotor, a powerful mock server.

I'm building SOA enterprise systems for clients large and small for almost 20 years. Most of that time I've been working with BEA (later Oracle) Weblogic platform, including OSB and other SOA systems.

Feel free to contact me if you have a SOA project to design and implement. See my profile on LinkedIn.

I live in Toronto, Ontario, Canada.  canada   Email me at info@genericparallel.com