How to generate warning

Hello,

How can I generate a warning that can be seen in MWS -> Process Instance Detail -> Activity Messages

Search for logActivityMessages in the service reference.

thanks lot reamon