Good morning everyone,
I'm using ODI for the first time and I have some simple questions to ask.
I have written a Java program "P" to execute three operations: "X", "Y", "Z". The program returns a String with the result encoded in a JSON format (and never throws an exception).
Now I have the jar of P.
In ODI 12c Demo I have successfully created one procedure with 3 tasks (1st executes X, 2nd Y, 3rd Z). I run P each time with a Jython script that loads the jar and some options from ODI environment and passes them as arguments to the main method.
At the moment Y is executed even if X fails and Z is executed even if Y fails. What I need is to check the operation result: if the result of X equals a certain String then execute Y; if the result of Y equals a certain String then execute Z.
For this reason I've created 3 different procedures, each one with only one (jython) task (one executes X, one Y and one Z).
I have created a new Package and put in it the three procedures.
My problem is on how to connect the three procedures: I need to store the result of one operation and check it before executing the next step.
I have seen that there are "Evaluate Variables", but how can I store in a ODI Global Variable the value contained in a Jython variable (JSON string)?
It seems that ODI Options are read-only (). Any suggestion?
I can't use ODI OS calls. Jython is not strictly necessary.
Thanks for reading.
Gianvito