Fixes for  error in publishing artifact updated event - STRATOS-791

This pull image contains the fixes for :
Error in publishing artifact updated event - STRATOS-858
Re factoring the code - STRATOS-791

Please review and merge