You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

UML活动图:带引脚的信号——引脚收发信号及邮件发送表示问询

UML活动图:引脚实现信号收发与邮件发送的方法

Great question! Let’s break this down step by step so you can apply this in your UML models easily.

一、引脚完全支持信号的接收与发送

Absolutely! In UML activity diagrams, pins act as the interface between activity nodes (like actions or sub-activities) and the outside world. They’re not just for passing regular data objects—they work perfectly with signals too, which are UML’s way of modeling asynchronous communication.

A few key points to remember:

  • Use an output pin for sending signals: this pin connects your action node to a boundary (representing an external system or recipient)
  • Use an input pin for receiving signals: this pin brings external signals into your internal activity nodes
  • First, you’ll need to define a custom signal type in your UML model (e.g., EmailSignal) with attributes that match the data you need to send (like recipient, subject, content)

二、用发送信号表示邮件发送行为

Here’s a concrete, actionable workflow to model email sending via signals:

  • Step 1: Define your email signal
    Create a signal named EmailSignal in your UML model. Add attributes that map to email’s core components:

    • recipient: String (the email address of the receiver)
    • subject: String (the email’s subject line)
    • content: String (the body of the email)
  • Step 2: Add a Send Action node
    In your activity diagram, insert a Send Action—this is a specialized UML action designed explicitly for sending signals (it’s different from regular data transfer actions).

  • Step 3: Configure the output pin
    Attach an output pin to the Send Action, and set its type to your EmailSignal. To make it clear this is a signal send, you can add the UML stereotype <<send>> to the pin, like <<send>> EmailSignal.

  • Step 4: Connect to an external boundary
    Draw an arrow from the output pin to a Boundary Node (a UML element that represents an external system, like a mail server or the recipient’s email client). This visualizes that the signal (your email) is being sent outside your system’s scope.

  • Optional: Add input pins for email data
    If you want to show where the email content comes from, add input pins to the Send Action. Connect these pins to previous activity nodes (like a "Edit Email Content" action) that provide the recipient, subject, and content values. This makes the full flow of data into the email signal explicit.

Quick example scenario

After a user finishes editing their email in a "Compose Email" activity, the recipient, subject, and content values flow into the input pins of the "Send Email" Send Action. The action packages these values into an EmailSignal object, which is then sent via the output pin to a boundary node labeled "Mail Server"—completing the asynchronous email send.

内容的提问来源于stack exchange,提问作者Mohamed Hmini

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 07:35:37