Onfleet · Arazzo Workflow

Onfleet Batch Create and List Tasks

Version 1.0.0

Submit a batch of tasks asynchronously, then list tasks to verify the load.

1 workflow 1 source API 1 provider
View Spec View on GitHub Last Mile DeliveryLogisticsFleet ManagementDispatchRoute OptimizationCourierDriversTrackingGeocodingWebhooksAISaaSArazzoWorkflows

Provider

onfleet

Workflows

batch-create-and-list-tasks
Submit a batch of tasks and then list tasks over the same window.
Asynchronously creates a batch of tasks and lists tasks in the supplied time window to observe the result.
2 steps inputs: from, tasks, to outputs: jobId, tasks
1
createBatch
createTaskBatch
Submit the task batch for asynchronous creation.
2
listCreatedTasks
listTasks
List tasks over the supplied window to observe the batch result.

Source API Descriptions

Arazzo Workflow Specification

onfleet-batch-create-and-list-tasks-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Onfleet Batch Create and List Tasks
  summary: Submit a batch of tasks asynchronously, then list tasks to verify the load.
  description: >-
    Loads many deliveries at once for a daily route build. The workflow submits a
    batch of up to 100 tasks for asynchronous creation (results are also
    delivered via the taskBatchCreateJobCompleted webhook), captures the returned
    batch job id, and then lists tasks over the same time window so the newly
    created tasks can be observed once the batch job has processed. 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
sourceDescriptions:
- name: tasksApi
  url: ../openapi/onfleet-tasks-api-openapi.yml
  type: openapi
workflows:
- workflowId: batch-create-and-list-tasks
  summary: Submit a batch of tasks and then list tasks over the same window.
  description: >-
    Asynchronously creates a batch of tasks and lists tasks in the supplied time
    window to observe the result.
  inputs:
    type: object
    required:
    - tasks
    - from
    properties:
      tasks:
        type: array
        description: Up to 100 task-create objects to submit in the batch.
        items:
          type: object
      from:
        type: integer
        description: Start of the list search range in Unix milliseconds.
      to:
        type: integer
        description: End of the list search range in Unix milliseconds.
  steps:
  - stepId: createBatch
    description: Submit the task batch for asynchronous creation.
    operationId: createTaskBatch
    requestBody:
      contentType: application/json
      payload:
        tasks: $inputs.tasks
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
      jobId: $response.body#/jobId
  - stepId: listCreatedTasks
    description: List tasks over the supplied window to observe the batch result.
    operationId: listTasks
    parameters:
    - name: from
      in: query
      value: $inputs.from
    - name: to
      in: query
      value: $inputs.to
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      tasks: $response.body#/tasks
      lastId: $response.body#/lastId
  outputs:
    jobId: $steps.createBatch.outputs.jobId
    tasks: $steps.listCreatedTasks.outputs.tasks