@vzeta/zeebe-node-test
Version:
The Node.js client library for the Zeebe Workflow Automation Engine.
22 lines (16 loc) • 506 B
JavaScript
// const ZB = require('zeebe-node');
const ZB = require('../dist')
; (async () => {
const zbc = new ZB.ZBClient()
const topology = await zbc.topology()
console.log(JSON.stringify(topology, null, 2))
await zbc.deployProcess('./test.bpmn')
zbc.createWorker('demo-service', (job) => {
console.log(job.variables)
job.complete()
})// handler)
setTimeout(() => {
console.log('Closing client...')
zbc.close().then(() => console.log('All workers closed'))
}, 1 * 60 * 1000)
})()