Define the Metadata for the Scheduled Task

Developing Scheduled Tasks 6-3 The elements in the XML file reflect the task parameters that you described in Section 6.2, Define the Metadata for the Scheduled Task . Example 6–1 shows a sample XML code for the scheduled task described in the preceding paragraph. Note that all the parameters are declared to be required parameters in this example. Example 6–1 Sample XML for a Scheduled Task scheduledTasks xmlns=http:xmlns.oracle.comoimscheduler task nameTest_scheduled_taskname classoracle.iam.scheduler.TestSchedulerclass descriptionRetrieve Employee Records For Given Departmentdescription retry5retry parameters string-param required=true helpText=Name of the departmentDepartment Namestring-param string-param required=true encrypted=false helpText=Name of the departmentDepartment Namestring-param number-param required=true helpText=Number of Records to Be RetrievedNumber of Recordsnumber-param boolean-param required=false helpText=Retrieve disabled employee records?Get Disabled Employeesboolean-param parameters task scheduledTasks This is basically exporting the task.xml from MDS and then adding the required tags to it and importing it back into MDS. You must export the task.xml file from MDS, add the required tags to the file, and then import it back to MDS. See Chapter 33, MDS Utilities and User Modifiable Metadata Files for information about exporting and importing MDS files.

6.4 Develop the Scheduled Task Class

The next step is to create a Java class to execute the task whose metadata was defined in the XML file. The Java class that implements a scheduled task is known as a scheduled task class. To develop a Java class for the scheduled task: 1. Create a Java class file that extends the oracle.iam.scheduler.vo.TaskSupport class and overrides the execute method with processing logic based on your requirements. Note: The scheduled task XML file can be imported into MDS using an Oracle WebLogic Server import utility. In a clustered environment, having the file in MDS avoids the need to copy the file on each node of the cluster. For details about importing files into MDS, see Chapter 33, MDS Utilities and User Modifiable Metadata Files . See Also: Appendix A, Scheduled Task Configuration File for details about the elements in the scheduled task configuration file.