import org.apache.commons.logging.Log;
import sailpoint.api.SailPointContext;
import sailpoint.object.TaskResult;
import sailpoint.tools.GeneralException;
public class SetTaskStatus {
static Log log = null;
static SailPointContext context = null;
public static void main(String[] args) {
int count = 316;
TaskResult taskResult = null;
try {
taskResult = context.getObjectByName(TaskResult.class, "Mighty Task");
if (taskResult != null) {
taskResult.addAttribute("count", count);
taskResult.setCompletionStatus(taskResult.getCompletionStatus().Success);
}
} catch (GeneralException e) {
log.error("GeneralException: " + e.getMessage());
taskResult.setCompletionStatus(taskResult.getCompletionStatus().Error);
}
}
}
No comments:
Post a Comment