package
com.book.idm.bonus.dummyevent;
import
java.util.HashMap;
import
com.book.idm.project.utils.TaskSessionUtils;
import
com.netegrity.imapi.EventContext;
import
com.netegrity.imapi.EventListenerAdapter;
import
com.netegrity.ims.events.ModifyObjectEvent;
import
com.netegrity.ims.task.TaskSession;
import
com.netegrity.llsdk6.imsapi.managedobject.ManagedObject;
import com.netegrity.llsdk6.imsapi.type.ObjectType;
public class CreateEvent extends
EventListenerAdapter {
@Override
public int
after(EventContext evtCtx) throws Exception {
TaskSession ts =
TaskSessionUtils.getTaskSession(evtCtx);
ManagedObject obj =
evtCtx.getManagedObjectProvider(ObjectType.NONE).createManagedObject(new HashMap(),
null);
ModifyObjectEvent event = new
ModifyObjectEvent(ts, obj);
ts.enqueueSecondaryEvent(event);
return CONTINUE;
}
}
|
Please note, only workflow and event listener can generate new event
You can download source code here: http://www.caidentitymanagerbook.com/tutorial.html
No comments:
Post a Comment