[SysML] #22. How to draw a Activity Diagram with EA

Starting with Activity Diagram, we will draw some of the Activity Diagrams shown as examples in Chapter 9 Activity Diagram Chapter of “Practical Guide to SysML: The System Modeling Language” 2nd Edition using EA. This is because I think it would be more useful for readers to guide the drawing of EA using already proven examples rather than creating and posting examples myself, which are still lacking in many areas.

The first example is an Activity Diagram showing the Log On process. For reference, the diagram header below only reads act Log On. Since the model element represented by the Activity Diagram is mostly Activity, this diagram intentionally omits the model element. Additionally, the diagram names are omitted because the names of the model elements are sufficiently descriptive.

This image shows a activity Diagram in order to assist how to draw a activity diagram with EA

First of all, there are 7 Call behavior Actions in the diagram above. People who are new to Sysml may be confused between Action and Call behavior. Action is the smallest unit of behavior that cannot be broken down any further.

So, even in EA, when you add an Action Element to the activity diagram canvas, it is displayed as atomic in the pop-up that appears. And you can think of Call behavior Action as Activity. In other words, it can be expressed as an Activity Diagram and decomposed into Actions. And Atomic Action has no type. In other words, there is only a name, and in contrast, the Call Behavior Action is in the form of “Name: Activity”.

There can be confusion between Action and Activity. In fact, both represent a certain behavior, but if Activity is modeled to include other Activities, the concept becomes ambiguous. Activity includes Actions, and certain Actions (i.e. Call Behavior Action) can be converted back to Activity. It is expressed.

Before drawing the Log On Activity Diagram above, we will first define the inclusion relationship between each activity through the Block Definition Diagram.

Create a bdd called Log On Structural Context and create a total of 8 Activity Blocks on the bdd. For reference, to add an Activity on bdd, click the hamburger button in the menu bar at the top of Toolbox and select SysML → Activity.

Then select Activity from Toolbox and add it to the bdd canvas. (For reference, you can add an additional Activity Block to the canvas by holding down Ctrl and left-clicking the mouse.)

Now, enter each activity on bdd as Call Behavior Action and Log On Activity in the Activity Diagram above. And the activities to which Call Behavior Action has been assigned are connected through Part Association with Log On Activity. The completed Activity Structure is as follows.

image 212

Now, right-click the Log On Activity in the Project Browser → Select Add → Add Diagram to create an Activity Diagram representing the Log On Activity model elements. If the created Activity Diagram does not have a diagram frame, since Perspectives was selected as UML rather than SysML when creating the diagram, delete the diagram and create it again as a SysML diagram.

Now, select the remaining activities except Log On on the Project Browser and drag and drop them on the Canvas of the Log On Activity Diagram. Then, in the window that pops up, select Drop as: Invocation (Action) (i.e., set the activity to Call Behavior Action) and check Select For All, and all selected activities will be dropped onto the Canvas at once.

image 213

I’m not sure why, but the name of each Call Behavior Action created is missing. Enter it again. For reference, Call Behavior Action has a trident shape at the bottom right. (In other words, it is an indication that it is connected to another Activity.)

image 214

Now let’s complete the Log On Diagram using Initial, Final, Merge, Decision, Action Pin, Control Flow, and Object Flow on the Toolbox.

  • Control Flow is basically a solid line, but if you want to change it to a dotted line as instructed in the SysML textbook, check Dashed line for Control Flow in the Settings → Options → General tab.
  • To enter a guard in Control Flow, enter it in the Contraints tab of Control Flow Properties.

The completed diagram is as follows.

image 242
This is a Activity Diagram drawn with Enterprise Architect. If you want to get more information about Activity Diagram, this article may be helpful.

As a second example, let’s draw the Routing Flows Activity Diagram below in EA and practice setting the properties of Activity Parameter and Action Pin and adding Specification of Join.

image 215

This time, unlike the Log On example, we will start with the assumption that modeling the structural relationship between activities is unnecessary. First, create an activity called Generate Video Outputs in the Project Browser. Right-click on the package → Create New Element. And add an Activity Diagram named Routing Flows to the Generate Video Outputs Activity.

Now select Action (call behavior) from Toolbox and create it on the canvas of Routing Flows Act. A window for selecting the Behavior element will appear. In other words, Call Behavior Action can call not only Activity but also Interaction or StateMachine. Here, click the Add New button to create and select an Activity called Produce Test Signal. And change the name to a1.

image 216

