Some problems with nodejs external task

Hi. I was trying to run this process using camunda-external-task-client-js but I got some problems.
Basically, my idea is to use a html form to complete the tasks.

This is the proyect repository: https://github.com/nachoviejo/EncuestaCursada

I’m using Express Web Framework for the communication between the task and the html form.
I followed one of Niall’s videos on youtube but this is a little different. I have the problem that when I fill out and submit the form, all the process instances that were in that task are completed with the same information I don’t know how to isolate the diferent process instance and complete it in diferents forms.
I’m newbie with this, so I think that I’m doing wrong the communication. I do not understand fully the use of the workers nodes. Someone can help me? Thanks.

PD: Sorry if some words in the files are in spanish.

You’re using external tasks as a way of completing user forms?
Why not just use User Tasks instead?

I need to collect the information on the web. How can I do it using User Tasks?

You should use a User Task as your BPMN element - then you can use the REST API to fetch and complete the tasks programmatically.

Oh, thanks you. Do you have any example of something like this (or the API at least) using nodejs or java?

Hey @Nacho_Viejo,

the APi for user tasks is documented in the link niall posted earlier.

As an example on how to use it, there are some examples here. It’s mostly browser side JavaScript, but there is also one nodeJS example

1 Like

Great! I will check the examples. Thanks a lot!