Creating User Functions Working with User Functions

13 Working with Scenarios 13-1 13 Working with Scenarios This chapter describes how to work with scenarios. A scenario is designed to put a source component interface, package, procedure, variable into production. A scenario results from the generation of code SQL, shell, etc for this component. This chapter includes the following sections: ■ Section 13.1, Introduction to Scenarios ■ Section 13.2, Generating a Scenario ■ Section 13.3, Regenerating a Scenario ■ Section 13.4, Generating a Group of Scenarios ■ Section 13.5, Exporting Scenarios ■ Section 13.6, Importing Scenarios in Production ■ Section 13.7, Encrypting and Decrypting a Scenario

13.1 Introduction to Scenarios

When a component is finished and tested, you can generate the scenario corresponding its actual state. This operation takes place in Designer Navigator. The scenario code the language generated is frozen, and all subsequent modifications of the components which contributed to creating it will not change it in any way. It is possible to generate scenarios for packages, procedures, interfaces or variables. Scenarios generated for procedures, interfaces or variables are single step scenarios that execute the procedure, interface or refresh the variable. Scenario variables are variables used in the scenario that should be set when starting the scenario to parameterize its behavior. Once generated, the scenario is stored inside the work repository. The scenario can be exported then imported to another repository remote or not and used in different contexts. A scenario can only be created from a development work repository, but can be imported into both development and execution work repositories. Scenarios appear in a development environment under the source component in the Projects tree of Designer Navigator, and appear - for development and production environments - in the Scenarios tree of Operator Navigator. Scenarios can also be versioned. See Chapter 18, Working with Version Management for more information. Scenarios can be launched from a command line, from the Oracle Data Integrator Studio and can be scheduled using the built-in scheduler of the run-time agent or an 13-2 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator external scheduler. Scenario execution and scheduling scenarios is covered in Chapter 20, Running Integration Processes .

13.2 Generating a Scenario

Generating a scenario for an object compiles the code for this object for deployment and execution in a production environment. To generate a scenario: 1. In Designer Navigator double-click the Package, Interface, Procedure or Variable under the project for which you want to generate the scenario. The corresponding Object Editor opens.

2. On the Scenarios tab, click Generate Scenario. The New Scenario dialog appears.

3. Enter the Name and the Version of the scenario. As this name can be used in an

operating system command, the name is automatically uppercased and special characters are replaced by underscores. Note that the Name and Version fields of the Scenario are preset with the following values: – Name : The same name as the latest scenario generated for the component – Version : The version number is automatically incremented if the latest version is an integer or set to the current date if the latest version is not an integer If no scenario has been created yet for the component, a first version of the scenario is automatically created. New scenarios are named after the component according to the Scenario Naming Convention user parameter. See Appendix B, User Parameters for more information.

4. Click OK.

5. If you use variables in the scenario, you can define in the Scenario Variables dialog the variables that will be considered as parameters for the scenario. Select Use All if you want all variables to be parameters, or Use Selected and check the parameter variables.

6. Click OK.

The scenario appears on the Scenarios tab and under the Scenarios node of the source object under the project.

13.3 Regenerating a Scenario

An existing scenario can be regenerated with the same name and version number. This lets you replace the existing scenario by a scenario generated from the source object contents. Schedules attached to this scenario are preserved. To regenerate a scenario: 1. Select the scenario in the Projects accordion. 2. Right-click and select Regenerate...

3. Click OK.