I'm looking for ways to generate Sequence Diagrams out of programmed Logic. I do not mean rendering them out of e.g. text. A lot of post talk about generating, but I see that as rendering/drawing. I've searched the internet and most found textual tools (like PlantUML) or intuitive graphical payed tools. I'm not looking for either. But I want to program the message flow and let the system draw it based on possible choices. One reason for it is that the conditional if then else with 'alt' is not very useful (my opinion) if the else triggers a whole different path. It works for one different return, but it becomes very ugly soon (again my opinion). The other reason is that I'm busy developing such a generating tool myself and I'm wondering if I do not try the make something nobody is waiting for. Except the fact that it is a nice hobby project for myself. For me it made sense to make it as it Interactively creates the Message Diagrams which are very helpful during the development process or pass on knowledge. Perhaps it could even validate the logic on dead ends. The third reason is that the text becomes complex by itself to maintain (see example below). The fourth reason is that I believe in automating a process that can/should be automated as we should not be busy drawing stuff but writing logic. So is anybody aware of generating (not draw/render) tools available for sequence diagrams?
The following examples were created where the difference started at invalid/valid card, which is difficult to capture in an if/then/else. And even so other choices are made along the way.
Invalid card, choices: electronic -> chip -> invalid card -> keep goods
Merchant Customer Terminal
| | |
+-inform-amount | |
|---choose-method--->| |
|<--chooses-terminal-| |
+-enters-amount | |
|------------start-payment----------->|
| |<--show-amount--|
| +-inserts-card |
| |-method-chosen->|
| |<--card-invalid-|
| +-pay-different |
|<-----------payment-failed-----------|
+-goods-left-behind | |
+-customer-leaves | |
Valid card, choices: electronic -> chip -> valid card -> auth valid -> enough balance
Merchant Customer Terminal Secure-Intf Acc-Srv Acc-DB
| | | | | |
+-inform-amount | | | | |
|----choose-method--->| | | | |
|<--chooses-terminal--| | | | |
+-enters-amount | | | | |
|-------------start-payment------------->| | | |
| |<---show-amount---| | | |
| +-inserts-card | | | |
| |--method-chosen-->| | | |
| |<----card-valid---| | | |
| +-enter-pin | | | |
| |---validate-pin-->| | | |
| | |--sec:authorize-->| | |
| | | |--verify-login-->| |
| | | | |---get-login-details-->|
| | | | |<-----login-details----|
| | | |<-login-response-| |
| | |<--sec:auth-valid-| | |
| | |---sec:transfer-->| | |
| | | |----transfer---->| |
| | | | |------get-balance----->|
| | | | |<-----balance-info-----|
| | | | |-upd-checking-balance->|
| | | | |-upd-merchant-balance->|
| | | | |----commit-changes---->|
| | | | |<---changes-committed--|
| | | |<---transferred--| |
| | |<-sec:transferred-| | |
|<-----------payment-successful----------| | | |
+-goods-given | | | | |
| |<-------paid------| | | |
| +-customer-leaves | | | |
Textual code valid for several free drawing tools. If any changes are needed then I think it becomes difficult to maintain. I rather generate them.
title MSG-Flow for 'Merchant-flows'
participant "Merchant" as Merchant
participant "Customer" as Customer
participant "Terminal" as Terminal
participant "Secure Intf" as Secure_Intf
participant "Acc Srv" as Acc_Srv
participant "Acc DB" as Acc_DB
note left of Merchant: inform-amount
Merchant -> Customer: choose-method
Customer -> Merchant: chooses-terminal
note left of Merchant: enters-amount
Merchant -> Terminal: start-payment
Terminal -> Customer: show-amount
note right of Customer: inserts-card
Customer -> Terminal: method-chosen
Terminal -> Customer: card-valid
note right of Customer: enter-pin
Customer -> Terminal: validate-pin
Terminal -> Secure_Intf: sec:authorize
Secure_Intf -> Acc_Srv: verify-login
Acc_Srv -> Acc_DB: get-login-details
Acc_DB -> Acc_Srv: login-details
Acc_Srv -> Secure_Intf: login-response
Secure_Intf -> Terminal: sec:auth-valid
Terminal -> Secure_Intf: sec:transfer
Secure_Intf -> Acc_Srv: transfer
Acc_Srv -> Acc_DB: get-balance
Acc_DB -> Acc_Srv: balance-info
Acc_Srv -> Acc_DB: upd-checking-balance
Acc_Srv -> Acc_DB: upd-merchant-balance
Acc_Srv -> Acc_DB: commit-changes
Acc_DB -> Acc_Srv: changes-committed
Acc_Srv -> Secure_Intf: transferred
Secure_Intf -> Terminal: sec:transferred
Terminal -> Merchant: payment-successful
note left of Merchant: goods-given
Terminal -> Customer: paid
note right of Customer: customer-leaves
So is anybody aware of generating (not draw/render) tools available for sequence diagrams?

