It's all about IAM

Stop Schedule Task using APIs in OIM 10g

Requirement:

Stop the Schedule Task using OIM APIs

Solution:

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");
 
Assumption:

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

No comments:

Post a Comment