mai_sicuel
mai_sicuel

Reputation: 13

How to run a simulation in Oracle ODI using Java APIs?

I want to interacti with Oracle Data Integrator 11g using the provided Java SDK. I am able to connect to the ODI instance, but I do not know how to run a simulation from a selected intefrace. Here is the code written so far:

        <performing connection>

        // Allocate an odisinstance of the name
        final OdiInstance odiInstance = odiInstanceHandle.getOdiInstance();
        try {
            TransactionTemplate tx = new TransactionTemplate(odiInstance.getTransactionManager());
            tx.execute(new TransactionCallbackWithoutResult() {
                protected void doInTransactionWithoutResult(ITransactionStatus pStatus) {
                    // Retrieve the interface you want to simulate
                    IOdiInterfaceFinder ifaceFinder = (IOdiInterfaceFinder) odiInstance.getTransactionalEntityManager().getFinder(OdiInterface.class); 
                    OdiInterface iface = ifaceFinder.findByQualifiedName("your_interface_name");

I want to execute a simulation and capture the logs form the selected interface. It is that possible via the Java APIs?

I tried to create a Scenario and looked around the internet. I only found guides for ODI 12

Upvotes: 1

Views: 128

Answers (1)

JeromeFr
JeromeFr

Reputation: 1928

Unfortunately there is no SDK method equivalent to the Simulation checkbox available through ODI Studio.

The only way to capture the logs programatically is to effectively run the interfaces / scenarios.

Generating a scenario can be done using the methods of IOdiScenarioGenerator interface :

IIOdiScenarioGenerator gene = new OdiScenarioGeneratorImpl((odiInstance);
OdiScenario newScen = gene.generateScenario(pPackage, "MYSCENARIO", "001");

Starting a scenario execution can be done with startScenario method of RuntimeAgent class.

Upvotes: 0

Related Questions