Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

A brand new way to create sequence diagrams with ChatGPT


The concept of generating sequence diagrams from text or code is far from novel. In fact, a plethora of tools, including ZenUML, Mermaid, and PlantUML, have long since provided this functionality.

However, the advent of ChatGPT has revolutionized this process by empowering users to create diagrams using natural language. For instance, the diagram displayed on the right has been crafted from the paragraphs on the left.

Screenshot 2023-04-27 at 9.31.59 pm.png

Experience this groundbreaking technology firsthand by giving it a try yourself.

Step 1: Open

We suggest utilizing GPT-4, as GPT-3.5 may not consistently deliver the same level of response quality.

Step 2: Past the following prompt to ChatGPT

Here is a DSL example. Lines starts with '//' are comments.
Write a DSL for a new scenario. Do not explain the DSL you generate.
Do not generate classes. We do not have 'class' keyword. Whenever possible put the whole process together instead of split it into multiple processes.

BookLibService.Borrow(id) {
User = Session.GetUser() {
if(User.isActive) {
BookRepository.“Update the table by id etc.”
receipt = new Receipt(id, dueDate)
return receipt
# Message types
1. Sync message: Represents a synchronous message between participants. Syntax: `Participant.Method`
2. Creation message: Represents the creation of a new instance of a class. Syntax: `new ClassName()`
**Special Structures:**
1. Loop: Represents a loop in the sequence. Examples: for(condition) { other messages }
2. Alt: Represents conditional branching in the sequence. Example: `if (condition1) {} else if (condition2) {} else {}`

----New scenario----
There is an Order Service which is a RESTFul service served at the endpoint called `/orders`. Client will call this service with order details such as list of products, prices and relevant promotions. Once the service receives the order details, it will first validate the order. If it is valid it will create an order object and save it into database.

Please generate the DSL and put it in a code block.

Chat GPT should produce something like this.


OrderService.CreateOrder(orderDetails) {
isValid = OrderValidator.Validate(orderDetails) {
if (isValid) {
order = new Order(orderDetails)
OrderRepository.Save(order) {
} else {
return "Invalid order"
return order

Step 3: Generate Sequence Diagram with ZenUML

If you have installed ZenUML Diagrams for Confluence(FREEMIUM) | Atlassian Marketplace , you can incorporate a Diagram Macro to your confluence page and paste the above Code to the editor. Otherwise, simply paste the code to to generate the sequence diagram shown above.


1 comment

Interesting =). Its not quite doing yet what I want, but it is getting somewhere.

I'm not sure yet about the 'fluff' and boiler plate code it added (promo codes, availability checks, validation services etc).
When I write sequence diagrams, its often to show a difficult control flow, so I do not want fluff to be added in that case.
Or I want to use help me to think about a work flow. There, it is interesting that it can add stuff. However, I kind of would want to have it generate the 'bare minimum' no fluff. And maybe add 'suggested' things explicitly. There the 'promo codes and availability' checks would make sense. As a reminder that we might have something in the system like that.


Anyway, we will see. I can see a version of this helping us to 'visualize' our text and might find obvious flaws in a text based requirement.

I get your point and totally agree with you.

It seems to be a common issue with modern AI technologies. They struggle to differentiate between 'superfluous information' and 'essential data' or 'solely what has been instructed.'

Although adjusting the prompt may yield improvements, it is ultimately necessary to enhance the underlying structure to address the fundamental issue.

I added one line in the prompt - "do not make up logic that is not described in the scenario". It gave me the following code:

OrderService.CreateOrder(orderDetails) {
Validation = new Validation(orderDetails) {
if(Validation.isValid) {
Order = new Order(orderDetails) {
Response = new Response(Order) {
} else {
ErrorResponse = new ErrorResponse(Validation.errors) {

I don't really know if that mattered :)  

Like Roman Stoffel likes this


Log in or Sign up to comment
AUG Leaders

Atlassian Community Events