}else if(type.equalsIgnoreCase("cancelout")){
toAdd = true;
reason = StockUpdateReason.TR_OUT_C;
}
User user = new User();
user.setId(userId);
UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(user, null);
SecurityContextHolder.getContext().setAuthentication(token);
coreManager.updateStockRemote(transferId, reason, toAdd);
}