uip Maestro 案例任务
“uip Maestro 案例任务”的语法和选项,可读取和丰富案例管理定义 JSON 文件中某个阶段内的任务,以及用于手动创作文件的 JSON 字段引用。
任务是案例管理定义阶段中的工作单元 — 流程运行、智能体调用、API 工作流、RPA 作业、人工操作项目、计时器等待、连接器活动或等待实例的入站连接器事件。任务条目位于案例定义 JSON 文件中的阶段通道内(与stages和task-entry-conditions处理的文件结构相同); uip maestro case tasks读取并丰富它们。
有关控制任务何时可运行的进入规则,请参阅uip maestro case task-entry-conditions 。有关整体案例管理概念模型,请参阅uip maestro case 。
概念
- 通道— 一个阶段内的任务被分组到并行通道(索引
0、1、2等);同一通道中的任务按顺序运行,不同通道中的任务并行运行。手动创作任务时,lane默认为0。 - 任务类型— 以下类型:
process、action、agent、api-workflow、rpa、external-agent、wait-for-timer、wait-for-connector、execute-connector-activity、case-management。连接器支持的类型(execute-connector-activity、wait-for-connector)使用与其他类型不同的字段形状(见下文)。 - 丰富— 几种任务类型需要输入/输出架构和从平台拉取的绑定元数据(流程的实际输入/输出合同、连接器活动的字段架构),然后 Studio Web 才能对其进行有意义的呈现。
tasks enrich和tasks describe是该元数据的查找命令,用于在手动创作任务之前发现要写入任务 JSON 的内容。
大纲
uip maestro case tasks get <file> <stage-id> <task-id>
uip maestro case tasks enrich --type <type> --id <id> [--element-id <id>]
uip maestro case tasks describe --type <type> --id <id> [--connection-id <id>]
uip maestro case tasks get <file> <stage-id> <task-id>
uip maestro case tasks enrich --type <type> --id <id> [--element-id <id>]
uip maestro case tasks describe --type <type> --id <id> [--connection-id <id>]
任务 JSON 字段
在caseplan.json的阶段通道数组中手动添加、编辑和删除任务,然后使用uip maestro case validate进行验证。字段引用:
非连接器任务— 任务类型: process 、 action 、 agent 、 api-workflow 、 rpa 、 external-agent 、 wait-for-timer 、 case-management (下方连接器支持的类型各不相同)。字段:displayName 、name (流程/工作流名称)、folderPath 、lane (并行通道索引,默认0 )、shouldRunOnlyOnce 、description 、isRequired ;仅适用于action 类型:taskTitle 、priority (Low Medium|High |Critical ,默认为Medium )、recipient (电子邮件;还将assignmentCriteria 设置为user )。丰富任务(从平台查找的绑定/输入/输出)还带有稳定的elementId和enriched: true — 在手写之前使用tasks enrich获取该有效负载。
连接器支持的任务— 任务类型execute-connector-activity (活动)或wait-for-connector (触发器),由类型缓存uiPathActivityTypeId和连接 ID 标识。携带 serviceType 为 Intsvc.ActivityExecution(活动)或 Intsvc.WaitForEvent(触发器)。输入值:对于活动,由输入名称(body、pathParameters、queryParameters)键入;对于触发器,body 下的值将成为事件筛选器参数(将根据这些参数生成 filters.expression,例如(project == 'PROJ' && issuetype == 'Bug')),并填充 queryParams/parameters。在手写任务之前,使用tasks describe发现真实的输入名称和完整的丰富化有效负载。
更新任务— 将相同的displayName / name / folderPath / shouldRunOnlyOnce / description / isRequired字段合并到现有任务对象上(未列出的字段保持其当前值)。name/folderPath 对没有 wait-for-timer 块的 data 任务没有影响。
删除任务— 直接从阶段的通道数组中删除其条目;如果通道变空,则完全删除该通道。
在进行任何手动编辑后,运行 uip maestro case validate。
uip Maestro 案例任务获取
打印阶段中的单个任务。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<file> | 是 | 案例管理 JSON 文件的路径。 |
<stage-id> | 是 | 包含任务的阶段的 ID。 |
<task-id> | 是 | 要检索的任务的 ID。 |
示例
uip maestro case tasks get case.json Stage_1 ta1b2c3d
uip maestro case tasks get case.json Stage_1 ta1b2c3d
数据形状(--输出 json)
{
"Code": "TaskFound",
"Data": {
"StageId": "Stage_1",
"Lane": 0,
"Index": 0,
"Task": { "id": "ta1b2c3d", "type": "process", "displayName": "Process invoice" }
}
}
{
"Code": "TaskFound",
"Data": {
"StageId": "Stage_1",
"Lane": 0,
"Index": 0,
"Task": { "id": "ta1b2c3d", "type": "process", "displayName": "Process invoice" }
}
}
丰富 uip Maestro 案例任务
从平台查找任务类型的实际输入/输出架构和绑定,而不写入任何文件。在 --help 中可见。
在将 tasks add --task-type-id 提交到文件之前,使用此选项可以预览 会生成的内容。对于连接器活动/触发器,请改用tasks describe — enrich涵盖其他可丰富类型( process 、 agent 、 rpa 、 action 、 api-workflow 、 case-management 、 flow-process ) 。
选项
| 长 | 值 | 必填 | 描述 |
|---|---|---|---|
--type <type> | 可丰富的类型之一 | 是 | 任务类型。 |
--id <id> | 字符串 | 是 | 任务的唯一 ID(“实体密钥”或“操作应用程序 ID,具体取决于类型”)。 |
--element-id <id> | 字符串 | 否 | 变量绑定作用域目标元素 ID。 |
示例
uip maestro case tasks enrich --type process --id a1b2c3d4-0000-0000-0000-000000000001
uip maestro case tasks enrich --type process --id a1b2c3d4-0000-0000-0000-000000000001
数据形状(--输出 json)
{
"Code": "TaskEnriched",
"Data": {
"name": "InvoiceProcess",
"folderPath": "Shared",
"inputs": [],
"outputs": []
}
}
{
"Code": "TaskEnriched",
"Data": {
"name": "InvoiceProcess",
"folderPath": "Shared",
"inputs": [],
"outputs": []
}
}
确切的 Data 形状取决于 --type — 来自平台的原始丰富化有效负载,未标准化为固定架构。
uip Maestro 案例任务描述
描述用于绑定发现的任务类型的输入/输出元数据 —connector-activity connector-trigger这是所有查找命令中覆盖范围最广的(在external-workflow external-agent支持的所有内容基础上还添加了 、enrich )。在 --help 中可见。
选项
| 长 | 值 | 必填 | 描述 |
|---|---|---|---|
--type <type> | 可描述的类型之一 | 是 | 任务类型 — 请参阅上面的列表。 |
--id <id> | 字符串 | 是 | 任务的唯一 ID(“实体密钥”或“操作应用程序 ID”)。 |
--connection-id <id> | UUID | 有条件地 | 对于connector-activity 、 connector-trigger 、 external-workflow和external-agent为必需— 如果这些类型省略了必需的内容,则命令快速失败,并会出现明确的错误。不用于其他类型。 |
external-workflow 和 external-agent 的描述与 connector-activity 相同(相同的 Integration Service 丰富管道,相同的 --connection-id 要求),但根据不同的类型缓存索引解析类型 ID,因为 Studio Web 从单独的目录中提供这些类型 ID。
示例
uip maestro case tasks describe --type connector-activity \
--id a1b2c3d4-0000-0000-0000-000000000001 \
--connection-id b2c3d4e5-0000-0000-0000-000000000001
uip maestro case tasks describe --type connector-activity \
--id a1b2c3d4-0000-0000-0000-000000000001 \
--connection-id b2c3d4e5-0000-0000-0000-000000000001
数据形状(--输出 json)
{
"Code": "TaskDescribed",
"Data": {
"inputs": [{ "name": "body", "body": {} }],
"outputs": [{ "name": "response" }]
}
}
{
"Code": "TaskDescribed",
"Data": {
"inputs": [{ "name": "body", "body": {} }],
"outputs": [{ "name": "response" }]
}
}
仅当基础查找返回 enrichment 字段时,才会包含 字段。
相关内容
- uip Maestro 案例— 概念和完整子系统目录。
- uip Maestro Case 任务进入条件— 任务何时可运行的规则。
- uip Maestro 案例案例与阶段— 任务所在的阶段。