- 简介
- 入门指南
- 使用 BPMN 进行流程建模
- 使用 案例管理 进行流程建模
- Process modeling with Flow
- 入门指南
- 核心概念
- Node reference
- Build guides
- 最佳实践
- 参考
- 流程实施
- 流程运营
- 流程监控
- 流程优化
- 参考信息
Maestro 用户指南
Transforms data using a variety of operations. The Data Transform node and its individual operation nodes (Filter, Map, Group By) are available as separate selectable nodes in the node palette.
When to use Data Transform vs Script
Use Data Transform operations when the transformation is a field-level operation on a collection. The available operations cover:
- 筛选
- 映射
- 分组
Use Script when the transformation requires conditional logic, arithmetic, or string manipulation, or when no dedicated operation covers the case. Both can be combined: a Data Transform operation can filter or reshape a collection, then pass the result to a Script node.
输出
All Data Transform operation nodes output their result as output, accessible downstream as $vars.<nodeName>.output.
筛选
Keeps only the entries in a collection that match your conditions.
配置
| 字段 | 必填 | 描述 |
|---|---|---|
| 输入 | 是 | The collection (array) to filter. Reference as $vars.<nodeName>.output. |
| 条件 | 是 | One or more conditions. An entry is kept only if all conditions are met. |
示例
Keep only orders with a status of "completed":
- 输入:
$vars.fetchOrders1.output.body - Condition:
statusequalscompleted
Output available as $vars.filter1.output.
Map
Transforms each entry in a collection by modifying or reshaping its fields.
配置
| 字段 | 必填 | 描述 |
|---|---|---|
| 输入 | 是 | The collection (array) to transform. |
| Field mappings | 是 | For each target field, define the name and the source field or expression. |
示例
Rename firstName and lastName fields to first and last:
| Target field | Source mapping |
|---|---|
first | firstName |
last | lastName |
Output available as $vars.map1.output.
Group By
Groups a collection by a shared field and aggregates values like totals, averages, or counts.
配置
| 字段 | 必填 | 描述 |
|---|---|---|
| 输入 | 是 | The collection (array) to group. |
| Group by field | 是 | The field whose value determines the group. |
| Aggregations | 否 | Additional computed fields per group (count, sum, average, min, max, first, last, collect). |
示例
Group a list of orders by region and count the number of orders per region:
- 输入:
$vars.fetchOrders1.output.body - Group by:
region - Aggregation:
orderCount= count
Output available as $vars.groupBy1.output.
常见问题
| 问题 | 分辨率 |
|---|---|
| Output is empty after Filter | The conditions don't match any entries. Inspect the input collection in the execution trace to verify the field names and values. |
Map output has undefined fields | The source field path doesn't exist in the input entries. Use the execution trace to confirm the input structure. |