Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

camunda-community-hub/tasklist-client-node-js

Repository files navigation

Camunda 8 Tasklist API client for Node.js

NPM

Community Extension

Lifecycle

License

DEPRECATED

This package is deprecated. Please use the official SDK package @camunda8/sdk. See: https://github.com/camunda/camunda-8-js-sdk

A Camunda 8 Tasklist API client for Node.js. Uses camunda-saas-oauth-nodejs to use client credentials from the environment for authentication.

Installation

npm i camunda-tasklist-client

Usage

Set the credential for Camunda SaaS in the environment, then:

import { TasklistApiClient } from 'camunda-tasklist-client'

const tasklist = new TasklistApiClient()

async function main() {
    const { tasks } = await tasklist.getTasks({state: TaskState.CREATED})
    const task = tasks[0]
    console.log('Task', JSON.stringify(task, null, 0))
    const taskid = task.id
    const task = await tasklist.claimTask(taskid,"jwulf")
}

main()

Full API documentation available here.