Class TasklistApiClient

Description

The high-level client for the Tasklist GraphQL API

Example


Hierarchy

  • TasklistApiClient

Constructors

  • Example

    
    

    Description

    Returns TasklistApiClient

Properties

getHeaders: any
graphqlUrl: string
userAgentString: any

Methods

  • Parameters

    • taskId: string
    • assignee: string
    • Optional allowOverrideAssignment: boolean

    Returns Promise<{
        claimTask: Task;
    }>

  • Description

    Delete process instance data from the Tasklist ES by id. Returns true if the process instance is found and canceled, false if the process instance could not be found. Documentation.

    Parameters

    • processInstanceId: string

    Returns Promise<{
        deleteProcessInstance: boolean;
    }>

  • Type Parameters

    • T = {
          [key: string]: any;
      }

    Parameters

    Returns Promise<{
        tasks: TaskWithVariables<T>[];
    }>

  • Description

    Query Tasklist for a list of tasks. See the API documentation.

    Example

    const tasklist = new TasklistApiClient()

    async function getTasks() {
    const res = await tasklist.getTasks({
    state: TaskState.CREATED
    }, ['id', 'name', 'processName'])
    console.log(res ? 'Nothing' : JSON.stringify(res.tasks, null, 2))
    return res
    }

    Type Parameters

    • T = {
          [key: string]: any;
      }

    Parameters

    • query: Partial<TaskQuery>
    • Optional fields: TaskFields

      a list of fields to return in the query results

    Returns Promise<{
        tasks: TaskWithVariables<T>[];
    }>

Generated using TypeDoc