manually raise an incident from HP BSM

we currently raise incidents from BSM using the "connected servers" and "forwarding rules"functionality. However now we would like to raise them manually.  I understand this would mean using "custom actions".  However as a newbie to groovy scripting would you have examples of how custom actions are used to extract data from an event/alert and then do something with the data.