Automatically activating and deactivating events - Custom Plugin


I found a forum article that describes a custom plugin to trigger an event.
I think that I may be able to use the same CP to activate and deactivate events.

I start by creating a DB table that will contain the typed ID from each backend database event table (file, FTP, timer, etc.) for events with the activateFlag = '1'.  Then I feed the resulting list into a custom plugin.
The sample below is using process variables to get the typed ID, but I will change that to consuming a stream before I am done.  My problem is that I don't have java docs for the com.adeptia.indigo.event.Event or EventUtils classes.  Will event.activate() do the required steps to activate an event, and what is the "arg0" string that event.deactivateEvent is expecting?

import com.adeptia.indigo.event.Event;
import com.adeptia.indigo.event.EventUtils;
import com.adeptia.indigo.logging.Logger;

Logger log = service.getLogger();
String eventID = (String) context.get("eventTypeId"); String activate =
(String) context.get("active"); Subject sub = service.getSubject(); Entity entity = EventUtils.getEntity(eventID, sub); if (entity != null) {
      "entity name: "+entity.getEntityName());
                Event event = ((Event) entity);
                if (activate.equalsIgnoreCase("true")) {
                else {
                                event.deactivateEvent(arg0, sub);




 "event.activate()" will activate the event. In "event.deactivateEvent(arg0, sub)",  "arg0" is the typed Id. You need to pass the "typed Id" and "subject" to the deactivate() method in order to deactivate any particular event. You can get "subject" by using "service.getSubject()".

Have more questions? Submit a request


Article is closed for comments.