Skip to main content

Overview

Tasks are the execution units of workflows. While a workflow defines the blueprint (screens, transitions, logic), a task is a single instance of that workflow being executed by a user.

Workflow Instances

Each task is an execution of a workflow

State Management

Tasks move through workflow-defined states

Assignment

Assign to individuals or teams

Scheduling

Set scheduled time windows for execution

Workflow vs Task

ConceptDescriptionExample
WorkflowThe blueprint/template”Delivery Process” workflow
TaskA single execution instanceDelivery #1234 to John Doe
One workflow can have thousands of tasks created from it.

Task Properties

Required Fields

FieldDescription
WorkflowWhich workflow this task is based on
Scheduled FromStart of the scheduled time window
Scheduled ToEnd of the scheduled time window
Scheduled times have default values but are required. They define when the task should be executed.

Optional Fields

FieldDescription
AssigneeUser or team responsible for the task
Create-time DataData fields marked as “create time” in the workflow

Creating Tasks

Single Task Creation

1

Navigate to Workflow

Go to the workflow you want to create a task from
2

Click Create Task

Click the + Create Task button
3

Set Schedule

Enter the scheduled from and to times
4

Assign (Optional)

Select an assignee (user or team)
5

Fill Create-time Fields

Enter values for any create-time data fields
6

Create

Click Create to create the task

Bulk Task Creation

Create multiple tasks at once using CSV import:
1

Prepare CSV

Create a CSV with columns for scheduled times, assignee, and create-time fields
2

Click Import

Click Import Tasks in the workflow view
3

Upload File

Select your CSV file
4

Map Columns

Map CSV columns to task fields
5

Import

Click Import to create all tasks

API Task Creation

Create tasks programmatically via the API:
POST /api/v1/tasks
Authorization: Bearer {token}
Content-Type: application/json

{
  "workflowId": "wf_abc123",
  "scheduledSlot": {
    "from": "2024-01-15T09:00:00Z",
    "to": "2024-01-15T17:00:00Z"
  },
  "assignedTo": {
    "userId": "user_123"
  },
  "data": {
    "customer_name": "John Doe",
    "delivery_address": "123 Main St"
  }
}

Task Assignment

Assigning to a User

Select a specific user to execute the task:
{
  "assignedTo": {
    "userId": "user_123"
  }
}

Assigning to a Team

Assign to a team - any member can pick it up:
{
  "assignedTo": {
    "teamId": "team_456"
  }
}

Assignment Notifications

When a task is assigned:
  • Mobile App: User receives a push notification
  • Web: Task appears in their task list
  • Email: Optional email notification (if configured)

Task States

Tasks move through states defined by the workflow:
NEW (Initial) → IN_PROGRESS → COMPLETED (Terminal)

               CANCELLED (Terminal)
State TypeDescription
InitialStarting state (e.g., NEW)
In ProgressUser is working on the task
TerminalFinal states (e.g., COMPLETED, CANCELLED)
State transitions happen when users navigate through workflow screens.

Tasks on Web

The web view displays tasks similar to table records:
FeatureDescription
List ViewSee all tasks with filters and sorting
Task DetailsView task data, current state, history
State IndicatorVisual indicator of current workflow state
TimelineSee progression through workflow states

Filtering Tasks

Filter tasks by:
  • Status/State
  • Assignee
  • Scheduled date range
  • Create-time field values

Tasks on Mobile

On the mobile app, tasks are executed through the workflow screens:
1

Receive Notification

User gets push notification when assigned
2

Open Task

Task appears in their task list
3

Execute Screens

Navigate through workflow screens, filling in data
4

Complete

Reach a terminal state to complete the task

Mobile Task List

Users see:
  • Assigned tasks
  • Scheduled time window
  • Current state/screen
  • Priority indicators

Scheduling

Scheduled Time Window

Every task has a scheduled time window:
FieldPurpose
Scheduled FromWhen the task can start
Scheduled ToDeadline for completion

Default Values

If not specified, defaults are applied:
  • From: Current date/time
  • To: End of current day

Overdue Tasks

Tasks past their scheduled_to time are marked as overdue in both web and mobile views.

Task Lifecycle

