arazzo: 1.0.1
info:
title: Onfleet Assign Task to Worker
summary: Create a task and explicitly assign it to a worker's container, then verify.
description: >-
Performs an explicit, manual dispatch rather than letting Onfleet
auto-assign. The workflow creates a dropoff task, sets the ordered task list
on a specific worker's container so the task is assigned to that driver, and
then reads the worker back to confirm the task now appears in their assigned
task list. Every step spells out its request inline so the flow can be read
and executed without opening the underlying OpenAPI descriptions.
version: 1.0.0
x-realizes-capability-ids:
- BC-2420.40
x-capability-derivation:
method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
min_confidence: 0.7
sources:
- capability_id: BC-2420.40
capability_name: Last-Mile Delivery Operations Management
spec: onfleet-tasks-api-openapi.yml
confidence: 0.8
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: tasksApi
url: ../openapi/onfleet-tasks-api-openapi.yml
type: openapi
- name: workersApi
url: ../openapi/onfleet-workers-api-openapi.yml
type: openapi
workflows:
- workflowId: assign-task-to-worker
summary: Create a task, assign it to a worker, and confirm the worker holds it.
description: >-
Creates a task and sets it on a worker's container, then verifies the
assignment by listing the worker's assigned tasks.
inputs:
type: object
required:
- workerId
- unparsedAddress
properties:
workerId:
type: string
description: The worker id to assign the task to.
unparsedAddress:
type: string
description: A single-line street address Onfleet will geocode.
completeBefore:
type: integer
description: Latest completion time in Unix milliseconds.
taskNotes:
type: string
description: Optional notes shown to the assigned worker.
steps:
- stepId: createTask
description: Create the dropoff task that will be assigned to the worker.
operationId: createTask
requestBody:
contentType: application/json
payload:
destination:
address:
unparsed: $inputs.unparsedAddress
completeBefore: $inputs.completeBefore
notes: $inputs.taskNotes
successCriteria:
- condition: $statusCode == 200
outputs:
taskId: $response.body#/id
- stepId: assignToWorker
description: Set the worker's container task list to include the new task.
operationId: assignTasksToWorker
parameters:
- name: workerId
in: path
value: $inputs.workerId
requestBody:
contentType: application/json
payload:
tasks:
- $steps.createTask.outputs.taskId
considerDependencies: true
successCriteria:
- condition: $statusCode == 200
- stepId: confirmWorkerTasks
description: List the worker's assigned tasks to confirm the assignment took effect.
operationId: listWorkerAssignedTasks
parameters:
- name: workerId
in: path
value: $inputs.workerId
successCriteria:
- condition: $statusCode == 200
outputs:
assignedTasks: $response.body
outputs:
taskId: $steps.createTask.outputs.taskId
assignedTasks: $steps.confirmWorkerTasks.outputs.assignedTasks
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.