Workflow Management Skill
is the provided command-line program, all operations are completed by executing the
command.
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 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 Details 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 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 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 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 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 Approval 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 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 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 Signer 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 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 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 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
Instance ID Search Rule
- When the user needs to operate a workflow instance but does not provide the instance ID:
- Call to get the 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
Task ID Search Rule
- When the user needs to operate a workflow task but does not provide the task ID:
- Call to get the 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
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
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
- Call to get the instance details
- Display the instance status, creation time, initiator and other information
Query Workflow Instance Logs
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
- Call
workflow.instance.log_list
to get the log list
- Display the operation time, operator, operation type and operation content of each log
Query Workflow Task List
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
- Display the task ID, status, creation time, processor and other information of each task
Approve Workflow Task
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
- Collect the approval opinion provided by the user
- Confirm the approval operation with the user
- Call to approve the task
- Display the approval result
Reject Workflow Task
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
- Collect the rejection opinion provided by the user
- Confirm the rejection operation with the user
- Call to reject the task
- Display the rejection result
Transfer Workflow Task
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
- Collect the recipient ID and transfer opinion provided by the user
- Confirm the transfer operation with the user
- Call to transfer the task
- Display the transfer result
Error Handling
- 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