┌──────────────┐
│    CREATE    │ Task created (web, bulk, or API)
└──────┬───────┘


┌──────────────┐
│    ASSIGN    │ Optional: assign to user/team
└──────┬───────┘


┌──────────────┐
│   EXECUTE    │ User works through workflow screens
└──────┬───────┘


┌──────────────┐
│   COMPLETE   │ Task reaches terminal state
└──────────────┘

Task Automations

Task-level automations are configured in the workflow. See Automation Types for:
  • Task Event Automations: Triggered on task create, assign, update, delete
  • Scheduled Slot Changes: When task schedule is modified

For AI Agents

Task Structure

interface Task {
  taskId: string;
  workflowId: string;
  workflowVersion: number;
  status: string;
  currentNodeId: string;
  scheduledSlot: {
    from: string;  // ISO date
    to: string;    // ISO date
  };
  assignedTo?: {
    userId?: string;
    teamId?: string;
  };
  data: Record<string, any>;  // User data fields
  createdAt: string;
  updatedAt: string;
  createdBy: string;
}

API: Create Single Task

POST /api/v1/tasks
Authorization: Bearer {token}
Content-Type: application/json

{
  "workflowId": "wf_abc123",
  "scheduledSlot": {
    "from": "2024-01-15T09:00:00Z",
    "to": "2024-01-15T17:00:00Z"
  },
  "assignedTo": {
    "userId": "user_123"
  },
  "data": {
    "customer_name": "John Doe"
  }
}

API: Bulk Create Tasks

POST /api/v1/tasks/bulk
Authorization: Bearer {token}
Content-Type: application/json

{
  "workflowId": "wf_abc123",
  "tasks": [
    {
      "scheduledSlot": {"from": "...", "to": "..."},
      "data": {"customer_name": "John"}
    },
    {
      "scheduledSlot": {"from": "...", "to": "..."},
      "data": {"customer_name": "Jane"}
    }
  ]
}

API: Get Task

GET /api/v1/tasks/:taskId
Authorization: Bearer {token}

API: Update Task

PATCH /api/v1/tasks/:taskId
Authorization: Bearer {token}
Content-Type: application/json

{
  "scheduledSlot": {
    "from": "2024-01-16T09:00:00Z",
    "to": "2024-01-16T17:00:00Z"
  },
  "assignedTo": {
    "userId": "user_456"
  }
}

API: List Tasks

GET /api/v1/workflows/:workflowId/tasks
Authorization: Bearer {token}

# Query parameters
?status=NEW,IN_PROGRESS
&assignedTo=user_123
&scheduledFrom=2024-01-01
&scheduledTo=2024-01-31
&page=0
&size=50

API: Delete Task

DELETE /api/v1/tasks/:taskId
Authorization: Bearer {token}

API: Assign Task

POST /api/v1/tasks/:taskId/assign
Authorization: Bearer {token}
Content-Type: application/json

{
  "userId": "user_123"
}

API: Unassign Task

POST /api/v1/tasks/:taskId/unassign
Authorization: Bearer {token}

UI Components

ComponentLocationPurpose
TaskList/src/views/tasks/TaskList/Task listing with filters
TaskDetails/src/views/tasks/TaskDetails/Single task view
TaskCreate/src/views/tasks/TaskCreate/Task creation form
TaskImport/src/views/tasks/TaskImport/Bulk import dialog
TaskAssignment/src/views/tasks/Assignment/Assignment selector

Event Tracking

// Task events
TaskEvents.TASK_CREATED
TaskEvents.TASK_BULK_CREATED
TaskEvents.TASK_UPDATED
TaskEvents.TASK_DELETED
TaskEvents.TASK_ASSIGNED
TaskEvents.TASK_UNASSIGNED
TaskEvents.TASK_STATE_CHANGED
TaskEvents.TASK_COMPLETED
TaskEvents.TASK_OVERDUE

Task States API

# Get available transitions for current state
GET /api/v1/tasks/:taskId/transitions
Authorization: Bearer {token}

# Execute a transition (move to next state)
POST /api/v1/tasks/:taskId/transition
Authorization: Bearer {token}
Content-Type: application/json

{
  "transitionName": "COMPLETE",
  "data": {
    "completion_notes": "Delivered successfully"
  }
}