☁️Visualize Your Workflow: A Comprehensive Guide to Creating Activity Diagrams in CodeArts Modeling

Ertugrul Basar
Huawei Developers
Published in
5 min readAug 27, 2024
CodeArts Modeling

🔦Introduction

Hi everyone, in today’s article, we’re going to create a UML model (Activity Diagram) in Huawei Cloud CodeArts Modeling service. Before we begin the demonstration, I’d like to provide some information about what we’ll cover in this article.

⚡️UML: UML stands for Unified Modeling Language. It is a standard visual language for modeling software systems. UML is used to create diagrams that represent the structure, behavior, and interactions of a system. It is a valuable tool for software developers, architects, and analysts to communicate and understand complex systems.

⚡️️️Activity Diagram: An activity diagram in UML is a graphical representation of the flow of activities in a system. It’s particularly useful for modeling business processes, workflows, and the logic within a system.

⚡️CodeArts Modeling: CodeArts Modeling is a visual modeling tool within the Huawei Cloud DevOps platform. It provides a comprehensive set of features for designing, modeling, and developing software applications. It supports various modeling languages, including Unified Modeling Language (UML). CodeArts Modeling is designed to improve software development efficiency and quality by providing a visual approach to modeling and code generation. It can be used by developers, architects, and analysts to collaborate and create well-structured, maintainable software systems. It also enables real-time collaborative editing by multiple users and synchronizes model updates across different browsers. This allows users to view model changes instantly during the modeling process, minimizing conflicts and overlaps, and ultimately improving modeling and design efficiency.

💻Demo

In this exercise, we’ll create an activity diagram like the screenshot below, which I found online. The diagram demonstrates the build process of a pipeline. It starts with a change being pushed to the ‘master’ branch, which triggers the pipeline. The client and server code are built, and if successful, the application is deployed. If any step fails, an email is sent to notify the relevant parties.

Diagram

Step1 - Create a Model Project

After you have access to the CodeArts platform and Modeling section, click on “New Model Project.”

Modeling-1

Next, we need to fill in a name and select the metamodel. Select a proper metamodel based on the modeling scenario. Once the metamodel is created, modification is restricted. We’ll continue selecting UML, but there are three options:

⚡️UML: It is a graphical language that supports modeling and software system development. It provides modeling and visualization support for all phases of software development.

⚡️️️4+1 View: It is a collection of associated models that reflect the concerns of different stakeholders from different perspectives. Each aspect of the system is described from four typical perspectives: logic, development, deployment and operation, and each aspect design is connected and verified by use cases.

⚡️SysML: It is a modeling language for systems engineering, which is an extended UML. SysML is designed to support system-level modeling, including hardware, software personnel, processes, information, and other aspects.

After filling in the desired options, click on ‘Confirm’.

Modeling-2

Step2 - Add an Activity Diagram

After the model project is created, we’ll see a page like the screenshot below. There are different options to choose from, but we’ll continue with an activity diagram. Click the button depicted to create a diagram.

Modeling-3

On this page, you can see the diagram types that CodeArts Modeling provides. These types include some of the sector standards such as sequence diagram, use case diagram, and class diagram. Select the activity diagram and continue.

Modeling-4

In the next page, before confirming, fill in the diagram’s name and parent node.

Modeling-5

Step3 - Modify the Diagram

We’ve created the diagram and now we need to get it into the shape we want. Before continuing, let’s remind ourselves of the diagram we took as an example.

Diagram

After we create the diagram, modifying it is very easy. There are many components related to the diagram type on the left side of the working sheet. You can just simply drag and drop them into the working sheet. In this exercise, we’ll use initial, action, decision, send, receive, and final components, and we’ll connect them with control flows.

Modeling-6

After adding a component to the worksheet, you can click on the component and change some of its attributes from the right side of the page, such as name, description, and color.

Modeling-7

After we finish the modify process, the diagram will look like the screenshot below.

Modeling-8

Step4 - Export the diagram

We’ve finished the diagram and we can export the diagram in PNG, JPEG, and SVG options. I’ll choose PNG.

Modeling-9

After I export it, the PNG will look like the one below. Our exercise is now complete.

Activity Diagram

👉Conclusion

In today’s exercise, we successfully created a new modeling project, added an activity diagram, and modified it. By exploring the fundamentals of UML and its seamless integration within CodeArts Modeling, you’ve gained insights into how this tool can significantly streamline your development process. In conclusion, CodeArts Modeling offers a robust platform that empowers teams to create high-quality architectures efficiently.

💁References

--

--