MWS Task freezes when you complete it

Hi everybody,

I have an issue when I complete a task it does not finishes and instead it keeps loading and i have to close the browser and open it again.

I have seen the MWS log and there’s no errors. I have also seen the JavaScript debbuger and it also doesn’t show anything.

In the implementation, the task is completed when the user selects “OK” on a modalDialog and the action button is called the CompleteTask () method

I hope somebody can help me :frowning:

Thanks a lot!

Please check MWS-IS connectivity.May be it is due to mws is unable to connect with IS to complete the task.Under MWS->Administrator->System Settings->Task engine(approx path)

Are you using task in process instance.If so ,please check after re-opening the whether the step is showing as completed or still in waiting step.
Also need to check what code is there after completeTask() action.

Hi Baharul,

Thanks for taking the time to respond. I checked Task Engine configuration and it is correct. I also checked the status of the task to re- open the browser and the task is set to “completed” .

Performing validation in debug mode, I could identify that calling the “task.completeTask()” method, the task stops responding, but the task is completed but not redirected. The curious thing is that it only happens with this task, other tasks of the project works well.

I tried also not call the CompleteTask () method but change the task status to “completed” directly and then call the method " task.applyChanges ()" , but to get to this part of the task stops responding again.

Thanks again and I hope you can help me with this

Hi Juan,
Can you please let us know which version of wM you are using?
Also is the code in completeTask() method is some custom code or auto generated code and was it working properly before you are facing the problem.

As per my understanding after task.completeTask() methods call ,task data can not be modified.Here I can see after task.completeTask() you are trying to set taskInfo status and the apply changes.So,can you please try with removing last two statement of setting status and applyChanges.

Please find one sample completeTask() generated for my case in wM 8.2 version.

public String completeTask() {
		try {
			if( !getTaskView1().isUpdateable() ){
				String errMsg = "You must accept a task before updating it";	//view.task.pagebean.task.accept.msg
				return OUTCOME_ERROR; 

			// do the work
			// then redirect to finish url
			String url = getTaskView1View().getFinishUrl(); 
			if (url != null && url.length() > 0) {

			return OUTCOME_OK;
		} catch (Exception e) {
			return OUTCOME_ERROR; 

Please let us know your updates regarding the same.

Baharul Islam