### Hierarchy

- ZBClient

## Index

### Constructors

- constructor

### Properties

- gatewayAddress

### Methods

- cancelWorkflowInstance
- close
- createWorker
- createWorkflowInstance
- deployWorkflow
- failJob
- getServiceTypesFromBpmn
- getWorkflow
- listWorkflows
- publishMessage
- publishStartMessage
- resolveIncident
- setVariables
- topology
- updateJobRetries

## Constructors

### constructor

- new ZBClient(gatewayAddress: string, options?: ZBClientOptions): ZBClient

- - Defined in zb/ZBClient.ts:26

  #### Parameters

  - ##### gatewayAddress: string

  - ##### Default value options: ZBClientOptions = {}

  #### Returns ZBClient

## Properties

### gatewayAddress

gatewayAddress: string

- Defined in zb/ZBClient.ts:20

## Methods

### cancelWorkflowInstance

- cancelWorkflowInstance(workflowInstanceKey: string): Promise<void>

- - Defined in zb/ZBClient.ts:247

  #### Parameters

  - ##### workflowInstanceKey: string

  #### Returns Promise<void>

### close

- close(): Promise<any>

- - Defined in zb/ZBClient.ts:103

  Gracefully shut down all workers, draining existing tasks, and return when it is safe to exit.

  memberof

    ZBClient

  #### Returns Promise<any>

  Promise

### createWorker

- createWorker<WorkerInputVariables, CustomHeaderShape, WorkerOutputVariables>(id: string, taskType: string, taskHandler: ZB.ZBWorkerTaskHandler<WorkerInputVariables, CustomHeaderShape, WorkerOutputVariables>, options?: ZBWorkerOptions & ZBClientOptions, onConnectionError?: ZB.ConnectionErrorHandler | undefined): ZBWorker<WorkerInputVariables, CustomHeaderShape, WorkerOutputVariables>

- - Defined in zb/ZBClient.ts:61

  #### Type parameters

  - #### WorkerInputVariables

  - #### CustomHeaderShape

  - #### WorkerOutputVariables

  #### Parameters

  - ##### id: string

    A unique identifier for this worker.

  - ##### taskType: string

    The BPMN Zeebe task type that this worker services.

  - ##### taskHandler: ZB.ZBWorkerTaskHandler<WorkerInputVariables, CustomHeaderShape, WorkerOutputVariables>

    A handler for activated jobs.

  - ##### Default value options: ZBWorkerOptions & ZBClientOptions = {}

    Configuration options for the worker.

  - ##### Optional onConnectionError: ZB.ConnectionErrorHandler | undefined

  #### Returns ZBWorker<WorkerInputVariables, CustomHeaderShape, WorkerOutputVariables>

### createWorkflowInstance

- createWorkflowInstance<Variables>(bpmnProcessId: string, variables: Variables, version?: undefined | number): Promise<CreateWorkflowInstanceResponse>

- - Defined in zb/ZBClient.ts:230

  Create and start execution of a workflow instance.

  memberof

    ZBClient

  #### Type parameters

  - #### Variables

  #### Parameters

  - ##### bpmnProcessId: string

  - ##### variables: Variables

    payload to pass in to the workflow

  - ##### Optional version: undefined | number

  #### Returns Promise<CreateWorkflowInstanceResponse>

### deployWorkflow

- deployWorkflow(workflow: string | string[], __namedParameters?: object): Promise<DeployWorkflowResponse>

- - Defined in zb/ZBClient.ts:126

  #### Parameters

  - ##### workflow: string | string[]

    A path or array of paths to .bpmn files.

  - ##### Default value __namedParameters: object = {}

    - ##### redeploy: boolean

  #### Returns Promise<DeployWorkflowResponse>

### failJob

- failJob(failJobRequest: FailJobRequest): Promise<void>

- - Defined in zb/ZBClient.ts:217

  #### Parameters

  - ##### failJobRequest: FailJobRequest

  #### Returns Promise<void>

### getServiceTypesFromBpmn

- getServiceTypesFromBpmn(files: string | string[]): Promise<string[]>

- - Defined in zb/ZBClient.ts:165

  Return an array of task-types specified in a BPMN file.

  #### Parameters

  - ##### files: string | string[]

  #### Returns Promise<string[]>

### getWorkflow

- getWorkflow(getWorkflowRequest: ZB.GetWorkflowRequest): Promise<GetWorkflowResponse>

- - Defined in zb/ZBClient.ts:274

  #### Parameters

  - ##### getWorkflowRequest: ZB.GetWorkflowRequest

  #### Returns Promise<GetWorkflowResponse>

### listWorkflows

- listWorkflows(bpmnProcessId?: undefined | string): Promise<ListWorkflowResponse>

- - Defined in zb/ZBClient.ts:268

  #### Parameters

  - ##### Optional bpmnProcessId: undefined | string

  #### Returns Promise<ListWorkflowResponse>

### publishMessage

- publishMessage<T>(publishMessageRequest: PublishMessageRequest<T>): Promise<void>

- - Defined in zb/ZBClient.ts:176

  Publish a message to the broker for correlation with a workflow instance.

  #### Type parameters

  - #### T

  #### Parameters

  - ##### publishMessageRequest: PublishMessageRequest<T>

    The message to publish.

  #### Returns Promise<void>

### publishStartMessage

- publishStartMessage<T>(publishStartMessageRequest: PublishStartMessageRequest<T>): Promise<void>

- - Defined in zb/ZBClient.ts:188

  Publish a message to the broker for correlation with a workflow message start event.

  #### Type parameters

  - #### T

  #### Parameters

  - ##### publishStartMessageRequest: PublishStartMessageRequest<T>

    The message to publish.

  #### Returns Promise<void>

### resolveIncident

- resolveIncident(incidentKey: string): Promise<void>

- - Defined in zb/ZBClient.ts:283

  #### Parameters

  - ##### incidentKey: string

  #### Returns Promise<void>

### setVariables

- setVariables<Variables>(request: SetVariablesRequest<Variables>): Promise<void>

- - Defined in zb/ZBClient.ts:255

  #### Type parameters

  - #### Variables

  #### Parameters

  - ##### request: SetVariablesRequest<Variables>

  #### Returns Promise<void>

### topology

- topology(): Promise<TopologyResponse>

- - Defined in zb/ZBClient.ts:116

  Return the broker cluster topology

  #### Returns Promise<TopologyResponse>

### updateJobRetries

- updateJobRetries(updateJobRetriesRequest: UpdateJobRetriesRequest): Promise<void>

- - Defined in zb/ZBClient.ts:211

  #### Parameters

  - ##### updateJobRetriesRequest: UpdateJobRetriesRequest

  #### Returns Promise<void>

Generated using TypeDoc