Okay. I think I know what is wrong with your code. I believe you are not completing the workitem but completing the task.
Just add the code WorkItemManager.completeWorkItem(workItemId, <arguments if you have any other wise null>);
This will move your workflow forward.
Regards.