Processes getting stuck at a user task

Hi Camunda team,

We are running the Camunda engine in Spring boot. We communicate with the engine from the backend of our Web Application i.e we are trying to create a custom Tasklist in Angular to run a process by mapping all those Camunda parameters to our Application variables.
Initially few tests ran fine for a simple process but later when new processes have instantiated the process used to get stuck at the first user stage (Application stage in our example) and is breaking the Tasklist for the next stage.

Code snippet:-
String Pid = result.getId();
String taskurl = “http://localhost:8080/rest/task?processInstanceId=”+PID;
System.out.println(“Application stage marked as complete”);

	// Get taskID of the Checker Stage

	ResponseEntity<TaskDto[]> response2 = r.getForEntity(taskurl, TaskDto[].class);
	// System.out.println(response.getBody());
	TaskDto[] processes2 = response2.getBody();
	List<TaskDto> t2 = Arrays.asList(processes2);
	System.out.println("Task Id is " + t2.get(0).getId());

	System.out.println("Checker stage id fetched");

	// Save the user credentials along with the Pid,tid and tn of the his next task

	td.setProcessInstanceId(t2.get(0).getProcessInstanceId());
	td.setId(t2.get(0).getId());
	td.setName(t2.get(0).getName());

	custo.setTaskdao(td);

	customerrepo.save(custo);

	return "Data inserted successfully";

Checkers screen:-


Capture

We are using the latest Camunda v7.12. The BPMN file is attached too.
Why is the process engine getting stuck at the Application stage in some cases?
Regards,
Saurabh

What exactly do you mean when you say this? Is there any error in the logs? does the task disappear but the process not continue. what exactly happens?

As per the code, the process should mark Application stage as complete and then process should go into the Checker stage.Its happening too but in some cases the application stage is marked as complete by the rest api but when I open the cockpit the process is still in the Application stage.

It’s not exactly clear from the code how you’re triggering the engine to complete the task. which calls to the engine are being triggered and do you see any errors in the engine logs?

Can you explain this in more detail - i don’t understand what you mean when something is “marked”

I’m using this REST API by Camunda to complete the task from the backend of my application:-
http://localhost:8080/rest/task/“+t1.get(1).getId()+”/complete

I’m not getting any error logs but the task is not getting as completed in the engine.
BTW any updates from your side about the status of the Integrating a Frontend tuorial?