Class OperateApiClient

Description

The high-level client for Operate.

Example

const operate = new OperateApiClient()

operate.searchProcessInstances({
filter: {
state: "ACTIVE"
},
size: 50
}).then(instances => {
console.log(instances)
})

Hierarchy

  • OperateApiClient

Constructors

  • Example

    const operate = new OperateApiClient()
    

    Parameters

    • Optional options: {
          baseUrl?: string;
          oauthProvider?: OAuthProviderImpl;
      }
      • Optional baseUrl?: string
      • Optional oauthProvider?: OAuthProviderImpl

    Returns OperateApiClient

Properties

getHeaders: any
gotOptions: any
oauthProvider: undefined | OAuthProviderImpl
safeJSONparse: any
userAgentString: any

Methods

  • Description

    Delete a specific process instance by key.

    Example

    const operate = new OperateApiClient()
    await operate.deleteProcessInstance(2251799819847322)

    Parameters

    • processInstanceKey: string | number

    Returns Promise<ChangeStatus>

  • Parameters

    • key: string | number

    Returns Promise<FlownodeInstance>

  • Description

    Retrieve an incident by incident key.

    Example

    const operate = new OperateApiClient()
    const incident = await operate.getIncident(2251799818436725)
    console.log(incident.message)

    Parameters

    • key: string | number

    Returns Promise<Incident>

  • Description

    Retrieve the variables for a Process Instance as an object, given its key

    Returns

    Type Parameters

    • T extends {
          [key: string]: JSONDoc;
      }

    Parameters

    • processInstanceKey: string | number

    Returns Promise<T>

  • Description

    Retrieve the metadata for a specific process definition, by key.

    Camunda 8 Documentation

    Example

    const operate = new OperateApiClient()
    const definition = await operate.getProcessDefinition(2251799817140074);

    Parameters

    • processDefinitionKey: string | number

    Returns Promise<ProcessDefinition>

  • Parameters

    • processDefinitionKey: string | number

    Returns Promise<string>

  • Description

    Retrieve a specific process instance by id.

    Example

    const operate = new OperateApiClient()
    const instance = await operate.getProcessInstance(2251799819847322)

    Parameters

    • processInstanceKey: string | number

    Returns Promise<ProcessInstance>

  • Description

    Get sequence flows of process instance by key

    Parameters

    • processInstanceKey: string | number

    Returns Promise<string[]>

  • Description

    Get the statistics for a process instance, grouped by flow nodes

    Parameters

    • processInstanceKey: string | number

    Returns Promise<{
        active: number;
        activityId: string;
        canceled: number;
        completed: number;
        incidents: number;
    }[]>

  • Description

    Return a variable identified by its variable key

    Returns

    Parameters

    • variableKey: string | number

    Returns Promise<Operate.Variable>

  • Description

    Retrieve the variables for a Process Instance, given its key

    Returns

    Parameters

    • processInstanceKey: string | number

    Returns Promise<{
        items: Operate.Variable[];
    }>

  • Description

    Search and retrieve incidents.

    Example

    const operate = new OperateApiClient()
    const query: Query<Incident> = {
    filter: {
    state: "ACTIVE"
    },
    size: 50,
    sort: [
    {
    field: "creationTime",
    order: "ASC"
    }
    ]
    }
    const incidents = operate.searchIncidents(query)

    Parameters

    Returns Promise<SearchResults<Incident>>

  • Description

    Search and retrieve process instances.

    Example

    ``` const operate = new OperateApiClient() const query: Query = { filter: { processVersion: 1 }, size: 50, sort: [ { field: "bpmProcessId", order: "ASC" } ] } const instances = await operate.searchProcessInstances(query) console.log(Found ${instances.total} instances)

    Parameters

    Returns Promise<SearchResults<ProcessInstance>>

Generated using TypeDoc