Delete event with groovy script in EPI (184 Views)
Reply
Advisor
MickyM
Posts: 29
Registered: ‎09-19-2010
Message 1 of 3 (184 Views)
Accepted Solution

Delete event with groovy script in EPI

Hi

 

I have a requirement where i'd like to delete an event from OMi after an EPI script has finished processing it.

 

I've looked through the API guides but can't seem to find any methods to allow me to do it.

 

Is this possible?

 

Thanks

Mick

Please use plain text.
HP Expert
Dmitry Shevchenko
Posts: 4,730
Registered: ‎01-30-2008
Message 2 of 3 (170 Views)

Re: Delete event with groovy script in EPI

Something like that should work:

 

def process(List<Event> events) {

    for (Iterator<Event> it = events.iterator(); it.hasNext();) {      

           Event event = it.next();       

          <do your event processing here for the event>     

            it.remove()     

     }   

 }  

Please use plain text.
Advisor
MickyM
Posts: 29
Registered: ‎09-19-2010
Message 3 of 3 (128 Views)

Re: Delete event with groovy script in EPI

Thanks, works great!

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation