[cdap-597] business logic update according https://issues.cask.co/browse/CDAP-597

Changes added only for business logic. Updates for tests would be added later.