Closed jinguo-yin closed 9 months ago
I use @ZeebeWorker subscribe zeebe event, but can not called when I create a ProcessInstance。 but I use pure zeebe-node,all is OK.
nestjs-zeebe code: @ZeebeWorker('demo-service') demoService(@Payload() job: ZeebeJob, @Ctx() context: any) { console.log('context is: ', context); console.log('demo-service task variables: ', job.variables); job.complete(); }
and zeebe-node code(i use postman call this function): @Get('createWorker') getTaskList() { this.zbClient.createWorker({ taskType: 'demo-service', taskHandler: taskHandler,
onReady: () => console.log('worker connected'), onConnectionError: () => console.log('Worker disconnected'), }); return 'tasklist';
} }
function taskHandler(job: ZeebeJob) { console.log('job', job.variables); return job.complete(); }
I resolve this question
I use @ZeebeWorker subscribe zeebe event, but can not called when I create a ProcessInstance。 but I use pure zeebe-node,all is OK.
nestjs-zeebe code: @ZeebeWorker('demo-service') demoService(@Payload() job: ZeebeJob, @Ctx() context: any) { console.log('context is: ', context); console.log('demo-service task variables: ', job.variables); job.complete(); }
and zeebe-node code(i use postman call this function): @Get('createWorker') getTaskList() { this.zbClient.createWorker({
taskType: 'demo-service',
taskHandler: taskHandler,
} }
function taskHandler(job: ZeebeJob) { console.log('job', job.variables); return job.complete(); }