It's all about IAM

Identity And Access Management - Rajiv Dewan

Stop Schedule Task using APIs in OIM 10g


Stop the Schedule Task using OIM APIs


Here is the sample code:

tcSchedulerOperationsIntf scheduleIntf = (tcSchedulerOperationsIntf) ioUtilityFactory.getUtility("Thor.API.Operations.tcSchedulerOperationsIntf");
HashMap scheduleMap = new HashMap();
scheduleMap.put("Task Scheduler.Name", "XYZ");
tcResultSet scheduleResultSet = scheduleIntf.findScheduleTasks(scheduleMap);
long scjeduleTaskKey = scheduleResultSet.getLongValue("Task Scheduler.Key");
HashMap updateMap = new HashMap();
updateMap.put("TSK_STOP", "1");
scheduleIntf.updateScheduleTask(scjeduleTaskKey, updateMap);
System.out.println("Schedule Task is STOPPED successfully");

You have implemented Stop() method and Stop Flag in the Schedule Task.          

No comments:

Post a Comment