Bpm runtime skill

From infometa/workbuddyskills · View interactive version

Bpm runtime skill is an AI agent skill from the GitHub repository infometa/workbuddyskills. Used to query or process existing business flow instances and business flow tasks. Use when the user mentions business flow to-dos, completion, submit after filling, editing task data, creating related data, executing a specified operation, changing or recalculating handlers, reminding, triggering,

How to use this skill

Skill file

Business Flow Runtime

Scope

Only handles existing business flow instances, business flow tasks, lanes, instance forms, and runtime task data. Do not use it for business flow definitions, node configuration, publishing, enabling or disabling, or configuration deletion.

This skill only handles explicitly identified tasks, instances, lanes, or business objects. Do not treat instance detail, instance list, lane queries, or task detail as a to-do query.

Tool Routing

| User Intent | Tool | Type | Primary Target | Use |

| --- | --- | --- | --- | --- |

| Complete current task | bpm_runtime_task_complete-task | Write | taskId | Complete the current business flow task without editing task data |

| Edit and complete, or update fields then complete | First bpm_runtime_task_get-task-info, then choose bpm_runtime_task_update-data-and-complete-task or bpm_runtime_task_edit + bpm_runtime_task_complete-task by layoutType | Write | taskId + entityId + objectId | Route completion by layout after confirming the current writable task form |

| Only edit task data | bpm_runtime_task_edit | Write | taskId | Save task form or business data without completing |

| Complete and create related data | bpm_runtime_task_complete-and-create-task-data | Write | taskId + activity ID | Complete the current task and create the required related business data in one operation |

| Execute specified task operation | bpm_runtime_task_operate-task | Write | taskId + type | Execute a concrete task-side operation such as a button-driven action identified in current context |

| View task details | bpm_runtime_task_get-task-info | Read | id (taskId) | Read task status, layout, current data, and writable-task context |

| View available buttons | bpm_runtime_task_get-button-by-task-id | Read | taskIds | Read task-level executable buttons or actions for the specified tasks |

| View tasks by lane | bpm_runtime_task_get-task-info-by-lane-id | Read | laneId + workflow and instance context | Read tasks that belong to a specific lane |

| View an instance form of a confirmed type | bpm_runtime_instance_get-instance-form | Read | workflowInstanceId + instanceFormType | Read an instance-level form when the form type is already known |

| Query instances by business record | bpm_runtime_instance_get-instances-by-object | Read | objectId | Read business-flow instances associated with a record |

| Find tasks by instance or view instance log | bpm_runtime_instance_get-instance-log | Read | workflowInstanceId | Read instance log data and locate task IDs under the instance |

| Cancel instance | bpm_runtime_instance_cancel | Write | id (workflowInstanceId) | Cancel an existing business flow instance |

| Trigger instance | bpm_runtime_instance_trigger | Write | id (workflowDefinitionId) + objectId | Trigger a business flow definition for a business record |

| Retry instance after-action | bpm_runtime_instance_after-action-retry | Write | instanceId | Retry a failed or pending instance-level after-action |

| Retry task after-action | bpm_runtime_task_after-action-retry | Write | taskId | Retry a failed or pending task-level after-action |

| Manually change handler | bpm_runtime_task_change-task-handler | Write | taskId + candidateIds | Replace the current task handler list with explicit user IDs |

| Recalculate handler | bpm_runtime_task_refresh-handler-by-task-id | Write | taskId | Recalculate the handler assignment for the specified task |

| Remind specified handler | bpm_runtime_task_remind | Write | taskId + remindPersons | Send a reminder to specified handlers on the task |

Layout Identification Before Editing And Completing

When the user asks to edit fields and complete the current BPM task, first call bpm_runtime_task_get-task-info for that same taskId, then route by layoutType.

| layoutType | Path |

| --- | --- |

| defaultLayout | Use bpm_runtime_task_update-data-and-complete-task to update fields and complete |

| objectFlowLayout | Use bpm_runtime_task_edit to save, then bpm_runtime_task_complete-task to complete |

| Missing, conflicting, or any other value | Stop and resolve the layout explicitly; do not guess or downgrade to another write path |

The flow-layout path is a closed two-step sequence for the same task and unchanged parameters. The final preview must state "save, then complete". After one later explicit user confirmation, run bpm_runtime_task_edit first and run bpm_runtime_task_complete-task only if the save succeeds.

Read Tool Usage Rules

Write Tool Usage Rules

Task completion

Use bpm_runtime_task_complete-task only when the task should be completed without changing task data in the same operation.

Edit then complete

When field updates are required before completion:

Task-only edit

Use bpm_runtime_task_edit only to save task data. Do not treat it as completion.

Complete and create related data

Use bpm_runtime_task_complete-and-create-task-data only when the user explicitly needs both task completion and creation of related data for the specified activity.

Task operation execution

Use bpm_runtime_task_operate-task only when the operation type is explicitly provided by the user or already confirmed from task buttons in current context. Do not infer type from natural-language intent alone.

Instance operations

Task-side recovery and assignment

Execution Rules

  1. First classify the unique target and action. Stop when the target ID is missing, the target type is unclear, the candidate is not unique, the current status conflicts, or required parameters are incomplete.
  2. Read tools may execute directly, but they only answer or collect facts and must never auto-escalate to a write.
  3. Write tools must use the narrowest confirmed target and parameters from current context. Do not fabricate actions, IDs, field payloads, candidate IDs, type, or related activity IDs.
  4. Only the confirmed objectFlowLayout path may execute the fixed two-step bpm_runtime_task_edit then bpm_runtime_task_complete-task sequence.
  5. After a write, use only the narrowest supporting read path needed for verification. Do not chain a second write because of verification.

Identifiers And Data Contract

Write Secondary Confirmation

Before every write, display a final business-facing preview and wait for an explicit affirmative in a later user message for the same unchanged operation.

Result Reporting

Report the actually executed operation, target, server result, and any read-only verification evidence. If the final business state cannot be independently verified, state that explicitly instead of overstating success.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.