This chapter includes the following sections:
Enterprise applications require the ability to respond to many real-time transactions requested by end users or web services. However, they also require the ability to offload larger transactions to run at a future time, or automate the running of application maintenance work based on a defined schedule.
Oracle Enterprise Scheduler provides the ability to run different job types, including: Java, PL/SQL, and spawned processes, distributed across nodes in a server cluster. Oracle Enterprise Scheduler runs these jobs securely, and provides monitoring and management through Fusion Applications Control.
Oracle Enterprise Scheduler provides scheduling services for the following purposes:
Distributing job request processing across a cluster of servers
Running Java, PL/SQL, and binary jobs
Scheduling job requests based on recurrence
Managing job requests with Fusion Applications Control
Oracle Enterprise Scheduler provides the critical requirements in a service-oriented environment to automate processes that must recur on a scheduled basis and to defer heavy processing to specific time windows. Oracle Enterprise Scheduler lets you:
Support sophisticated scheduling and workload management
Automate the running of administrative jobs
Schedule the creation and distribution of reports
Schedule a future time for a step in a business flow for business process management
Main Steps for Extending Oracle Enterprise Scheduler Jobs
Extending Oracle Enterprise Scheduler jobs involves the following main steps:
Develop the code that implements the job logic.
Create a metadata file for the job definition.
Grant permissions to the job, such that only those with the proper permissions can request job submission.
Enable job request submission, using an existing host application, a preconfigured user interface, or a new customized application.
Main Steps for Customizing Oracle Enterprise Scheduler Jobs
Customizing Oracle Enterprise Scheduler jobs involves editing job properties using Oracle Enterprise Manager Fusion Applications Control. The job properties that you can modify are described in Table 6-10.
Before you extend and customize Oracle Enterprise Scheduler jobs, you should be familiar with the Oracle Fusion application architecture that enables customization, as described in Customizing and Extending . You should also understand the typical workflow for working with customizations, as described in Understanding the Customization Development Life Cycle.
You will need to do the following before you can begin extending Oracle Enterprise Scheduler jobs:
For developers:
Set up JDeveloper. For more information, see About Installing Customization Tools.
Ensure that you have configured the target environment to which you want to deploy.
For administrators:
Install Oracle Fusion Applications, making sure to provision Oracle Enterprise Scheduler services.
Start Oracle Enterprise Manager Cloud Control. For more information about starting and using Cloud Control, see "Getting Started with Enterprise Manager Cloud Control" in the Administrator's Guide.
There are two main use cases for creating Oracle Enterprise Scheduler jobs.
Oracle Enterprise Scheduler Administrator
Administrators can create a new job definition using Oracle Enterprise Manager Fusion Applications Control console or Fusion Applications, using an existing host application. Scheduled jobs typically required by administrators include database maintenance tasks using PL/SQL or running spawned jobs or scripts such as SQL*Plus scripts to load data into the database. After you have defined the job, use Oracle Enterprise Manager Fusion Applications Control to submit the job request.
Developer or System Integrator
When using an existing host application, use Fusion Applications Control to create Oracle Business Intelligence Publisher, PL/SQL, and spawned jobs. Use JDeveloper to create Java jobs and develop a new host application that executes a set of jobs. A Java job might invoke an ADF Business Components service or a service-oriented architecture (SOA) composite application, for example.
In cases where there is no need to repackage the host application, PL/SQL, binary, Oracle BI Publisher and Java jobs can be added to any host application. Optionally, you can execute Java jobs from a custom host application.
System integrators may want to use Fusion Applications Control to develop a job, while developers may prefer JDeveloper. Jobs are typically submitted using the scheduled request submission UI. Alternatively, it is possible to develop an Oracle Application Development Framework application with screens for submitting Oracle Enterprise Scheduler jobs.
About Implementing Logic for the Oracle Enterprise Scheduler Jobs
An Oracle Enterprise Scheduler job is a request to execute a specific task written in code or a script, such as Java, PL/SQL, spawned jobs, and so on.
An example of logic to be implemented by a scheduled job is writing particular data to a database under certain conditions, for example, daily shift schedules for a given subset of employees.
About Creating a Job Definition Metadata File
An Oracle Enterprise Scheduler job definition specifies the type of job to be run (such as Java, PL/SQL type jobs, and so on), the host application that will run the job, and any additional required or optional parameters and properties for the job.
It is possible to create a job definition in Oracle Enterprise Manager Fusion Applications Control or JDeveloper.
The minimum required properties and parameters for each job type are as follows:
Oracle BI Publisher jobs: Specify the reportid
parameter. Specify Oracle BI Publisher parameters as job parameters with required validation. These can be entered by end users during request submission using the request submission user interface.
If the report is a bursting report, identify it as such by selecting the bursting check box.
PL/SQL jobs: In the job definition, specify the PL/SQL procedure that includes the job logic implementation.
All input arguments to the PL/SQL procedure can be specified as parameters with required validation. These can be entered by end users during request submission using the request submission user interface.
All other job types: Specify the name of the implementation logic and parameters in the job definition.
For more information about creating a job definition in Oracle Enterprise Manager Fusion Applications Control, see the "Managing Oracle Enterprise Scheduler Service and Jobs" chapter in the Administrator's Guide.
For more information about creating a job definition in JDeveloper, see the "Working with Extensions to Oracle Enterprise Scheduler" chapter in the Developer's Guide.
About Granting Relevant Permissions
Grant the appropriate permissions for the application using Oracle Authorization Policy Manager.
An example of the use of relevant permissions is to grant execution permissions to a role (an identity that determines permitted access to application functions and data) so that users belonging to that role can submit the job.
For more information about granting relevant permissions to roles in a deployed application using Oracle Authorization Policy Manager, see the "Securing Oracle Fusion Applications" chapter of the Administrator's Guide.
About Enabling Job Request Submissions
You can enable job request submissions through an Oracle ADF user interface using JDeveloper or Fusion Applications Control.
When using JDeveloper to enable job request submissions through an Oracle ADF user interface, you must define a view object to capture properties filled in by end users.
If a job is defined with properties that must be filled in by end users, the user interface allows end users to fill in these properties prior to submitting the job request. For example, if the job requires start and end times, end users can fill in the desired start and end times in the space provided by the user interface.
The properties that are filled in by end users are associated with a view object, which in turn is associated with the job definition itself. When the job runs, Oracle Enterprise Scheduler accesses the view object to retrieve the values of the properties.
You could, alternatively, submit job requests using Fusion Applications Control. Using Fusion Applications Control to enable job request submissions through an Oracle ADF user interface does not require you to create a view object for capturing end user data.
Note:
For example, suppose a parameter view object is view-linked to another view object. If you customize the view object using JDeveloper, then the Oracle Enterprise Scheduler job submission UI list of values reflects this customization, if the customization is in the Oracle Metadata Services runtime database.
For more information about submitting job requests using Fusion Applications Control, see the Submitting an Oracle Enterprise Scheduler Job Request" chapter in the Administering Oracle Enterprise Scheduler.
For more information about defining a view object for use with a job submission interface, see the "Working with Extensions to Oracle Enterprise Scheduler" chapter in the Developer's Guide.
Extending a custom PL/SQL Oracle Enterprise Scheduler job involves creating a PL/SQL package and defining job metadata.
Implementing a PL/SQL scheduled job involves creating a PL/SQL package and defining the job metadata using the PL/SQL job type. The PL/SQL procedure in the package runs as the scheduled job, and the PL/SQL procedure, therefore, must be written to accept the required errbuf
and retcode
arguments.
To implement the logic for a PL/SQL job:
Create a PL/SQL package, including the required errbuf
and retcode
arguments. A sample PL/SQL package is shown in the following example.
Deploy the package to Oracle Database.
Grant the required permissions, and perform any other necessary tasks in the database.
grant execute on xxSamplePkg to FUSION_APPS_EXECUTE;
For more information about granting permissions for the execution of a PL/SQL job, see the "Performing Oracle Database Tasks for PL/SQL Stored Procedures" section in the Developing Applications for Oracle Enterprise Scheduler.
Test the package.
Example 6-1 Sample PL/SQL package
CREATE OR REPLACE PACKAGE XxSamplePkg AUTHID CURRENT_USER AS Procedure SampleJob ( errbuf out NOCOPY varchar2, retcode out NOCOPY varchar2, name in varchar2 ); END XxSamplePkg; / CREATE OR REPLACE PACKAGE BODY XxSamplePkg AS Procedure SampleJob ( errbuf out NOCOPY varchar2, retcode out NOCOPY varchar2, name in varchar2 ) IS begin -- Write log file content using the FND_FILE API. FND_FILE.PUT_LINE(FND_FILE.LOG, 'Running Stored procedure SampleJob..........'); FND_FILE.PUT_LINE(FND_FILE.LOG, 'FND USERNAME : ' || FND_GLOBAL.USER_NAME); -- Write log file content using the FND_FILE API. FND_FILE.PUT_LINE(FND_FILE.OUTPUT,' Name : ' || name ); FND_FILE.PUT_LINE(FND_FILE.OUTPUT, 'Job Request id : ' || FND_JOB.REQUEST_ID ); errbuf := fnd_message.get_string('FND', 'COMPLETED NORMAL'); retcode := 0; end SampleJob; END XxSamplePkg; /
Use the Setup and Maintenance work area to define a job definition metadata file for the PL/SQL job. The job definition metadata file may also include user properties for the PL/SQL job as well as UI parameters to be displayed at runtime.
For more information about creating an Oracle Enterprise Scheduler metadata file, see the "Creating or Editing a Job Definition" section in the "Managing the Work of Oracle Enterprise Scheduler Jobs" chapter in Administering Oracle Enterprise Scheduler.
To create a job definition metadata file for a PL/SQL job:
Click your name in the global area of Oracle Fusion Applications and select Setup and Maintenance, then click All Tasks. Search for tasks starting with "Manage Custom Enterprise Scheduler Jobs%". This will list tasks per application for creating Oracle Enterprise Scheduler jobs.
From the list of tasks that is displayed, select the relevant UI application you will use to host the job definitions and parameter view objects. This Oracle Fusion application is the portlet producer application for the job.
Click Go to Task.
The Manage Job Definitions tab is displayed, as shown in the following figure.
Figure 6-1 Manage Job Definitions Tab
In the Manage Job Definitions tab, click New.
In the Create Job Definition tab, click Show More to display all parameters and enter the values for the job shown in the following table.
Table 6-1 PL/SQL Job Definition Values
Field | Description |
---|---|
Display Name |
Enter a display name for the job. |
Name |
Enter a name for the job definition. |
Path |
Specify the trailing package name for the job definition metadata. The default namespace or path for custom job definitions begins with |
Job Application Name |
From the dropdown list, select the name of the host application running the Oracle Enterprise Scheduler job. |
Job Type |
Select the job type from the dropdown list, namely the PlsqlJobType. |
Procedure Name |
Enter the name of the stored procedure to run as part of the PL/SQL job execution. |
Standard request submission flag |
Check this box to indicate that the job request is to be submitted in the standard manner. |
At the bottom of the pane, click the User Properties tab. Define the following user properties by clicking New, as shown in the following table.
Table 6-2 PL/SQL User Properties
Name | Data Type | Default Value | Read Only |
---|---|---|---|
|
String |
For the default value, enter the name of the web module that will be used as a portlet when submitting the job request. This is the short name of the hosting application that contains the ScheduleRequest task flow. This short name is defined in the TopologyManager tables in |
N/A |
|
String |
Set the number of job submission arguments. This number excludes |
N/A |
Note:
Typically, the web context is registered as the web module name. Verify with your applications administrator the value of the registered web module name in the Topology Manager work area. Registering the correct web module name enables the correct remote rendering of the Oracle Fusion application job request parameters from the Oracle Enterprise Scheduler central UI. (The web module name should match the one already provisioned in the TopologyManager tables.)
Click the Job_Definition_Name>: Parameters tab and specify UI parameters as required. These UI parameters get stored as parameter view objects internally. The UI parameter fields are described in the following table.
Table 6-3 PL/SQL Job UI Parameters
Field | Description |
---|---|
Prompt |
Enter the text to be displayed at the prompt that is displayed during runtime. |
Data Type |
From the dropdown list, select the relevant data type. |
Page Element |
From the dropdown list, select the UI page element you want to use to display the parameter, for example, a text box. |
Click Save and Close to create and save the new Oracle Enterprise Scheduler PL/SQL job definition.
Implementing a Java scheduled job involves implementing the Java business logic and defining the relevant Oracle Enterprise Scheduler job metadata. Use JDeveloper to implement a Java job and deploy the job as a shared library. Modify the deployment descriptor of the deployed user interface or host application Enterprise Archive (EAR) file so that it points to the shared library. Redeploy the file.
Deploying the job as a shared library allows you to add additional jobs in the future without having to redeploy the host application. For more information about deploying Oracle ADF applications, see the "Deploying Fusion Web Applications" chapter in the Developing Fusion Web Applications with Oracle Application Development Framework.
In order to develop an application that runs a Java class under Oracle Enterprise Scheduler, you must define the Java class that implements the Oracle Enterprise Scheduler executable interface. The executable interface defines the contract that enables using Oracle Enterprise Scheduler to invoke a Java class.
To create a Java class for an existing Oracle Enterprise Scheduler Oracle Fusion application, take the following steps:
Create an application in JDeveloper.
Create a project in JDeveloper.
Develop the application code that uses the Oracle Enterprise Scheduler Java APIs.
To implement the logic for an Oracle Enterprise Scheduler Java job:
In JDeveloper, create an application and project. Make sure to include Enterprise JavaBeans (EJB) and Java technologies in the project.
Add the Oracle Enterprise Scheduler extensions to the project.
In the Navigator, right-click the project you just created. Select Project Properties, and then select Libraries and Classpath.
In the Libraries and Classpath pane, click Add Library.
In the Add Library window, in the Libraries field, select Enterprise Scheduler Extensions and click OK.
Create a Java class using the Oracle Enterprise Scheduler package.
In the project overview tab, click the Java Files link.
In the Java Files pane, click New. From the Create New in Project menu, select Project Name and then select Java Class.
The Create Java Class window is displayed.
In the Create Java Class window, enter a name for the Java class and the package name in the fields provided. For example, if working with the Financials Oracle Fusion application, the package name would be oracle.apps.financials.ess.program. Accept the remaining default values.
In the Java class, develop the code that will do the work of the Java job. The following code sample illustrates the use of an Oracle Enterprise Scheduler job request file handle and writes a job request parameter submitted to the request log and output files.
Example 6-2 Sample Java code
package oracle.apps.financials.ess.program; import java.io.IOException; import oracle.as.scheduler.Cancellable; import oracle.as.scheduler.Executable; import oracle.as.scheduler.ExecutionCancelledException; import oracle.as.scheduler.ExecutionErrorException; import oracle.as.scheduler.ExecutionPausedException; import oracle.as.scheduler.ExecutionWarningException; import oracle.as.scheduler.RequestExecutionContext; import oracle.as.scheduler.RequestParameters; import oracle.as.scheduler.SystemProperty; import oracle.as.scheduler.cp.exec.ProcessHelper; import oracle.as.scheduler.cp.file.LogFile; import oracle.as.scheduler.cp.file.OutputFile; public class XxSampleJob implements Executable, Cancellable { private OutputFile requestOutput; private LogFile requestLog; private boolean m_isCancelled = false; private long request_id = 0L; private String requestParameter1 = null; public XxSampleJob() { super(); } public void execute(RequestExecutionContext ctx, RequestParameters params) throws ExecutionErrorException, ExecutionWarningException, ExecutionCancelledException, ExecutionPausedException { request_id = ctx.getRequestId(); System.out.println("XxSampleJob Running, Request ID: " + ctx.getRequestId()); try { String userFileDir = (String)params.getValue(SystemProperty.USER_FILE_DIR); String sysPropUserName = (String)params.getValue(SystemProperty.USER_NAME); // Read the job request parameter. requestParameter1 = (String) params.getValue("submit.argument1"); requestOutput = ProcessHelper.getOutputFile(); requestOutput.writeln("Sample ESS Java job execution OUTPUT"); requestOutput.writeln("USER_NAME as SystemProperty: " + sysPropUserName); requestOutput.writeln("ESS Job requestID: " + request_id); requestOutput.writeln("ESS Job request parameter: " + requestParameter1); requestLog = ProcessHelper.getLogFile(); requestLog.writeln("Sample ESS Java job execution LOG"); requestLog.writeln("ESS requestFileDirectory: " + userFileDir); requestLog.writeln("ESS Job requestID: " + request_id); requestLog.writeln("ESS Job request parameter: " + requestParameter1); } catch (Exception ex) { System.out.println("Exception running XxSampleJob: " + ex.getMessage()); ex.printStackTrace(); } finally { try { // Close all open job request log and output files. ProcessHelper.closeAllFiles(); } catch (IOException ioe) { System.out.println("Exception closing files: " + ioe.getMessage()); ioe.printStackTrace(); } } } @Override public void cancel() { m_isCancelled = true; } }
To deploy the Java logic of an Oracle Enterprise Scheduler Java job, identify an existing Oracle Fusion application as the target host application.
Next, update the Java business logic for an existing Oracle Fusion application as follows:
Package the Java application in a Java Archive (JAR) file.
Update JAR module in the Oracle Fusion application class path.
Bounce the server instance to load the Java program logic in the Oracle Fusion application class loader.
To deploy the Java business logic:
Create a deployment profile for the project.
In JDeveloper, from the Navigator, select the project you created. Build the project to ensure that the Java class successfully compiles.
Right-click the project, select Project Properties and then Deployment.
In the Deployment Profiles field, click New to create a deployment profile for the JAR file.
The Create Deployment Profile window is displayed.
In the Create Deployment Profile window, enter a name for the deployment profile and click OK.
In the Edit JAR Deployment Profile Properties window, verify that the Java job class is included in the JAR module output and click OK.
Package the Oracle Enterprise Scheduler Java class into a JAR file and deploy it.
From the Navigator, right-click the project you created. Select Deploy and then select the JAR file you just created.
The Deployment Action window is displayed.
In the Deployment Action window, click Finish to create a packaged JAR file.
The archive module is deployed to the default project deployment path, for example, $JDEV_HOME
/<
PROJECT_NAME
>/deploy/<
JAR_NAME
>.jar
.
Note:
All custom JAR files must begin with the prefix Xx
, for example XxMyJar.jar
.
Update the JAR module in the application class path of the Oracle Enterprise Scheduler host application.
Locate the expanded deployment directory of the EAR file for the existing Oracle Fusion application, for example $MW_HOME
/fusionapps/applications/fin/deploy/EarFinancialsEss.ear/APP-INF/lib
.
Copy the deployed custom JAR file to the expanded directory.
In the domain to which the Oracle Enterprise Scheduler host application is deployed, restart the ESSAPP application deployed to the Oracle Enterprise Scheduler domain. (This can be done using Oracle WebLogic Server Console or Oracle Enterprise Manager.)
The Oracle Enterprise Scheduler job executes the updated Java class after the application class loader successfully loads the updated class.
For more information about restarting Oracle Enterprise Scheduler, see the "Stopping and Starting Oracle Enterprise Scheduler Service Processes" section in the Administrator's Guide.
Using the Setup and Maintenance work area, create a Java type job definition.
To create a job definition metadata file for a Java job:
Click your name in the global area of Oracle Fusion Applications and select Setup and Maintenance, then click All Tasks. Search for all tasks.
From the list of tasks that is displayed, select the relevant UI application you will use to host the job definitions and parameter view objects. This Oracle Fusion application is the portlet producer application for the job.
Click Go to Task.
The Manage Job Definitions tab is displayed, as shown in the following figure.
Figure 6-2 The Manage Job Definitions Tab
In the Manage Job Definitions tab, click New.
In the Create Job Definition tab, click Show More to display all parameters and enter the values for the job shown in the following table.
Table 6-4 Job Definition Values
Field | Description |
---|---|
Display Name |
Enter a display name for the job. |
Name |
Enter a name for the job definition. |
Path |
Specify the trailing package name for the job definition metadata. The default namespace or path for custom job definitions begins with |
Job Application Name |
From the dropdown list, select the name of the host application running the Oracle Enterprise Scheduler job. |
Job Type |
Select the job type from the dropdown list, namely the JavaJobType. |
Class Name |
Enter the qualified class name of the Java business logic. |
Standard request submission flag |
Check this box to indicate that the job request is to be submitted in the standard manner. |
In the Create Job Definition window, from the Job Type dropdown list, select JavaJobType.
In the Create Job Definition window, in the Class Name field, enter the fully qualified class name of the Java business logic.
In the Create Job Definition window, In the User Properties tab, define only the EXT_PortletContainerWebModule property.
Typically, the web context is registered as the web module name. Verify with your applications administrator the value of the registered web module name in the Topology Manager work area. Registering the correct web module name enables the correct remote rendering of the Oracle Fusion application job request parameters from the Oracle Enterprise Scheduler central UI.
Click the <Job Definition Name>: Parameters tab and specify UI parameters as required. The UI parameter fields are described in the following table.
Table 6-5 Job UI Parameters
Field | Description |
---|---|
Prompt |
Enter the text to be displayed at the prompt that is displayed during runtime. |
Data Type |
From the dropdown list, select the relevant data type. |
Page Element |
From the dropdown list, select the UI page element you want to use to display the parameter, for example, a text box. |
Click Save and Close to create and save the new Oracle Enterprise Scheduler Java job definition.
Use Apache Ant scripts to develop and deploy an Oracle Enterprise Scheduler host application and user interface. Use JDeveloper to create the relevant metadata.
Use the supplied Ant script to create the host and user interface applications for the Oracle Enterprise Scheduler jobs.
When deploying the application, be sure to identify the product family and use an existing registered Oracle WebLogic Server domain. This allows you to test your application without having to create and register a domain, or register any associated applications with the product family.
To create host and user interface applications using scripts:
Example 6-3 Interactive Script Execution
$ ant Buildfile: build.xml -init: create-user-home: [input] Enter which template should be used (source_template) (default=Fusion) [input] ([Fusion], Standalone) Fusion [input] Enter Middleware Home Directory path (fmw_home_dir) (default=) [] /JDEVADF_INSTALLATION/ [input] Enter host application name (hosting_application_name) (default=MyAppEss) [MyAppEss] MyAppEss [input] Enter host application JPS stripe id (hosting_application_stripe_id) (default=MyAppEss) [MyAppEss] MyAppEss [input] Enter UI application name (ui_application_name) (default=MyApp) [MyApp] MyApp [input] Enter UI application JPS stripe ID (ui_application_stripe_id) (default=MyApp) [MyApp] MyAppEss [input] Enter the shared library name for the job business logic (jobdef_library_name) (default=MyJobsLibrary) [MyJobsLibrary] oracle.ess.shared [input] Enter an empty directory where the applications will be created (user_home) /workspace/ess_user_home [echo] [echo] [mkdir] Created dir: /workspace/ess_user_home [propertyfile] Creating new property file: /workspace/ess_user_home/template.properties [copy] Copying 31 files to /workspace/ess_user_home [copy] Copied 36 empty directories to 14 empty directories under /workspace/ess_user_home [copy] Copying 19 files to /workspace/ess_user_home [move] Moving 1 file to /workspace/ess_user_home/Template_Hosting [move] Moving 1 file to /workspace/ess_user_home/Template_UI [echo] [echo] ======================================== [echo] [echo] A new application workspace has been created at: /workspace/ess_user_home [echo] This application workspace can be opened and modified using JDeveloper [echo] To deploy the applications, run the following command: [echo] ant -f /workspace/ess_user_home/ant/build-ess.xml deploy [echo] To create new jobs from predefined templates, run the following command: [echo] ant -f /workspace/ess_user_home/build.xml create-new-job-def BUILD SUCCESSFUL
Example 6-4 Script Execution Via Property Files
user_home=/home/myuser/ess_user_home/ ui_application_name=MyApp ui_application_stripe_id=MyApp ui_application_version=V2.0 hosting_application_name=MyAppEss hosting_application_stripe_id=MyAppEss hosting_application_version=V2.0 jobdef_library_name=oracle.ess.sharedlibrary jobdef_library_spec_version=11 jobdef_library_impl_version=11.1.1.5.0
Example 6-5 Script Execution Via the Command Line
$> ant create-user-home -Dui_application_name=MyApp -Dhosting_application_name=MyAppEss
If you want to run a synchronous Java scheduled job, then you must develop the business logic for the job. Use the build.xml
file extracted in Creating Host and UI Applications Using an Ant Script to create a template for the business logic of the Java job.
To generate an Oracle Enterprise Scheduler Java job business logic template:
Example 6-6 Creating a Java Job Business Logic Template
Buildfile: /workspace/ess_user_home/build.xml -init: create-new-job-def: [echo] Available Job Definition Templates: [echo] 1) Simple Synchronous Java Job [input] Enter number of job definition template to create (job_template_to_create) 1 [echo] Calling default target on /my_ess_main/ess/util/customer_extensibility/Fusion/ Template_JobLibrary/simple_synchronous_job/build.xml -init: create-job-definition: [input] Enter Java package name for Job Definition (jobdef_package_name) (default=oracle.apps.ess.custom) [oracle.apps.ess.custom] oracle.apps.financials.ess.program [input] Enter Java class name for Job Definition (jobdef_class_name) (default=MySynchronousJavaJob) [MySynchronousJavaJob] HelloSyncJavaJob [copy] Copying 1 file to /workspace/ess_user_home/MyAppEss/EssSharedLibrary/src [copy] Copying 1 file to /workspace/ess_user_home/MyAppEss/EssSharedLibrary/src/oracle/ apps/financials/ess/program BUILD SUCCESSFUL
To submit job requests using the Oracle Enterprise Scheduler host application, you must create metadata that defines a job request, including the following:
Job type: This specifies an execution type and defines a common set of parameters for a job request.
Job definition: This is the basic unit of work that defines a job request in Oracle Enterprise Scheduler.
To use a Java class with Oracle Enterprise Scheduler you must create a job definition. When creating a job definition, specify a name, select a job type, and specify system properties.
To create a job definition in the host application:
If your job includes any properties to be filled in by end users at runtime, you need to create an Oracle ADF user interface and an ADF Business Components view object with validation, and the parameters to be filled in. The Oracle Enterprise Scheduler schedule request submission UI allows end users to fill in these properties prior to submitting the job request.
For more information about Oracle ADF view objects, see the "Creating a Business Domain Layer Using Entity Objects" chapter in the Developing Fusion Web Applications with Oracle Application Development Framework.
Create an Oracle ADF model project to display the properties to be filled in by end users at runtime.
To create an Oracle ADF model project:
In JDeveloper, open the Oracle Enterprise Scheduler Oracle ADF application.
From the Application menu, select New Project.
In the New Gallery under Categories, expand General and select Projects.
In the Items area, select ADF Model Project and click OK.
On the Name Your Project wizard page, enter the project name, for example EssModel. Click Finish to close the wizard.
From the Navigator, right-click the EssModel project and select Project Properties, then Libraries and Classpath, and then Add Library.
Add the required data model project libraries as described in the chapter "Setting Up Your JDeveloper Application Workspace and Projects" in the Developer's Guide.
Click OK to close the Project Properties dialog.
Use a parameters view object for jobs with parameters that require collecting values from end users at runtime. The properties filled in by end users are associated with an ADF Business Components view object, which is associated with the job definition itself. When the job runs, Oracle Enterprise Scheduler accesses the view object to retrieve the values of the properties.
To create an ADF Business Components view object for Oracle Enterprise Scheduler:
In JDeveloper in the Navigator, right-click the project EssModel in which you want to create the view object, and select New.
In the New Gallery, expand Business Tier, select ADF Business Components and then View Object. Click OK.
If this is the first component you are creating in the project, then the Initialize Business Components Project dialog is displayed, allowing you to select a database connection.
In the Initialize Business Components Project dialog, select the database connection or select New to create a connection.
Click OK. This launches the Create View Object wizard.
In the Create View Object wizard on the Name page, enter the following.
Package: Enter package information for the view object, for example oracle.apps.financials.ess
.
Name: Provide a name, for example, SampleVO
.
Select the data source type you want to use as the basis for this view object: For the data source, select Rows Populated Programmatically, Not Based on a Query.
Note:
Enter the view object package and name values specified for the job definition property parametersVO
in Creating an Job Definition in the Host Application.
Click Next. In the Attributes page, click Finish to create the Oracle Enterprise Scheduler parameter view object SampleVO
.
Define attributes for the view objects sequentially, ATTRIBUTE1
, ATTRIBUTE2
, and so on, with an attribute for each required parameter.
Create a query for the view object:
On the View Object page, from the left-hand list panel, select Query.
In the Query panel, click Edit.
Use the following query and test for validity:
select null as ATTRIBUTE1 from dual
Click OK.
Note:
A maximum of 100 attributes can be used for the property parametersVO
. The attributes should be named incrementally, for example ATTRIBUTE1
, ATTRIBUTE2
, and so on. Attribute names are not case-sensitive, such that ATTRIBUTE1
and Attribute2
can be used sequentially.
Ensure that the view object attributes can always be updated:
On the View Object page, from the left-hand list panel, select Attributes.
Edit the ATTRIBUTE1
table row.
In the Edit Attribute: Attribute1 window, select the option Always.
In the Edit Attribute: Attribute1 window, click Control Hints to display the Control Hints page. In the Control Hints page, specify required prompts, validation, and formatting for each parameter.
Click OK.
If not already specified, add the property parametersVO
to your Oracle Enterprise Scheduler host application job definition and specify the fully qualified path of the view object as the value of parametersVO
. For example, set parametersVO
to oracle.apps.financials.ess.SampleVO
in the job definition /oracle/apps/ess/custom/test/SampleJob.xml
.
<parameter name="parametersVO" data-type="string">oracle.apps.financials.ess.SampleVO</parameter>
Assembling the Oracle Enterprise Scheduler Oracle Fusion applications involves the following main steps:
Assembling an Oracle Enterprise Scheduler shared library
Assembling the host application
Assembling the Oracle ADF producer application
Assembling a shared library for Oracle Enterprise Scheduler involves the following main steps:
Creating or updating a shared library JAR manifest
Updating the shared library JAR deployment profile
The name and version information for a shared Java EE library are specified in the META-INF/MANIFEST.MF
file.
To assemble a shared library:
Specify attributes for the shared library in a manifest file.
Create or edit the manifest file in a text editor.
Enter the following command:
cd <ess_user_home>/MyAppEss/EssSharedLibrary/emacs MANIFEST.MF
Add or edit a string value to specify the name of the shared Java EE library. For example:
Extension-Name: oracle.ess.shared
Extension-Name
specifies the name of the shared Java library. Use the value specified in the script prompt for the shared library name. Oracle Enterprise Scheduler host applications that reference the library must specify Extension-Name
exactly to use the shared files.
As a best practice, enter the optional version information for the shared Java EE library. A sample MANIFEST.MF
file is shown in the following example.
Save the file. The MANIFEST
file is used by the JAR deployment file.
Compile the project. In the Navigator, right-click the Oracle Enterprise Scheduler shared library project and select Make EssSharedLibrary*.jpr*.
Right-click the Oracle Enterprise Scheduler shared library project and select Project Properties to display the Project Properties window.
In the Project Properties window, select Deployment.
In the Deployment Profiles region, select EssSharedLibrary (Shared Library JAR File).
Click Edit to open the Edit JAR Deployment Profile Properties window. In the Edit JAR Deployment Profile Properties window, click JAR Options.
In the JAR Options window, select the check box Include Manifest File (META-INF/MANIFEST.MF).
Click Add to specify the manifest file you created. This file should be merged into the manifest file that is generated by JDeveloper.
In the Edit JAR Deployment Profile Properties window, expand File Groups and select Filters. Under the Merged Contents of this File Group's Contributors list, deselect essmeta.
In the JAR Deployment Profile Properties page, click OK. In the Project Properties page, click OK.
Example 6-7 Sample MANIFEST.MF File
Extension-Name: oracle.ess.shared Specification-Version: 11.1.0 Implementation-Version: 11.1.0.0.0
Assembling the host application involves the following main steps:
Creating a MAR deployment file
Updating the EAR deployment file
To assemble the host application:
Open the Oracle Enterprise Scheduler host application in JDeveloper, and from the Application menu, select Application Properties.
In the Application Properties window, select Deployment.
Click New to display the Create Deployment Profile page and do the following:
In the Archive Type field, from the dropdown list, select MAR File.
In the Name field enter a name, for example myAppEss_MAR.
Click OK.
In the Edit MAR Deployment Profile Properties window, select MAR Options.
Modify the name of the MAR file, removing _MAR
from the end of the name, for example, changing myAppEss_MAR.mar
to myAppEss.mar
.
Select the Oracle Enterprise Scheduler metadata:
In the Edit MAR Deployment Profile Properties window, expand Metadata File Groups and select User Metadata.
In the Order of Contributors panel on the right-hand side, click Add to display the Add Contributor dialog.
In the Add Contributor dialog, browse to the location of the project directory, and expand it to add the essmeta
metadata that contains the namespace for the jobs directory. Select the path that you need to include in the Add Contributor dialog by double-clicking the essmeta directory.
In the Add Contributor dialog, click OK.
Select the directory for the metadata:
In the Edit MAR Deployment Profile Properties window, expand Metadata File Groups and User Metadata, and select Directories.
Select the directory that contains the Oracle Enterprise Scheduler application user metadata for the host application.
Select the bottommost directory in the tree. This is the directory from which the namespace is created. The folder you select in this dialog determines the top-level namespace in adf-config.xml
file.
This namespace should be the same as the package defined in the job definition, for example oracle/apps/ess/custom/<directory name>
.
Note:
In general, to create the namespace oracle/apps/<product>/<component>/ess
, select the ess directory.
In the Edit MAR Deployment Profile Properties page, click OK.
In the Application Properties window, select Deployment.
In the Deployment Profiles pane on the right-hand side, select the EAR profile and click Edit.
In the Edit EAR Deployment Profile Properties window, select Application Assembly.
Under Java EE Modules, select the check box for the MAR module.
In the Edit EAR Deployment Profile Properties window, select EAR Options.
Deselect Include Manifest File (META-INF/MANIFEST.MF).
In the Edit EAR Deployment Profile Properties page, click OK. In the Application Properties page, click OK.
Assembling the Oracle ADF application involves the following main steps:
Creating an ADF Library job deployment file
Preparing a Web Application Archive (WAR) deployment profile
Oracle ADF libraries have the option of automatic compilation that happens with deployment profile dependencies. This option allows the Oracle Enterprise Scheduler Oracle ADF Library used by the user interface project to be automatically included in the WEB-INF/lib
directory in the WAR file.
To assemble the Oracle ADF producer application:
Open the Oracle Enterprise Scheduler Oracle ADF application in JDeveloper.
In the Navigator, right-click the EssModel project and click New to display the New Gallery window.
In the New Gallery in the Categories area, expand General and select Deployment Profiles. Create the deployment profile as follows:
In the Items region, select ADF Library Jar File.
Click OK to open the Create Deployment Profile window.
In the Create Deployment Profile - ADF Library Jar File window, enter a name for the profile, using the format Adf<projName>
in accordance with package structure and naming standards.
Click OK to save the new deployment profile and close the Create Deployment Profile window.
In the Navigator, right-click the SuperWeb project and select Project Properties, and then Deployment.
In the Deployment Profiles region, edit the SuperWeb WAR deployment profile.
In the Edit WAR Profile Deployment Properties window, select Profile Dependencies.
In the pane on the right-hand side, under Java EE Modules, select the dependency under the ADF library JAR deployment file (EssModel.jpr
), for example, ADFMyApp.
Click OK to save the WAR deployment profile.
Deploying Oracle Enterprise Scheduler Oracle Fusion applications involves the following main steps. You must deploy the Oracle Enterprise Scheduler Oracle Fusion application in the order specified.
Note:
You can deploy these applications using either Oracle JDeveloper or an Ant script.
Deploy the shared Oracle Enterprise Scheduler library using JDeveloper or an Ant script.
Deploy the Oracle Enterprise Scheduler host application using JDeveloper or an Ant script.
Deploy the Oracle Enterprise Scheduler Oracle ADF producer application using JDeveloper or an Ant script.
Application-specific policies packed with script-generated host and Oracle ADF applications automatically migrate to the policy store when the application is deployed. Prior to deployment, verify that any grant of permissions in the application jazn-data.xml
file contains no duplicates.
For more information about securely deploying applications, see the "Deploying Secure Applications" chapter in the Oracle Fusion Middleware Applications Security Guide.
You can deploy the shared Oracle Enterprise Scheduler library using JDeveloper or an Ant script.
To deploy the share library using JDeveloper:
In the Navigator, right-click the Oracle Enterprise Scheduler shared library project, select Deploy and then select the shared library JAR.
The Deploy EssSharedLibrary_JAR window is displayed.
Select Deploy to a WebLogic Application Server and click Next.
In the Select Server window, select the application server to which you want to deploy the Oracle Enterprise Scheduler shared library.
Click Add to create a connection to the application server if none is defined. Click Next.
In the WebLogic Options window, make the following selections:
Select Deploy to selected instances in the Domain, and select the Oracle Enterprise Scheduler server instance in the table row. The Oracle Enterprise Scheduler shared library should be deployed to the same server as the Oracle Enterprise Scheduler host application.
Select Deploy as a shared library.
Click Finish.
Verify the deployment using the deployment log. Upon successful deployment, you can see the Oracle Enterprise Scheduler jobs shared library deployed as 'oracle.ess.shared(11,11.1.1)' in the Oracle WebLogic Server Administration Console.
To deploy the shared library using an Ant script:
Run the following Ant command:
ant -f ${ESS_HOME}/ant/build-ess.xml deploy_job_logic
The command deploy_job_logic
builds, packages and deploys only the Oracle Enterprise Scheduler jobs shared library.
Note:
When prompted, enter the Oracle WebLogic Server password.
To specify a different value for the ESS shared library name, take the following steps:
In a text editor, modify the shared library JAR MANIFEST
file. For example:
vi ${ess_user_home_dir}/MyAppEss/EssSharedLibrary/MANIFEST.MF
Edit the string value of Extension-Name
to specify the name of the shared Java EE library.
Enter the optional version information for the shared Java EE library.
Update the Oracle Enterprise Scheduler build.properties
file by editing ${ESS_HOME}/ant/config/ess-build.properties
.
Change the value of the property customEss.shared.library.name
to match the value specified in the JAR MANIFEST
file. The following example shows a sample build.properties
file.
Save the file.
Example 6-8 Sample build.properties File
# ESS build properties ess.script.base.dir=${user_home} fmw.home=${fmw_home} jdev.home=${fmw.home}/jdeveloper oracle.common=${fmw.home}/oracle_common # ========== ESS JDev project details =============== customEss.project.dir=${ess.script.base.dir} customEss.hostapp.workspace=${hosting_application_name} customEss.hostapp.jwsfile=${hosting_application_name} customEss.hostapp.earprofile=${hosting_application_name} customEss.hostapp.jprproject=EssSharedLibrary customEss.hostapp.jarprofile=EssSharedLibrary customEss.hostapp.jarfile=${jobdef_library_name} customEss.shared.library.name=${jobdef_library_name} customEss.hostapp.mds.partition=globalEss customEss.hostapp.mds.jdbc=mds-ApplicationMDSDB customEss.hostapp.name=${hosting_application_name} customEss.producerapp.workspace=${ui_application_name} customEss.producerapp.jwsfile=${ui_application_name} customEss.producerapp.earprofile=${ui_application_name} customEss.producerapp.name=${ui_application_name} # ========== WebLogic Server details =============== MW_HOME=${fmw.home} ORACLE_HOME=${jdev.home} MW_ORA_HOME=${jdev.home} COMMON_COMPONENTS_HOME=${oracle.common} WEBLOGIC_HOME=${fmw.home}/wlserver_10.3 weblogic.server.host=<server_host> weblogic.server.port=<server_port> weblogic.server.ssl.port=<server_ssl_port> weblogic.admin.user=<admin_username> weblogic.t3.url=t3://${weblogic.server.host}:${weblogic.server.port} # WebLogic server name where ESS producer web application is targeted for # deployment adfapp.server.name=AdminServer # WebLogic server name where ESS host application is targeted for deployment ess.server.name=ess_server1
You can deploy the Oracle Enterprise Scheduler application using JDeveloper or an Ant script.
To deploy the Oracle Enterprise Scheduler host application using JDeveloper:
In JDeveloper, open the Oracle Enterprise Scheduler host application.
From the Application menu, select Deploy and then select the name of the host application, for example MyAppEss.
In the Deploy MyAppEss window, select Deploy to Application Server and click Next.
In the Select Server window, select the application server to which you want to deploy the Oracle Enterprise Scheduler host application.
Click Add to create a connection to the application server if none is defined.
Click Next. In the WebLogic Options window, make the following selections:
Select Deploy to selected instances in the Domain, and select the Oracle Enterprise Scheduler server instance in the table row, to which the Oracle Enterprise Scheduler host application is to be deployed.
Select Deploy as a standalone Application.
Click Finish.
JDeveloper displays the Deployment Configuration page. Select the relevant options for your metadata repository.
Click Deploy.
Verify the deployment using the deployment log.
Upon successful deployment, you can expect to see the Oracle Enterprise Scheduler host application deployed in Fusion Applications Control.
To deploy the Oracle Enterprise Scheduler host application using an Ant script, run the following Ant command:
ant -f ${ESS_HOME}/ant/build-ess.xml deploy_ess_host
The command deploy_ess_host
builds, packages, and deploys only the Oracle Enterprise Scheduler host application. It is assumed that the Oracle Enterprise Scheduler shared job library is already deployed prior to running this command.
Note:
When prompted, enter the Oracle WebLogic Server password.
You can deploy the Oracle ADF producer application using JDeveloper or an Ant script. This step is optional if using an existing deployed producer web application. The value you defined for EXT_PortletContainerWebModule in Creating an Job Definition in the Host Application indicates the name of the application to be used.
To deploy the Oracle ADF producer application using JDeveloper:
In JDeveloper, open the Oracle ADF producer application.
From the Application menu, select Deploy and then select the name of the Oracle ADF producer application.
In the Deploy MyApp window, select Deploy to Application Server and click Next.
In the Select Server window, select the application server to which you want to deploy the Oracle Enterprise Scheduler Oracle ADF application.
Click Add to create a connection to the application server if none is defined.
Click Next. In the WebLogic Options window, make the following selections:
Select Deploy to selected instances in the Domain, and select the Oracle Enterprise Scheduler server instance in the table row, to which the Oracle Enterprise Scheduler Oracle ADF application is to be deployed.
Select Deploy as a standalone Application.
Click Finish.
The Select Deployment Type dialog window is displayed, prompting you to expose the MyApp portlet application as a WSRP service. Select Yes.
Click Next. The Deployment Configuration page is displayed. Select the relevant options for your metadata repository.
Enter globalEss as the partition name and click Deploy
Verify the deployment using the deployment log.
Upon successful deployment, you can expect to see the deployed Oracle Enterprise Scheduler Oracle ADF application in Fusion Applications Control.
Open the WSRP Producer test page to validate the deployment using the following URL:
http://<ADF_HOST>:<ADF_PORT>/<MyApp-context-root>/
To deploy the Oracle ADF producer application using an Ant script, run the following Ant command:
ant -f ${ess_user_home_dir}/ant/build-ess.xml deploy_ess_ui
The deploy_ess_ui
command builds, packages, and deploys only the Oracle Enterprise Scheduler Oracle ADF producer application.
Note:
When prompted, enter the Oracle WebLogic Server password.
Registering Oracle Enterprise Scheduler topology objects involves the following main steps:
Creating Oracle Enterprise Scheduler topology objects
Registering Oracle Enterprise Scheduler topology objects
Note:
Register the topology objects only when using an Ant script-generated Oracle ADF producer web application. Alternatively, you can use an existing registered web or Oracle Enterprise Scheduler Oracle ADF producer application and skip this section.
Use the Setup and Maintenance work area to create Oracle Enterprise Scheduler topology objects, including the Oracle Enterprise Scheduler domain, host application, and Oracle Enterprise Scheduler Oracle ADF producer application.
To create Oracle Enterprise Scheduler topology objects:
Create the Oracle Enterprise Scheduler domain topology object.
In the global area of Oracle Fusion Applications, click your name and select Setup and Maintenance.
From the Tasks Pane, select Topology Objects and then select Manage Domains.
On the Manage Domains page in the list of domains, click the Actions dropdown list and select Create.
In the Create Domain window that is displayed, enter a name for the domain and click Save and Close.
Create the Oracle Enterprise Scheduler host application topology object:
In the global area of Oracle Fusion Applications, click your name and select Setup and Maintenance.
From the Tasks Pane, select Topology Objects and then select Manage Enterprise Applications.
On the Manage Enterprise Applications page in the list of domains, click the Actions dropdown list and select Create.
In the Create Enterprise Application page, enter the details in the following table.
Table 6-6 Enterprise Application Topology Object Details
Field | Description |
---|---|
Name |
Enter the name of the enterprise application that you want to register, for example EarCustomHostEss. |
Code |
Enter a unique code to identify the enterprise application. After you have created it, the code cannot be changed. |
Domain |
Select the name of the domain to be used by the enterprise application, for example EssDomain. |
Default URL |
Enter a static URL if the enterprise application is always to be deployed at the same location. Optional. |
Source File |
Enter the name of the EAR file. Optional. |
Pillar |
From the Available Pillars list, shuttle the relevant pillar or pillars to the Selected Pillars list. |
Click Save and Close to create the Oracle Enterprise Scheduler host application topology object.
Repeat Step 2 to create the Oracle Enterprise Scheduler Oracle ADF producer application topology object.
Use the Setup and Maintenance work area to register the Oracle Enterprise Scheduler topology objects you created.
To register Oracle Enterprise Scheduler topology objects:
Register the Oracle Enterprise Scheduler domain.
In the global area of Oracle Fusion Applications, click your name and select Setup and Maintenance.
From the Tasks Pane, select Topology Registrations and then select Register Domains.
On the Register Domains page in the list of domains, click the Actions dropdown list and select Create.
In the Add Domain window that is displayed, enter the details for the Oracle Enterprise Scheduler domain created in Creating Topology Objects as described in the following table.
Table 6-7 Domain Registration Values
Field | Description |
---|---|
Enterprise Environment |
From the dropdown list, select the enterprise environment to be used, for example |
Domain |
From the dropdown list, select the name of the domain. |
Name/Administrator Server Name |
Enter a name for the registered domain. Enter a name for the domain's administration server. |
Internal/External/Administrator Server Host/Port/Protocol |
Enter the URL, port number, and protocol (such as HTTP, HTTPS, and so on) for the internal server to be registered, as well as the external server and the administration server. |
Enterprise Manager Protocol |
From the dropdown list, select the protocol to be used for accessing Oracle Enterprise Manager, for example HTTP or HTTPS. |
Enterprise Manager Port |
Enter the port number to be used when accessing Oracle Enterprise Manager in the domain. |
Java Management Extensions Port |
Enter the port number to be used for Java management extensions. |
Click Save and Close to save your changes.
Register the Oracle Enterprise Scheduler web producer module.
In the global area of Oracle Fusion Applications, click your name and select Setup and Maintenance.
From the Tasks Pane, select Topology Objects and then select Manage Modules.
On the Manage Modules page from the list of applications, click the Actions dropdown list and select Register Modules.
In the Register Modules window that is displayed, enter the details as shown in the following table.
Table 6-8 Domain Registration Values
Field | Description |
---|---|
Name |
Enter the name of the module that you want to register. |
Code |
Enter a unique code to identify the module. After you have created it, the code cannot be changed. |
Description |
Enter a brief, meaningful description of the module. Optional. |
Enterprise Application |
Select and associate the enterprise application to which the module belongs. |
Type |
Select the relevant module type from the list. |
Context Root |
Enter the context root of the module. |
Click Save and Close to save your changes.
Register the Oracle Enterprise Scheduler host and producer applications.
In the global area of Oracle Fusion Applications, click your name and select Setup and Maintenance.
From the Tasks Pane, select Topology Registrations and then select Register Enterprise Applications.
On the Register Enterprise Applications page from the list of applications, click the Actions dropdown list and select Add.
In the Add Enterprise Application window that is displayed, enter the details in the following table.
Table 6-9 Domain Registration Values
Field | Description |
---|---|
Enterprise Environment |
From the dropdown list, select the enterprise environment to be used, for example |
Enterprise Application |
Select and associate the enterprise application to which the module belongs. |
Name |
Enter the name of the enterprise application. |
External Server Protocol/Host/Port |
Enter the URL, port number, and protocol (such as HTTP, HTTPS, and so on) for the external server to be registered with the enterprise application. |
Click Save and Close to save your changes.
In the Register Enterprise Applications page, click the Actions dropdown list and select Add to display the Add Enterprise Application window.
Click the Enterprise Application dropdown list to display the Search and Select: Enterprise Application window.
In the Name field, enter a name for the application you want to search for and click the Domain dropdown list to select the domain in which you want to search.
Click Search to search for the Oracle Enterprise Scheduler producer web application.
From the list of enterprise applications that is displayed, select the relevant Oracle Enterprise Scheduler producer web application and click OK, as shown in the following figure.
Figure 6-3 Select the Relevant Enterprise Application
In the Add Enterprise Application page, fill in the details for the Oracle Enterprise Scheduler producer web application as described in the following table.
Click Save and Close.
You can use Oracle Authorization Policy Manager to manage application roles and resource-based policies. Identifying the application roles and users, and granting them the required privileges to execute Oracle Enterprise Scheduler job-related tasks is a one-time operation.
Granting Oracle Enterprise Scheduler metadata permission to the new job involves the following main steps:
Creating a new resource for the custom job definition
Creating a new policy
In Oracle Authorization Policy Manager, create an application resource instance.
To create a resource:
Run Oracle Authorization Policy Manager by entering the following URL in a browser.
http://<fs-domain_url>/apm/
From the navigator pane, right-click the application Resources icon button and select New.
An untitled page is displayed.
Define a resource with the resource type ESSMetadataResourceType, as well as the name and display name of the Oracle Enterprise Scheduler component using the following syntax: oracle.apps.ess.
applicationName
.
JobDefinitionName
.
JobName
.
Save the resource.
Define a policy that specifies the privileges allocated to a particular user when submitting the job request.
To define a policy:
In Oracle Authorization Policy Manager in the Home tab, under the Applications region, select an application for which you want to manage the policy, for example, MyAppEss.
Click Search Policies to display the Search Authorization Policies tab.
In the Search Authorization Policies tab, select the principal user on which to base the policy being created, for example, FinUser1.
In the Functional Security tab, select Resource Based Policies.
Click New Policy to create a new policy for the selected user.
Add resource instances to the policy by clicking Add in the Resources table.
Select the resource instance created for the custom Oracle Enterprise Scheduler job definition (from Creating a Resource).
Specify the actions EXECUTE
and READ
to provision Oracle Enterprise Scheduler job execution privileges to the user.
Click Save.
Submit a job request to ensure that everything works as it should.
To submit a test job request:
Log in to Functional Setup Manager with the user for whom you defined an authorization policy, for example, as FinUser1.
The URL for Functional Setup Manager is as follows:
https://<HOST>/setup/faces/TaskListManagerTop
From the Tools menu, select Schedule Processes.
Click Schedule New Process and select a job process name when prompted. Select the job definition you created.
Click OK.
The Oracle Enterprise Scheduler Schedule Request Submission window is displayed.
In the Parameters region, specify the job parameters as required.
Click Submit to schedule the job execution, and Close to exit the window.
Refresh the Search Results table to monitor the status of the submitted job.
You can customize Oracle Enterprise Scheduler jobs that are associated with Oracle Fusion applications. Customizing existing Oracle Enterprise Scheduler jobs involves editing job properties using Oracle Enterprise Manager Fusion Applications Control.
An example of a customization is to set the timeout value for a scheduled job to be run asynchronously. When the job takes longer than the timeout, you can find the job that timed out in Fusion Applications Control and manually complete the job.
The job properties that can be edited are shown in the following table.
For more information about editing scheduled job properties, see the "Managing Oracle Enterprise Scheduler Service and Jobs" chapter in the Administrator's Guide.
Table 6-10 Job Properties
API | Description |
---|---|
|
This property specifies the request processing priority, from 0 to 9, where 0 is the lowest priority and 9 is the highest. If this property is not specified, the system default value used is |
|
This property defines the numerical value that specifies the retry limit for a failed job request. If job execution fails, the request retries up to the number of times specified by this property until the job succeeds. If the retry limit is zero, a failed request will not be retried. If this property is not specified, the system default used is |
|
This property specifies an application-specific label for a request. The label, defined by an application or system administrator, allows administrators to group job requests according to their own specific needs. |
|
This property specifies the time in minutes that the job request processor waits for an asynchronous request after it has begun execution. After the time elapses, the job request times out. |
|
The property specifies a numerical value that indicates the level of tracing control for the job. Possible values are as follows:
|
|
This property enables or disables the accumulation of time statistics. |