Execute DMN after the external service task and pass the values from the external service task to DMN

I am trying to execute the External service task. But when I execute the worker with /complete rest it gives the error saying 500 internal server error.

Also just to demonstrate how to pass the values from the external service task to the next block in the process. I decided to construct a simple example, which consists of an external task and a script in BPMN process. The external task executes using /fetchAndLock and the /Complete rest API. With /complete I am also sending some variables. But I don’t know how to print them using the script. This I did just to verify how to access the variables from external service task. I am not successful with this approach. I am not able to print any variables using the script. I was using javascript.

If I was successful, I would have tried to directly pass those values to the dmn as the input.

My goal here is to achieve: take values from external service task --> DMN (Business rule task)

Please help me with this !

Thanks in advance!

Did you find any solution?