I just needed to add SysEntryPointAttribute Metadata attribute and set the method to public:
[SysEntryPointAttribute]
public Email getEMailByItemValueId(HcmWorkerRecId _hcmWorkerRecId)
{
;
email = HcmWorker::find(_hcmWorkerRecId).Email();
return email;
}
Then I added an service and an service group and deployed it.
A good help was this blogpost: http://dynamics-ax.blogspot.de/2011/08/microsoft-dynamics-ax-2012-dive-into_10.html