The cause is that the Task instance is not persisted in the database so the status is not updated.
I am adding a case statement here after skip.
case Skip: {
postTaskSkipOperation(task, userId);
break;
}
case Release: {
postTaskReleaseOperation(task);
break;
}
and in postTaskReleaseOperation(task); added the following...
private void postTaskReleaseOperation(Task task) {
// We may add some even support trigger here.
persistInTransaction(task);
}