I'm developing a manual reconciliation and I'd like to know how I can
call an AL from another AL. The first AL executed is in Interator
Mode, reading data from CSV file. This AL has a LDAP connector as
Lookup mode an another LDAP connector as Update mode. In the lookup
connector, I need to call another AL in the same TDI config file in
case of "On no match" Hook. How can I do that?
I read a post here from Eddie Hartman talking about that command:
var al = main.startAL("AL name");
al.join();
Is just that command or I need more than that?
Thank You,
Rodrigo
// start a new AL
al = main.startAL("MyAL");
// wait for it to complete
al.join();
// get Work Entry as it was at end of called AL run
resWork = al.getResult();
// get stats object (numGet(), numAdd(), numLookup(), ...)
resStats = al.getStats();
// get exception from called AL (== null if no error)
resError = stats.getError();
-Eddie
Thanks again. But while I was waiting for an answer, another question
came to my mind.
Imagine that a I have an AL with a lot of component in his Flow. I'l
like to know if I can call
one of these components from a Hook. For example, In a "On no match"
hook from a LDAP connector,
I want call directly another component.
Thanks,
Rodrigo
MyJDBCConnector.add(work);
or if the Connector's name in the AL contains spaces
or is otherwise non-conformant with variable naming, you
can as the AL for it:
myConn = task.getConnector("My JDBC Connector");
myConn.add(work);
The AssemblyLineComponent and AssemblyLineConnector
classes in the JavaDocs will show you how to invoke the
various operations.
-Eddie
The system.SkiptTo() works fine into my AL.
But in some of my connectors I need to stop the current processing.
So, I used the system.exitFlow(), just to drop the current entry and
get the next one.
But I'm getting the error:
CTGDIS077I Failed with error: Flow.
CTGDIS281E Error caused by: com.ibm.jscript.InterpretException: Script
interpreter error, line=1, col=8
Error calling method 'exitFlow()' on java class
'com.ibm.di.function.UserFunctions'.
Do you know something about that?
Thanks again,
Rodrigo