Create custom task respecting taskDefinition from model

How to create a task respecting an existing definition from a model ?

In other words, i would like to create a custom REST endpoint such as POST /task/create/processInstance/taskKey and return the created task.

I already thought of sending message which creates the task, the problem is that i need the return task directly, no second http request.

My simple workflow process with user tasks :
“Enter info” --> “Approve info” --> “End”

And a floating user task:
“Request more details”

I would like to create the “Request more details” (multiple times) with REST API, which should return automatically the created camunda task. So the instance of “Request more details” can run in parallel of other tasks. Once the “Approve info” completes, it kill instances of “Request more details” (already done).

With the constraints you give, this is not possible. I’d go for the message-based solution and try to workaround the limitation that the response does not contain the task.

Cheeers,
Thorben