import java.util.HashMap;
import java.util.Map;
import sailpoint.api.SailPointContext;
import sailpoint.api.TaskManager;
import sailpoint.object.Attributes;
import sailpoint.object.TaskDefinition;
import sailpoint.object.TaskResult;
import sailpoint.tools.GeneralException;
public class CallTask {
static SailPointContext context = null;
public static void main(String[] args) {
String taskName = "Test Rule";
Map map = new HashMap();
map.put("UserID", "000123");
Attributes attributes = new Attributes();
attributes.setMap(map);
try {
TaskManager taskManager = new TaskManager(context);
TaskDefinition taskDefinition = taskManager.getTaskDefinition(taskName);
TaskResult runWithResult = taskManager.runWithResult(taskDefinition, attributes);
runWithResult.getId();
} catch (GeneralException e) {
System.out.println("GeneralException: " + e.getMessage());
}
}
}
No comments:
Post a Comment