}
private void updateUserProcessQueue(String taskIdString, Long processId, String assigneLogin, QueueType type)
{
Long taskId = Long.parseLong(taskIdString);
UserProcessQueue userProcessQueue = queueDao.getUserProcessQueueByTaskId(taskId, assigneLogin);
/* The queue element for given process exists with type "mine assiegned to me". Change its type and save */
if(userProcessQueue != null)
{
userProcessQueue.setQueueType(type);
}
/* Otherwise, create new process queue with correct type */
else
{
userProcessQueue = new UserProcessQueue();
userProcessQueue.setLogin(assigneLogin);
userProcessQueue.setProcessId(processId);
userProcessQueue.setTaskId(taskId);
userProcessQueue.setQueueType(type);
}
queueDao.saveOrUpdate(userProcessQueue);
}