Easiest way would probably be to execute a Microflow that handles the feedback.
// BEGIN USER CODE
Map<String, Object> params = Maps.newHashMap();
params.put("message", "hello person!");
Core.execute(getContext(), "MyModule.MyMicroflow", params);
return true;
// END USER CODE
(this assumes you have a microflow "MyMicroflow" in module "MyModule" that takes a single string as parameter with name "message")
It is even more simple than that: just use:
public Boolean executeAction() throws Exception
{
// BEGIN USER CODE
this.addTextMessageFeedback(MessageType.ERROR, "hoi", true);
return true;
}