This is an alternative way of passing parameters using a TCB and is supported for compatibility with earlier versions.
When an AssemblyLine is started with the system.startAL() call from a script, the AssemblyLine can still be passed parameters by setting attribute or property values in the Initial Work entry, which is accessed through the work variable. It is then your job to apply these values to set Connector parameters; for example, in the AssemblyLine Prolog – Init Hook using the connectorName.setParam() function.
You must clear the Work entry with the task.setWork(null) call, otherwise Iterators in the AssemblyLine pass through on the first cycle.
We can examine the result of the AssemblyLine, which is the Work Entry when the AssemblyLine stops, by using the getResult() function. See also "Runtime provided Connector" in IBM Tivoli Directory Integrator V7.1 Reference Guide.
Below is an example of passing in a Connector parameter value with an IWE:
var entry = system.newEntry(); entry.setAttribute ("userNameForLookup", "John Doe"); // Here we start the AssemblyLine var al = main.startAL ( "EmailLookupAL", entry ); // wait for al to finish al.join(); var result = al.getResult(); // assume al sets the mail attribute in its working entry task.logmsg ("Returned email = " + result.getString("mail"));
Parent topic: Iterator mode