How to complete steps one after another using service task with node.js

const { Client, logger } = require('camunda-external-task-client-js');

const config = {

baseUrl: 'http://localhost:8080/engine-rest',

use: logger, 

asyncResponseTimeout: 10000


const client = new Client(config);

client.subscribe('save-database', async function ({ task, taskService }) {

await taskService.complete(task);


client.subscribe('send-email', async function ({ task, taskService }) {

await taskService.complete(task);

indent preformatted text by 4 spaces

What exactly happens when you run this code?

Also - can you format the code correctly, it would make it easier to read. Read about how to format your code here.

not working after heating
http://localhost:8080/engine-rest/process-definition/key/create-user/start url

can you give a better explanation of this?
What do you expect to happen and what exactly are you seeing happen

after completing one step ‘save-database’ it should go to ‘send-email’ … and after completing ‘send-email’ it should go to the next step
it should complete one after another step using same file like ‘node myworker.js’
I am reffering camunda-external-task-client-js for the same.

It seems process is created and already done, add logs to workers.
History data processes is not visible, unless you add some history plugins to cockpit