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

UML中Structured Activity与Sub-Activity的差异及SPARX EA图标疑问

Sparx EA: Composite Activity vs Sub-Activity Clarifications

Based on your questions about Sparx EA's chain (Composite Activity) and trident (Sub-Activity) icons, here's a breakdown:

1. Composite Activity subgraph exclusivity

Yes, the subgraph of a Composite Activity is strictly tied to its parent activity and cannot be invoked by other processes. It’s an inline structured activity—its details are part of the parent’s definition, not a standalone element in the model. There’s no way to reference or call this subgraph from another activity; it exists only to expand on the parent’s internal logic.

2. Sub-Activity callability

Technically, yes—Sub-Activities are always callable by other processes. Unlike Composite Activities, a Sub-Activity is a standalone activity element in your repository. Even when used within a parent activity, it’s a separate node that can be targeted by Call Action elements from any other activity in the model. You can restrict visibility via package settings if needed, but this is a modeler choice, not an inherent limitation of Sub-Activities.

3. Execution behavior and additional differences

Branch/Parallel Execution

  • Composite Activity: Its internal flow runs as part of the parent activity’s execution thread. When the parent reaches the Composite node, execution enters the subgraph, runs all steps (including any internal branches/parallels), and exits back to the parent once complete. The parent waits for the Composite to finish before proceeding (unless the parent uses a fork to run the Composite in parallel with other steps, but this is controlled by the parent’s flow, not the Composite itself).
  • Sub-Activity: When invoked via a Call Action, it runs as a separate activity instance. The parent activity can choose to wait for it to complete (synchronous call) or continue execution in parallel (asynchronous, using a fork/join structure). The Sub-Activity’s own internal branches/parallels are handled independently of the caller’s flow.

Closed-form Sub-Activity vs Composite Activity

You might see Sub-Activities displayed in a closed (expanded) form, similar to Composite Activities. The key differences beyond callability are:

  • Reusability: Sub-Activities can be referenced by multiple activities across your model. Changing a Sub-Activity updates all its call sites. Composite Activities are one-off—their logic only applies to the parent activity.
  • Repository Structure: A Composite Activity’s subgraph is a child diagram of the parent activity. A Sub-Activity has its own independent diagram that can be linked to any number of call actions.
  • Maintenance: Updates to a Composite Activity only affect its parent. Updates to a Sub-Activity propagate to every place it’s called, making it easier to standardize repeated logic.
  • Element Visibility: Elements inside a Composite Activity are only visible within the parent’s context. Sub-Activities (and their internal elements) are separate entities that can be accessed across packages (based on your model’s visibility settings).

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.27 23:27:32