Sei sulla pagina 1di 2

2/9/2011

My Oracle Support | Knowledge Brows

How To Implement A GO - NO GO Flag In ODI To Avoid Launching Multiple Parallel Executions Of The Same Scenario? [ID 1138473.1] Modified 08-FEB-2011 Type HOWTO Status PUBLISHED

In this Document Goal Solution Implement a GO - NO GO flag using a flat file and the OdiFileWait tool Implement the GO - NO GO flag using an ODI Variable References

Applies to:
Oracle Data Integrator - Version: 10.1.3.5.6 and later [Release: and later ] Information in this document applies to any platform.

Goal
An Oracle Data Integrator (ODI) Scenario is required to be launched frequently. However, technical constraints require that there must be no overlap of execution and that an instance of the Scenario execution must determine if another instance is still running or not. If so, it must exit immediately. If not, continue processing. How to set up such an approach ?

Solution
To do this, a GO - NO GO flag can be implemented using either: an ODI Variable, or a file and the ODI OdiFileWait tool as described below.

Implement a GO - NO GO flag using a flat file and the OdiFileWait tool


1. Create an "GO.txt" file, and locate into the desired <MyGoNoGo> Directory. 2. In ODI Designer, identify the Package that has been used to build the Scenario above. 3. Edit the Package, and, at the very beginning, add a step that sets the flag to NOGO, by implementing the following ODI tool:
OdiFileWait "-ACTION=MOVE" "-DIR=<MyGoNoGo>" "-PATTERN=GO.txt" "-TOFILE=NOGO.txt"

4. At the end of the same Package, add a step that resets the flag to GO, by implementing the following ODI tool:
OdiFileMove "-FILE=<MyGoNoGo>/NOGO.txt" "-TODIR=<MyGoNoGo>" "-TOFILE=GO.txt"

5. Regenerate the underlying Scenario. 6. If for any reason:: the ODI Agent executing the Scenario crashes and needs to be restarted, or the execution of one step in the Scenario fails, in order to correctly run the Scenario, you must: Rename the "NOGO.txt" file to "GO.txt" Restart the Agent, or run the Scenario again, depending on what the failure was.

Implement the GO - NO GO flag using an ODI Variable


1. In ODI Designer, create a GO_NOGO alpha-numeric, global Variable, of last value type, and set its default value to 1 (for GO scope). 2. Identify the Package that has been used to build the Scenario above. 3. Edit the Package, and, as the first step, add a "Evaluate Variable" type step to determine if the Variable equals 1 (GO). If YES, then: Reset the Variable value to 0 (NO GO), through a "Set Variable" step

support.oracle.com/CSP/ui/flash.html

1/2

2/9/2011

My Oracle Support | Knowledge Brows


Continue running the Package steps At the end of the same Package, after all the required operations are executed, add a step of "Set Variable" type, and set the Variable value to 1 (for GO) If NO, then move to the end of Scenario, to stop the execution.

4. Regenerate the underlying Scenario. 5. If for any reason: the ODI Agent executing the Scenario crashes and needs to be restarted, or the execution of one step in the Scenario fails in order to correctly run the Scenario, you must: Reset the Variable value to 1 (for GO scope) Restart the Agent, or run the Scenario again, depending on what the failure was.

References
NOTE:423855.1 - Interleaving Of Scheduled ODI Scenarios May Result In Problems NOTE:423999.1 - How To Set Up Simultaneous Launching Of Multiple Parallel ODI Integration Interfaces That Feed The Same Target Datastore.

Related Products Middleware > Business Intelligence > Oracle Data Integrator (ODI) > Oracle Data Integrator Keywords ODIFILEWAIT; SCENARIO; ODI VARIABLE; ODI; ORACLE DATA INTEGRATOR

Back to top

support.oracle.com/CSP/ui/flash.html

2/2

Potrebbero piacerti anche