Create a2, a3, and a4 in the same way. Then, click Parameter in the ToolBox and add 1 parameter to Input (i.e., left side of diagram) and 2 parameters to Output (i.e., right side of diagram). Each parameter must be assigned an element defined somewhere in the model as its type. Video, Composite, and MPEG4 Block were created on the Project Browser and assigned to each parameter. Assignment can be specified in the Type of the Parameter tab of the Parameter Properties window.

image 217

The diagram completed so far is as follows:

image 218

Now complete the rest using Action Pin, Merge, Fork Node and Object Flow.

image 221

To give a Stream property to an Activity Parameter or Action Pin, set it in each Properties window. You can give Type, Direction, Multiplicity, and Stream properties in the Properties → Parameter tab of Activity Parameter. Set Direction to in and check Stream. All Action Pins also check Stream and select Input or Output according to the purpose.

In EA, Activity Parameters or Action Pins set to Stream are shaded in color. (In the SysML book, it is indicated as {Stream} under the name.)

image 222

Join Specification

To attach a specification to Join, select Fork/Join from Toolbox and add it to the Activity Diagram Canvas. And in the Advanced tab on the right side of the Synchronization Properties → General tab that appears when you double-click Fork/Join, set kind to join and enter Specification in joinSpec.

image 223

Decision Condition – Opaque Expression

I couldn’t find any other way to manually type the Decision Condition in the Decision Node using Note. If you have any EA functions allocated separately for this method, I would appreciate it if you could share them.

Accept Event Actions

You can use accept event Action, send signal, and accept event timer in Activity Diagram Toolbox. And these three elements include the ability to set Action and Trigger in the properties window, which seems like a necessary element when doing simulation.

Therefore, when doing System Modeling from the perspective of a SysML and EA beginner, it would be a good idea to use the Name Field of each element in accordance with the SysML grammar. If I learn more about how to use it in the future, I will post about it.


Partition can be created by selecting the Partition element in the Activity Diagram Toolbox and adding it to the Canvas. Then, position the Object Node belonging to the partition so that it is included within the partition. And if you want to assign the partition to a specific structural element (i.e. block, etc.), select Advanced → Instance Classifier from the context menu of the partition and specify the element. (Or, you can specify partition in the Drap As menu that appears when you drag and drop the element in the Project Browser.)

Also, if you want to make it clear that the partition is allocated, select Stereotype in the Partition’s Properties window and specify the Stereotype with allocateActivityPartition.

Interruptible Region

Using Interruptible Region is intuitive. Select the Interruptible Region from the Toolbox, place it on the Activity Diagram Canvas, and adjust the size of the Interruptible Region appropriately to include related Object Nodes.

And as an example, add an Accept Event Action named Shut Down to the Interruptible Region and connect Shut Down with the Final Node using Interrupt Flow Relationships. (Final Node is outside the Interruptible Region)

image 224

SysML’s Activity Diagram contains quite a lot of content, and implementing advanced functions among these functions with Enterprise Architect seems difficult to me. In addition to this reason, because the goal of this blog is to convey the necessary knowledge to system engineers working in the automotive electronics industry, we have decided not to cover the advanced features of SysML and its implementation as EA.

As this blog progresses and I become more proficient in SysML and EA, I think I will have the opportunity to deal with it again.\

[SysML] #1. Understanding SysML Diagrams

[SysML] #2. Understanding SysML Package Diagram

[SysML] #3. Understanding Dependencies of Pkg Diagram

[SysML] #5. Understanding SysML Requirement Diagram

[SysML] #6. Understanding Relations In Req Diagram

[SysML] #7. How to draw a Req Diagram with EA

[SysML] #8. Understanding SysML UseCase Diagram

[SysML] #9. How to draw a UseCase Diagram with EA

[SysML] #10. Understanding SysML bdd Diagram

[SysML] #11. Understanding SysML ibd Diagram

[SysML] #12. Understanding Part Property of Block

[SysML] #13. Understanding Reference Property of Block

[SysML] #14. Understanding Value Type

[SysML] #15 Understanding Parametric Diagram

[SysML] #16. Understanding Flow Property

[SysML] #17. Understanding Port and Association Block

[SysML] #18. Understanding Behavior of Block

[SysML] #19. Understanding Generalizations

[SysML] #20. Understanding Dependencies, Allocate, Comment

[SysML] #21. Understanding Activity Diagram

[SysML] #23. Seq Diagram LifeLine and Message

[SysML] #24. Seq Diag Constraints Fragment Decompose

[SysML] #25. How to draw a Sequence Diagram with EA

[SysML] #26. Understanding Stm Diagram State and Transition

[SysML] #27. Understanding Stm Diagram Event Pseudostate Region

[SysML] #28. How to draw a State Machine Diagram with EA

Leave a Comment