fxapi-workflow-management
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese工作流管理技能
Workflow Management Skill
是提供的命令行程序,所有操作通过执行fx-api-cli命令完成。fx-api-cli
通过 与工作流管理系统交互。
fx-api-cli workflow <接口名> '<json入参>'is the provided command-line program, all operations are completed by executing thefx-api-clicommand.fx-api-cli
Interact with the workflow management system via .
fx-api-cli workflow <interface name> '<json input parameters>'接口列表
API List
workflow.instance.comment_list — 工作流实例评论列表接口
workflow.instance.comment_list — Workflow Instance Comment List API
bash
fx-api-cli workflow instance_comment_list '{"instance_id": "instance_id_1"}'获取工作流实例的评论列表。需要指定实例 ID。参见 API 详情。
bash
fx-api-cli workflow instance_comment_list '{"instance_id": "instance_id_1"}'Get the comment list of a workflow instance. The instance ID is required. See API Details.
workflow.instance.get — 工作流实例详情接口
workflow.instance.get — Workflow Instance Details API
bash
fx-api-cli workflow instance_get '{"instance_id": "instance_id_1"}'获取工作流实例的详细信息。需要指定实例 ID。参见 API 详情。
bash
fx-api-cli workflow instance_get '{"instance_id": "instance_id_1"}'Get detailed information of a workflow instance. The instance ID is required. See API Details.
workflow.instance.log_list — 工作流实例日志列表接口
workflow.instance.log_list — Workflow Instance Log List API
bash
fx-api-cli workflow instance_log_list '{"instance_id": "instance_id_1"}'获取工作流实例的日志列表。需要指定实例 ID。参见 API 详情。
bash
fx-api-cli workflow instance_log_list '{"instance_id": "instance_id_1"}'Get the log list of a workflow instance. The instance ID is required. See API Details.
workflow.instance.close — 工作流实例关闭接口
workflow.instance.close — Workflow Instance Close API
bash
fx-api-cli workflow instance_close '{"instance_id": "instance_id_1"}'关闭工作流实例。需要指定实例 ID。参见 API 详情。
bash
fx-api-cli workflow instance_close '{"instance_id": "instance_id_1"}'Close a workflow instance. The instance ID is required. See API Details.
workflow.instance.activate — 工作流实例激活接口
workflow.instance.activate — Workflow Instance Activate API
bash
fx-api-cli workflow instance_activate '{"instance_id": "instance_id_1"}'激活工作流实例。需要指定实例 ID。参见 API 详情。
bash
fx-api-cli workflow instance_activate '{"instance_id": "instance_id_1"}'Activate a workflow instance. The instance ID is required. See API Details.
workflow.task.list — 工作流任务列表接口
workflow.task.list — Workflow Task List API
bash
fx-api-cli workflow task_list '{"app_id": "app_id_1", "entry_id": "entry_id_1"}'获取工作流任务列表。支持按应用 ID 和表单 ID 过滤。参见 API 详情。
bash
fx-api-cli workflow task_list '{"app_id": "app_id_1", "entry_id": "entry_id_1"}'Get the workflow task list. Support filtering by application ID and form ID. See API Details.
workflow.task.approve — 工作流任务审批接口
workflow.task.approve — Workflow Task Approval API
bash
fx-api-cli workflow task_approve '{"task_id": "task_id_1", "remark": "批准"}'审批工作流任务。需要指定任务 ID 和审批意见。参见 API 详情。
bash
fx-api-cli workflow task_approve '{"task_id": "task_id_1", "remark": "Approved"}'Approve a workflow task. The task ID and approval opinion are required. See API Details.
workflow.task.rollback — 工作流任务回退接口
workflow.task.rollback — Workflow Task Rollback API
bash
fx-api-cli workflow task_rollback '{"task_id": "task_id_1", "remark": "回退"}'回退工作流任务。需要指定任务 ID 和回退意见。参见 API 详情。
bash
fx-api-cli workflow task_rollback '{"task_id": "task_id_1", "remark": "Rollback"}'Roll back a workflow task. The task ID and rollback opinion are required. See API Details.
workflow.task.transfer — 工作流任务转交接口
workflow.task.transfer — Workflow Task Transfer API
bash
fx-api-cli workflow task_transfer '{"task_id": "task_id_1", "user_id": "user_id_1", "remark": "转交"}'转交工作流任务。需要指定任务 ID、接收人 ID 和转交意见。参见 API 详情。
bash
fx-api-cli workflow task_transfer '{"task_id": "task_id_1", "user_id": "user_id_1", "remark": "Transfer"}'Transfer a workflow task. The task ID, recipient ID and transfer opinion are required. See API Details.
workflow.task.add_sign — 工作流任务加签接口
workflow.task.add_sign — Workflow Task Add Signer API
bash
fx-api-cli workflow task_add_sign '{"task_id": "task_id_1", "user_id": "user_id_1", "remark": "加签"}'为工作流任务添加加签人。需要指定任务 ID、加签人 ID 和加签意见。参见 API 详情。
bash
fx-api-cli workflow task_add_sign '{"task_id": "task_id_1", "user_id": "user_id_1", "remark": "Add signer"}'Add a signer to the workflow task. The task ID, signer ID and signing opinion are required. See API Details.
workflow.task.revoke — 工作流任务撤回接口
workflow.task.revoke — Workflow Task Revoke API
bash
fx-api-cli workflow task_revoke '{"task_id": "task_id_1", "remark": "撤回"}'撤回工作流任务。需要指定任务 ID 和撤回意见。参见 API 详情。
bash
fx-api-cli workflow task_revoke '{"task_id": "task_id_1", "remark": "Revoke"}'Revoke a workflow task. The task ID and revocation opinion are required. See API Details.
workflow.task.reject — 工作流任务拒绝接口
workflow.task.reject — Workflow Task Reject API
bash
fx-api-cli workflow task_reject '{"task_id": "task_id_1", "remark": "拒绝"}'拒绝工作流任务。需要指定任务 ID 和拒绝意见。参见 API 详情。
bash
fx-api-cli workflow task_reject '{"task_id": "task_id_1", "remark": "Reject"}'Reject a workflow task. The task ID and rejection opinion are required. See API Details.
workflow.cc.list — 工作流抄送列表接口
workflow.cc.list — Workflow CC List API
bash
fx-api-cli workflow cc_list '{"instance_id": "instance_id_1"}'获取工作流实例的抄送列表。需要指定实例 ID。参见 API 详情。
bash
fx-api-cli workflow cc_list '{"instance_id": "instance_id_1"}'Get the CC list of a workflow instance. The instance ID is required. See API Details.
核心规则
Core Rules
实例 ID 查找规则
Instance ID Search Rule
- 当用户需要操作工作流实例但未提供实例 ID 时:
- 调用 获取任务列表
workflow.task.list - 从任务列表中提取实例 ID
- 匹配策略:
- 精确匹配唯一结果:直接使用
- 模糊匹配多个结果:展示候选列表让用户选择
- 无匹配结果:告知用户未找到
- 调用
- When the user needs to operate a workflow instance but does not provide the instance ID:
- Call to get the task list
workflow.task.list - Extract the instance ID from the task list
- Matching Strategy:
- Exact match with unique result: use directly
- Fuzzy match with multiple results: display candidate list for user to choose
- No matching result: inform the user that no result is found
- Call
任务 ID 查找规则
Task ID Search Rule
- 当用户需要操作工作流任务但未提供任务 ID 时:
- 调用 获取任务列表
workflow.task.list - 根据用户提供的条件(如任务状态、创建时间等)过滤任务
- 匹配策略:
- 精确匹配唯一结果:直接使用
- 模糊匹配多个结果:展示候选列表让用户选择
- 无匹配结果:告知用户未找到
- 调用
- When the user needs to operate a workflow task but does not provide the task ID:
- Call to get the task list
workflow.task.list - Filter tasks according to the conditions provided by the user (such as task status, creation time, etc.)
- Matching Strategy:
- Exact match with unique result: use directly
- Fuzzy match with multiple results: display candidate list for user to choose
- No matching result: inform the user that no result is found
- Call
审批规则
Approval Rules
- 审批意见:审批、拒绝、回退等操作必须提供审批意见
- 操作确认:执行审批、拒绝、关闭等操作前必须向用户确认
- Approval Opinion: Operations such as approval, rejection, and rollback must provide approval opinions
- Operation Confirmation: You must confirm with the user before performing operations such as approval, rejection, and closing
典型工作流
Typical Workflows
查询工作流实例详情
Query Workflow Instance Details
用户query示例:
- "帮我查询工作流实例详情"
- "查看工作流实例信息"
执行流程:
- 通过 实例 ID 查找规则 确定目标实例的
instance_id - 调用 获取实例详情
workflow.instance.get - 展示实例的状态、创建时间、发起人等信息
User query examples:
- "Help me query the details of the workflow instance"
- "View workflow instance information"
Execution Process:
- Determine the of the target instance through the Instance ID Search Rule
instance_id - Call to get the instance details
workflow.instance.get - Display the instance status, creation time, initiator and other information
查询工作流实例日志
Query Workflow Instance Logs
用户query示例:
- "帮我查询工作流实例日志"
- "查看工作流实例的操作记录"
执行流程:
- 通过 实例 ID 查找规则 确定目标实例的
instance_id - 调用 获取日志列表
workflow.instance.log_list - 展示每条日志的操作时间、操作人、操作类型和操作内容
User query examples:
- "Help me query the workflow instance logs"
- "View the operation records of the workflow instance"
Execution Process:
- Determine the of the target instance through the Instance ID Search Rule
instance_id - Call to get the log list
workflow.instance.log_list - Display the operation time, operator, operation type and operation content of each log
查询工作流任务列表
Query Workflow Task List
用户query示例:
- "帮我查询工作流任务"
- "查看待处理的工作流任务"
执行流程:
- 确定查询参数(应用 ID、表单 ID、任务状态等)
- 调用 获取任务列表
workflow.task.list - 展示每个任务的任务 ID、状态、创建时间、处理人等信息
User query examples:
- "Help me query workflow tasks"
- "View pending workflow tasks"
Execution Process:
- Determine query parameters (application ID, form ID, task status, etc.)
- Call to get the task list
workflow.task.list - Display the task ID, status, creation time, processor and other information of each task
审批工作流任务
Approve Workflow Task
用户query示例:
- "帮我审批这个工作流任务"
- "批准这条工作流"
执行流程:
- 通过 任务 ID 查找规则 确定目标任务的
task_id - 收集用户提供的审批意见
- 向用户确认审批操作
- 调用 审批任务
workflow.task.approve - 展示审批结果
User query examples:
- "Help me approve this workflow task"
- "Approve this workflow"
Execution Process:
- Determine the of the target task through the Task ID Search Rule
task_id - Collect the approval opinion provided by the user
- Confirm the approval operation with the user
- Call to approve the task
workflow.task.approve - Display the approval result
拒绝工作流任务
Reject Workflow Task
用户query示例:
- "帮我拒绝这个工作流任务"
- "拒绝这条工作流"
执行流程:
- 通过 任务 ID 查找规则 确定目标任务的
task_id - 收集用户提供的拒绝意见
- 向用户确认拒绝操作
- 调用 拒绝任务
workflow.task.reject - 展示拒绝结果
User query examples:
- "Help me reject this workflow task"
- "Reject this workflow"
Execution Process:
- Determine the of the target task through the Task ID Search Rule
task_id - Collect the rejection opinion provided by the user
- Confirm the rejection operation with the user
- Call to reject the task
workflow.task.reject - Display the rejection result
转交工作流任务
Transfer Workflow Task
用户query示例:
- "帮我转交这个工作流任务"
- "把任务转交给其他人"
执行流程:
- 通过 任务 ID 查找规则 确定目标任务的
task_id - 收集用户提供的接收人 ID 和转交意见
- 向用户确认转交操作
- 调用 转交任务
workflow.task.transfer - 展示转交结果
User query examples:
- "Help me transfer this workflow task"
- "Transfer the task to someone else"
Execution Process:
- Determine the of the target task through the Task ID Search Rule
task_id - Collect the recipient ID and transfer opinion provided by the user
- Confirm the transfer operation with the user
- Call to transfer the task
workflow.task.transfer - Display the transfer result
错误处理
Error Handling
- 实例未找到:明确告知用户未找到对应工作流实例
- 任务未找到:明确告知用户未找到对应工作流任务
- 权限不足:明确告知用户无权限执行操作
- API错误:展示具体错误信息,必要时重试
- 网络问题:HTTP错误时主动重试最多3次
- Instance not found: Clearly inform the user that the corresponding workflow instance is not found
- Task not found: Clearly inform the user that the corresponding workflow task is not found
- Insufficient permissions: Clearly inform the user that they have no permission to perform the operation
- API error: Display specific error information, retry if necessary
- Network problem: Actively retry up to 3 times when HTTP error occurs