Skip to content
Back to skills

Ontoplato Workflow Operator

ASecurity

Operate active tasks and approvals in OntoPlato and Praxis as the signed-in principal: inspect pending/inbox items and authorized Actions (my-actions/workflows/find/action), advance one step via pull Action (run) or Praxis workflow (start/decide/assign/case), and manage temporary Case workflows.

  • 13 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added December 3, 2026
businessgobashsqlreactnoderailsapifrontenddocumentation

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add ontomato-ai/OntoPlato --skill ontoplato-workflow-operator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ontoplato Workflow Operator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ontoplato Workflow Operator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ontomato-ai-ontoplato-workflow-operator/badge)](https://www.skillsdirectory.com/skills/ontomato-ai-ontoplato-workflow-operator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ontoplato-workflow-operator
description: "Operate active tasks and approvals in OntoPlato and Praxis as the signed-in principal: inspect pending/inbox items and authorized Actions (my-actions/workflows/find/action), advance one step via pull Action (run) or Praxis workflow (start/decide/assign/case), and manage temporary Case workflows."
compatibility: Node.js 24+
---

# Workflow Operator

This skill does one job: **as the currently signed-in principal, complete the single step currently assigned to you—or spin up and cleanly retire a one-off temporary workflow when needed.**

Designing fixed company workflows, maintaining conceptual components, and managing organizations, roles, or policies belong to `ontoplato-workflow-admin` and `ontoplato-permission`.

---

## Connection and prerequisites

- Node.js 24+ (the bundled script uses Node built-ins only), a running OntoPlato + Praxis deployment, and a valid domain account.
- Below, `<this-skill>` is the directory containing this `SKILL.md`. JSON arguments accept inline JSON (`{...}`), a file path (`file.json`), or `@file.json`. Every write command supports `--dry-run` (prints the outgoing request locally without logging in, hitting the network, or executing any Action).
- Endpoint configuration (based on frontend base URL `ONTOMATO_URL` / `<envUrl>`, e.g., `http://host:3000`, falling back to `application.yml` in the current working directory or this skill directory):
  - `ONTOMATO_ONTOLOGY_URL` (or `OA_BASE`): data-engine endpoint, defaulting to `<envUrl>/api/data-query`;
  - `ONTOMATO_PRAXIS_URL` (or `PRAXIS_BASE`): unified authenticated Praxis product entrypoint, defaulting to `<envUrl>/api/praxis` (the client automatically resolves `domainId` from the signed-in user; only superAdmin cross-domain calls pass `--domain <domainId>`);
  - `OA_AUTH` (only when overriding the login endpoint in username/password mode).
- Authentication (no default account; precedence: platform callback `ONTOMATO_EXECUTION_CALLBACK` > CLI flags `--token` / `--api-key` / `--user`+`--password` > env `ONTOMATO_API_KEY` > `ONTOMATO_TK` > `OA_CODE`+`OA_PASS`+`OA_DOMAIN` > `application.yml`):
  1. **OntoPlato API Key**: `ONTOMATO_API_KEY` (compatible with `OA_API_KEY`) or `--api-key <key>`;
  2. **Platform token**: `ONTOMATO_TK` (compatible with `OA_TOKEN`) or `--token <tk>`;
  3. **Username + password**: `OA_CODE` + `OA_PASS` + `OA_DOMAIN` or `--user` / `--password` / `--domain`.
- Inside platform Agent runs, the host injects callback endpoints and credentials automatically; outside the platform, configure environment variables or `application.yml` and run the exact same commands.
- `ONTOMATO_CALLER_TK` is injected internally by the data engine for `praxis_*` helpers inside Action runtimes; operators never configure or pass it as a parameter.
- Business objects and ledger views are routed via administrator-configured `multiSource`; operators read Runs, Steps, and Cases only and never alter adapters, schemas, or ledger routes.

```bash
node <this-skill>/scripts/client.mjs me
node <this-skill>/scripts/client.mjs ping
node <this-skill>/scripts/client.mjs praxis-health
node <this-skill>/scripts/client.mjs my-actions
```

---

## 1. Two execution paths and routing order

The platform provides two distinct progression mechanisms:

| Aspect | Path A: OntoPlato pull Action (`run`) | Path B: Praxis ledger (`start` / `inbox` / `decide`) |
| --- | --- | --- |
| Turn eligibility | Action's own `submissionCriteria` (status / node / assignee) | Run step state + `assignedTo` / `assignee` + candidate directory |
| How to advance | Direct `run <actionId> <json>` | Find `waiting` step via `inbox`, advance via `decide <stepId> approve\|reject` |
| Ledger | None; state lives only on the business object | Full `workflow_run` / `workflow_case` / `step_run` and audit events |
| Best for | Standalone Actions outside any active Workflow | Fixed workflows, approvals, audit trails, rule/agent routing, Case workflows |

**Hard rules:**

- **Never both `run` and `decide` the same step**: if the step belongs to a Praxis Run, always use `inbox` → `decide`; calling `run` directly bypasses the ledger or double-executes the approval Action.
- **Execute one step per turn**: identify the single `pending` / `inbox` step belonging to the current principal, execute it once, then stop, read back the updated business object or Run state, and report to the user. **Never chain into subsequent steps.**
- **Default routing order**:
  1. For business intents ("submit", "recommend", "approve", "confirm", "appoint", "promote", etc.), run `workflows "<user request>"` first; if handling existing tasks, also check `inbox` / `pending`.
  2. Whenever an ACTIVE Workflow matches, treat it as a fixed workflow on Praxis: existing task → `inbox` / `pending` → `decide`; new initiation → `template` → `start` → `decide` on the first waiting step.
  3. Use `run` only when `workflows` has no match or the user explicitly names a standalone Action outside any ACTIVE Workflow.
  4. **Never treat absence from `my-actions` as "no permission"**: `caseScoped` steps intentionally write no role-level global grant; authorization is issued per Run to the current assignee at decision time.
  5. When multiple Workflows match, pick the most specific match by workflow/step/Action name and current role; if still ambiguous, inspect candidate `template`s rather than guessing.
- **When you cannot execute a task yourself**: inspect your organizational subtree with `node <this-skill>/scripts/client.mjs org-graph` to view `units`, `members` with effective roles, `roles[].capabilities`, `roles[].canCreateWorkflow`, and `caseClass` / `caseApi`. Never retry unauthorized calls blindly; report the error to an administrator.

---

## 2. Identity, discovery, and task lists

```bash
node <this-skill>/scripts/client.mjs my-actions                      # Published Actions the principal can invoke standalone + full parameter schemas
node <this-skill>/scripts/client.mjs workflows "request 2-day leave" # Match ACTIVE Workflows, steps, roles, and Actions
node <this-skill>/scripts/client.mjs template <workflowId>           # Inspect frozen template steps (s1, s2, …)
node <this-skill>/scripts/client.mjs find "purchase" [className]     # Filter authorized Actions by keywords/class
node <this-skill>/scripts/client.mjs action <actionId>               # Full Action definition (parameters, types, enums, logic)
node <this-skill>/scripts/client.mjs pending [limit] [--flow <id>]   # Platform-generated "My Pending" business-object query
node <this-skill>/scripts/client.mjs inbox                           # Praxis ledger waiting steps assigned to me
```

- `my-actions` aggregates published Actions granted via active workflows or direct grants (`source=process|direct`, workflow ID, version, and parameter specs). If the user holds no role, it explicitly reports `This subject holds no role in this domain.`
- **Never probe parameters by trial-running or `--dry-run`ing**: always read the real parameter schema from `my-actions` or `action <actionId>`.
- `pending` (OntoPlato business-object view) and `inbox` (Praxis ledger view) are independent views; correlate them by business-object ID and never assume identical counts. When the directory is degraded, `inbox` still returns steps explicitly assigned to you.

---

## 3. Path A: OntoPlato pull execution (`run`)

```bash
node <this-skill>/scripts/client.mjs run act_leave_start '{
  "title":"October Client Visit",
  "dept":"Engineering",
  "days":"2",
  "reason":"On-site support"
}'
```

- Calls multipart `/action/execute` with keys matching `function.parameters`; missing keys return `Missing parameter: <name>` (`null` is allowed; empty string and `0` are real values).
- Authorization, data scope, and `submissionCriteria` are enforced server-side.
- **Actions belonging solely to `caseScoped` steps of ACTIVE workflows return unauthorized on direct `run`**—handle them through Praxis `inbox` → `decide`; never request role-level grants to bypass `assignedTo`.
- Common rejections: out-of-turn (`preconditions are not met`), unauthorized (`notGranted`), out of scope (`Action.targetOutsideScope`), unpublished/frozen (`Action.notPublished` / `publishedIsFrozen`).

---

## 4. Path B: Praxis ledger execution

### 4.1 Starting a Run and binding a business object

```bash
node <this-skill>/scripts/client.mjs start <workflowId> '{"s1":{"title":"October Client Visit","days":"2"}}'
node <this-skill>/scripts/client.mjs start <workflowId> --no-auto
node <this-skill>/scripts/client.mjs tick <runId>
node <this-skill>/scripts/client.mjs bind <runId> leave_request <businessObjectId>
```

Standard initiation sequence for a fixed workflow:

1. `workflows "<user request>"` to identify the single most specific ACTIVE Workflow;
2. `template <workflowId>` to inspect the initial step, role, Action, and parameters;
3. Extract step-1 business inputs and run `start <workflowId> '{"s1":{...}}'` (`requester` is derived from the caller's token; ticks immediately unless `--no-auto` is passed);
4. Run `decide` on the returned initial waiting `stepId`, then stop.

Binding and fact-table rules:

- Approval Actions take the **business object ID** as `run_id` (not the Praxis Run ID). When a creation Action returns `targetClass` and `run_id` (or `id`), Praxis binds `actsOn` automatically without manual `bind`. If it returns only `{"completed": true}` with no binding, report the broken workflow binding immediately instead of continuing.
- Never pre-insert pending promotion/grade target rows into historical fact tables (e.g., create a `tech_gwdj_apply` request first; only the final approval Action closes prior history and inserts the real `tech_gwdj` record).

Verify business object state using `dsl` with the standard ontology graph DSL (never SQL or ad-hoc JSON):

```bash
node <this-skill>/scripts/client.mjs dsl '{"problem":"read record","answer":{"steps":[{"graph":{"patterns":[{"objects":[{"idx":0,"variable":"x","class":"tech_duty","conditions":{"properties":{"field":"id","operator":"=","value":"td-1"}}}]}],"pattern_logic":"and"},"output":{"to_user":true,"fields":[{"as":"id","variable":"x","field":"id"},{"as":"current_step","variable":"x","field":"current_step"}],"limit":{"offset":0,"count":1}}}]}}'
```

### 4.2 Decisions, assignment, and Run inspection

```bash
node <this-skill>/scripts/client.mjs decide <stepId> approve "Approved"
node <this-skill>/scripts/client.mjs decide <stepId> reject "Incomplete documentation"
node <this-skill>/scripts/client.mjs candidates <stepId>
node <this-skill>/scripts/client.mjs assign <stepId> dept_leader1
node <this-skill>/scripts/client.mjs assign <stepId> --clear
node <this-skill>/scripts/client.mjs runs [status]
node <this-skill>/scripts/client.mjs run-status <runId>
```

- `decide` takes `verdict` (`approve` | `reject`) on a `waiting` human step; `decider` must match the caller's token. Both approval and rejection execute the step's Action under the decider's identity (`decision=rejected` on rejection) and advance or terminate the Run; rejected attempts record `step.refused` audit events.
- `assign` obeys organizational and lock rules: once assigned, only the current assignee, Run `requester`, or an administrative role may reassign—peers cannot snatch steps. `--clear` returns the step to its role pool. `candidates` returning `degraded=true` means no subject directory is configured, not that the role is empty.
- In `run-status`, inspect `status` (`pending`/`running`/`waiting`/`completed`/`failed`/`cancelled`), `steps[].status` (`routing` means rule/agent assignment is in flight), `steps[].assignedTo`, and `events[]`.

### 4.3 Runtime handling of `actorPolicy`

- **`none/manual`**: role-pool candidates may claim while `assignedTo=null`; once assigned, only the assignee may execute.
- **`rule/manual`**: Praxis resolves `assignedTo` via MetricView before entering `waiting`; inspect `assignedTo` and do not call `assign` redundantly.
- **`agent/manual`**: Praxis AssignmentWorker invokes the Agent asynchronously. When invoked with `variables.operation=propose-workflow-assignment`, the Agent **must pick solely from `variables.candidates` and return only a JSON proposal** (`{"assignedTo":"...","reason":"...","evidence":[...]}`), **never calling `assign`, `decide`, or `run`**. AssignmentWorker re-validates against the live candidate set before writing `assignedTo`.
- **`invocationMode=automatic`**: explicitly rejected at runtime; never simulate automatic execution with tools.

---

## 5. Case-based temporary workflows and cleanup

Temporary workflows are implemented through the lifecycle `DRAFT → ACTIVE → run → deactivate → delete`. **Always prefer `temporary: true` + `runClassName: "workflow_case"` + `caseScoped: true`** so no role-level global grant is written and only the current Case assignee can execute:

```bash
# Save and activate a temporary workflow (--draft keeps DRAFT; --run starts immediately; --no-auto skips initial tick)
node <this-skill>/scripts/client.mjs temp-save tmp.json --run '{}'

# Read, fill, and close the Case
node <this-skill>/scripts/client.mjs case <runId>
node <this-skill>/scripts/client.mjs case-submit <runId> '{"cpu":2,"memory_mb":8192,"disk_mb":204800,"os":"centos"}'
node <this-skill>/scripts/client.mjs case-fill <runId> '{"host":"dev-02","ip":"192.0.2.12"}'
node <this-skill>/scripts/client.mjs tick <runId>
node <this-skill>/scripts/client.mjs case-close <runId>

# Deactivate and delete the temporary workflow (frozen Runs and Cases remain in the Praxis ledger)
node <this-skill>/scripts/client.mjs temp-clean <workflowId>
```

- **`caseScoped: true` semantics**: activation writes **no role-level `role × action` global grant**; execution is permitted solely for the current Case `assignedTo` principal through Praxis on the active `waiting` step. Peers in the same role are denied on both direct `run` and `decide`.
- Only `requester` may call `case-submit`; only `requester` or current `assignee` may call `case-fill` and `case-close`; `locked` fields always read from Case `payload` and cannot be overridden; closed Cases are immutable.
- `temp-save` requires workflow `CREATE` and `workflow.lifecycle.change` permissions; ask an administrator if missing.
- **Always run `temp-clean` when done**: it deactivates before deleting and aborts if deactivation fails so active runs are never orphaned. Legacy non-`caseScoped` temporary workflows leave active role grants behind until cleaned up.

---

## 6. Error semantics and next actions

| Response | Meaning | Next step |
| --- | --- | --- |
| 401 `Unauthorized` / `A platform token is required...` | Missing or expired platform credential | Re-run `login` or refresh `ONTOMATO_TK` / `ONTOMATO_API_KEY` |
| 403 `requested domain does not match` | Target domain mismatches signed-in user's domain | Do not cross domains as a regular user; superAdmin passes target token or `--domain` |
| 404 `Domain ... is not served by this Praxis process` | New domain auto-provisioning pending or failed | Wait/retry and ask admin to run `domain-praxis-check` and inspect logs; do not restart Praxis |
| 403 `The requester is X but the token belongs to Y` | Payload principal mismatches token | Act under your own account; never impersonate |
| 403 `Not eligible to decide` | Step is not yours to decide | Inspect `inbox` / `candidates` and route to an eligible assignee |
| 403 `Cannot reassign step ...` | Step is assigned to someone else and caller lacks reassign rights | Contact current assignee, requester, or admin; do not snatch |
| 403 `notGranted` / `Action.targetOutsideScope` | OntoPlato grant/scope denial (including direct call to a `caseScoped` Action) | For workflow/Case steps use Praxis `inbox` → `decide`; otherwise ask admin for grants |
| 400 `Missing parameter: X` | Required Action parameter omitted | Check `action <actionId>` and supply all declared keys |
| 400 `preconditions are not met` | Not this step's turn or invalid business state | Inspect current node/status with `dsl` or `run-status` |
| `ValueError at program.py line N` | Action business validation rejected (custom error text masked by platform) | Read Action `logic` and inspect live state with `dsl` for duplicates or invalid values; do not retry blindly |
| 400 `Step is X, not waiting` | Step already decided or not ready | Check `run-status`; do not repeat `decide` |
| 409 `duplicate key` | Scheduled trigger fired twice for the same slot | Treat as already triggered and inspect existing Run |
| `No published pending-items query` | Activation did not generate pending query | Ask admin to check `runContract` / `activationNotes` and reactivate |
| `Cannot reach Praxis` | Product `/api/praxis` route unreachable | Check platform proxy and Praxis service; standalone pull Actions remain usable |

---

## 7. Command quick reference

| Command | Purpose |
| --- | --- |
| `login / me / me-full / ping / praxis-health` | Verify auth, full identity/permissions, and `/api/praxis` reachability |
| `org-graph / subjects / roles` | Organizational subtree & capabilities, domain subjects, roles |
| `my-actions / workflows [need] / find <need> [className] / action <actionId>` | Discover authorized Actions, match ACTIVE Workflows, inspect parameter schemas |
| `dsl <json\|@json>` | Run ontology graph DSL to inspect objects or verify row permissions |
| `pending [limit] [--flow <id>]` | Platform-generated "My Pending" business-object query |
| `run <actionId> <paramJson>` | Path A: pull-execute a standalone OntoPlato Action |
| `template <workflowId> / start <workflowId> [inputsJson] [--no-auto] / bind <runId> <targetClass> <targetId> / tick <runId>` | Path B: inspect template, start Run, bind business object, tick manually |
| `inbox / runs [status] / run-status <id> / decide <stepId> approve\|reject [comment]` | Praxis inbox, Run status, and approval/rejection decision |
| `candidates <stepId> / assign <stepId> <principal\|--clear>` | Inspect step candidates and assign/clear principal |
| `case <runId> / case-submit <runId> <json> / case-fill <runId> <json> / case-close <runId>` | Read, submit, fill, and close temporary workflow Cases |
| `temp-save <json> [--draft] [--run <inputsJson>] [--no-auto] / temp-clean <workflowId>` | Create, activate, and clean up temporary Workflows |

---

## 8. Safety boundaries

- Never write passwords, tokens, or API Keys into files, logs, or transcripts; inject via environment variables.
- Never use an administrator account to impersonate business roles for "passing" a flow—approval records persist the acting principal permanently.
- Confirm scope before creating, deactivating, or deleting temporary workflows; all operations touch live domain data.
- Never bypass `caseScoped` boundaries or the Praxis ledger via ad-hoc role grants or direct object edits.

Files in this skill

  • SKILL.md18.5 KB
  • scripts/client.mjs49.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in business →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.