Hướng dẫn sử dụng ChatGPT phục vụ hỗ trợ vẽ thiết kế UML
- Đặt vấn đề
Để sử dụng ChatGPT hỗ trợ thiết kế UML, bạn có thể đặt câu hỏi cho ChatGPT như sau:
“Can you generate UML user case of Digitizing documents workflow? Which start with @startuml and end with @enduml
In this workflow, with 2 actors: secretary and manager
Use case realization:
- The secretary will input the input data with the document scanner and transfer the data to the “ScanApp” software.
- The “ScanApp” software receives data from the input document and stores the data fields of the scanned document.
- The managers use the search function and retrieve information from documents that have been digitized by the software “ScanApp”.
Class diagram:
- Class “ScanApp”: includes properties and methods to get and store the information of the scanned document.
- Class “Digital document”: includes attributes like text number, text name, content, creation time, update time, etc.
- Class “Users”: include attributes like username, password, access rights, etc.
Sequence diagram:
- The secretary uses the scanner to input data and transfer data to the “ScanApp” software.
- The “ScanApp” software receives data from the input document and stores the data fields of the scanned text.
- The managers use the search function and retrieve information from documents that have been digitized by the software “ScanApp”.”
2. Kết quả từ ChatGPT:
Dựa trên độ chi tiết và chính xác của câu hỏi, ChatGPT sẽ hỗ trợ sinh ra đoạn mã như sau:
@startuml
actor Secretary actor Manager Secretary –> (Scans Document) (Scans Document) –> (Transfer Data) (Transfer Data) –> (Store Data) (Manager) –> (Searches Documents) @enduml |
@startuml
actor Secretary actor Manager participant “ScanApp” as ScanApp activate Secretary Secretary -> ScanApp: Scans Document ScanApp -> ScanApp: Receive Data ScanApp -> ScanApp: Store Data activate Manager Manager -> ScanApp: Searches Documents ScanApp -> Manager: Return Search Results deactivate Manager deactivate Secretary @enduml |
3. Sử dụng kết quả từ ChatGPT để ra thành phẩm:
Dùng https://app.diagrams.net/ để vẽ UML
Chọn Menu: Arrange > Insert > Advanced > PlantUML
Và sơ đồ như mong muốn được xây dựng chính xác như yêu cầu:
Nguồn: HONEYNET và Internet