Organizing the Project with Folders

Working with Packages 10-3

10.1.2 Introduction to Creating Packages

Packages are created in the Package Diagram Editor. See Section 10.1.3, Introduction to the Package editor for more information. Creating a Package consists of the following main steps:

1. Creating a New Package. See

Section 10.2, Creating a new Package for more information. 2. Working with Steps in the Package add, duplicate, delete,.... See Section 10.3, Working with Steps for more information.

3. Defining Step Sequences. See

Section 10.4, Defining the Sequence of Steps for more information.

4. Running the Package. See

Section 10.5, Running the Package for more information.

10.1.3 Introduction to the Package editor

The Package editor provides a single environment for designing Packages. Figure 10–2 gives an overview of the Package editor. Figure 10–2 Package editor 10-4 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator

10.2 Creating a new Package

To create a new Package:

1. In the Project tree in Designer Navigator, click the Packages node in the folder

where you want to create the Package.

2. Right-click and select New Package.

3. Type in the Name of the Package.

4. Go to the Diagram tab.

5. Add steps as described in Section 10.3, Working with Steps

6. From the File menu, click Save.

10.3 Working with Steps

Packages are an organized sequence of steps. Designing a Package consists mainly in working with the steps of this Package.

10.3.1 Adding a Step

Adding a step depends on the nature of the steps being inserted. See Table 10–1 for more information on the different types of steps. The procedures for adding the different type of steps are given below.

10.3.1.1 Executing an Interface

To insert a Flow Interface step:

1. Open the Package editor and go to the Diagram tab.

2. Select the interface to add to the Package from the Designer Navigator Projects

tree.

3. Drag and drop the interface into the diagram. A flow Step appears.

Table 10–2 Package editor Sections Section Location in Figure Description Designer Navigator Left side The Designer Navigator displays the tree views for projects, models, solutions, and other global components. Package Diagram Middle You drag components such as interfaces, procedures, datastores, models, sub-models or variables from the Designer Navigator into the Package Diagram for creating steps for these components. You can also define sequence of steps and organize steps in this diagram. Package Toolbox Left side of the Package diagram The Toolbox shows the list of Oracle Data Integrator tools available and that can be added to a Package. These tools are grouped by type. Package Toolbar Top of the Package diagram The Package Toolbar provides tools for organizing and sequencing the steps in the Package. Properties Panel Under the Package diagram This panel displays the properties for the object that is selected in the Package Diagram. Working with Packages 10-5 4. Click the step icon in the diagram. The properties panel opens.

5. In the General tab, edit the Step Name field.

6. From the File menu, click Save.

10.3.1.2 Executing a Procedure

To insert a Procedure step:

1. Open the Package editor and go to the Diagram tab.

2. Select the procedure to add to the Package from the Designer Navigator Projects

tree.

3. Drag and drop the procedure into the diagram. A procedure step appears.

4. Click the step icon in the diagram. The properties panel opens.

5. In the General tab, edit the Step Name field.

6. In the Options tab, set the procedure options if needed.

7. From the File menu, click Save.

10.3.1.3 Variable Steps

There are different variable steps within Oracle Data Integrator: ■ Declare Variable : When a variable is used in a Package or in elements of the topology which are used in the Package, it is strongly recommended that you insert a Declare Variable step in the Package. This step explicitly declares the variable in the Package. ■ Refresh Variable : This step refreshes the variable by running the query specified in the variable definition. ■ Set Variable : There are two functions for this step: ■ Assign sets the current value of a variable. ■ Increment increases or decreases a numeric value by the specified amount. ■ Evaluate Variable : This step compares the value of the variable with a given value according to an operator. If the condition is met, then the evaluation step is true, otherwise it is false. This step allows for branching in Packages. Declaring a Variable To insert a Declare Variable step:

1. Open the Package editor and go to the Diagram tab.

2. In Designer Navigator, select the variable to add to the Package from the Projects

tree for a project variable or from the Others tree for a global variable. 3. Drag and drop the variable into the diagram. A variable step appears. 4. Click on the step icon in the diagram. The properties panel opens.

5. In the General tab, fill in the Step Name field. Select Declare Variable in the Step

Type.

6. From the File menu, click Save.

Refreshing a Variable To insert a Refresh Variable step: