External form to complete User Task

image
I have a simple process. I use the form from my web application, when user submit the form, the back-end will start new process instance then send the form data and complete userTask:

Step 1: Submit form
Step 2: Start new process instance
Step 3: Use processInstanceKey to find taskId of CREATED task
Step 4: Send form data as variables and complete task with taskId

But in step 3 return empty task list because of the delay between processing in zeebe and processing in Operate, Taslist ( ProcessInstance not created yet on whenComplete() callback of newCreateInstanceCommand() - Camunda Platform 8 Topics / Zeebe Client - Camunda Platform Forum)

So any solutions to solve this problem?

Hi @nhattvm11 !

What are you trying to achieve?
Do you want to display the task form immediately when starting the process?

I propose you better use start forms (you can add a form to a start event instead) which allows you to show the form before the process instance is actually created. The feature is natively supported in Web Modeler.

In case you want to keep the user task, you would have to repeatedly poll for the task - this is how we implemented it in the native Tasklist. We work on reducing the wait time, but tasks are designed to be asynchronous.

Best,
Christian

1 Like

Thank christian-konrad

Repeatedly pool is what i wanna find.

In other hand, if i use restAPI (webhook) instead of zeebe to start new process instance in step 2, do the delay also happen?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.