We need to add the user name administrator in the "TaskServiceSession" taskSession.addUser(new User("administrator"));
With this the workflow progresses and completes the remaining tasks after the user task is completed.
You must have the administrator role in order to run any process. It is a requirement.