maestro
latest
false
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

Maestro 用户指南

上次更新日期 2025年11月14日

Subprocesses and modularity

Subprocesses support model clarity by grouping related activities into a single reusable structure. They help reduce diagram complexity, isolate business logic, and encourage reuse.

In BPMN, a subprocess can be modeled either inline or via a reusable call activity. In Maestro:
  • 仅支持调用活动
  • The subprocess must be modeled as a separate diagram.
  • 调用流程通过定义的参数传递输入并接收输出。

为什么使用调用活动?

A call activity references a subprocess defined elsewhere in the project or environment. It behaves like a reusable function. call activities improve process modeling by:

  • 减少图表之间的重复内容
  • 隔离可重用的逻辑(例如,审批、验证、调度)
  • 将主图表保持简洁
  • 支持跨流程变体的一致行为。

How to model subprocesses

To create a subprocess in Maestro:
  • Model the subprocess as its own standalone diagram.
  • 在父图表中插入调用活动。
  • Link the call activity to the subprocess.
  • 配置输入和输出变量,以交换数据。

建模示例

Use case: An onboarding workflow uses the same Collect Documents subprocess in both employee and vendor onboarding processes. Instead of duplicating steps, a call activity is added in each parent process referencing the same subprocess.



Use case: This subprocess example shows a conditional file download and upload workflow in Maestro. The process begins with a message start event and branches using an exclusive gateway. Depending on the condition, it either downloads an email attachment or a file from a record field. Both paths converge into an Upload File task, followed by a SubProcess element named Sub-Process1. This subprocess encapsulates additional steps related to post-upload actions before completing the workflow at the end event.

建模指南

  • Give subprocesses meaningful business names (e.g., Verify Contract Terms).
  • 记录输入和输出参数及其预期用法。
  • Keep subprocesses focused on a single responsibility or outcome.
  • Avoid designing subprocesses with assumptions about the parent context.

命名约定

Subprocess and call activity names should:

  • 使用业务语言,而非技术术语
  • 描述结果(例如,收集客户数据,而非表单第 2 步
  • Reflect what the subprocess accomplishes, not how.

不支持

  • Expanded subprocesses (i.e., inline subprocesses) are not supported. All subprocesses must be modeled as separate diagrams and invoked using Call Activities.
  • Ad-hoc subprocesses are not supported.
  • 不支持隐式变量共享。 必须通过输入/输出绑定明确映射数据。

多实例标记

子流程支持多实例标记,其中每个元素都会执行多次。除了子流程以外,可以标记为多实例的元素都是任务类型。

嵌套标记

支持将以下字符串变量作为嵌套迭代器:
类别属性如何使用/访问
OuterSP - 获取每个用户的联系信息 InputCollectionvar.GetUsers
OuterSP - 获取每个用户的联系信息 Iterator Itemiterator.item.gid
InnerSP - 获取每个联系人的所有电子邮件 InputCollectioniterator[0].item.contactArray
InnerSP - 获取每个联系人的所有电子邮件 Iterator Itemiterator[1].item.ContactId
发送电子邮件InputCollectioniterator[1].item.EmailArray
发送电子邮件Iterator Itemiterator[2]item.emailAddress

有关 Maestro 中支持的 BPMN 元素的更多详细信息,请参阅BPMN 支持

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo
信任与安全
© 2005-2025 UiPath。保留所有权利。