Function/ process like Process Instances Search from myWebmethods

Hello guys,

I need  a Java function or a flow service to  search (check) if a process has been executed. 

I need something almost similar to myWebmethods Navigate -> Monitoring -> Process Instances - Search

Could you please make a sugestion in using a best practice solution to this ?

Any help will be very apreciated.

Kind regards,
Silviu

You can try pub.monitor.process.instance:getInstanceList in WmMonitor package