Controlling the flow of an AssemblyLine
Hooks are programmable waypoints in the built-in automated behavior of IBM® Security Verify Directory Integrator, where you can impose your own logic.
Hooks are found in AssemblyLines, Connectors and Function Components. For example, if you want to skip or restart parts of the AssemblyLine entirely, you typically do this from within a Hook in a Connector:
Note: The constructs below can be used to exit a Branch Component or Loop, too.
system.ignoreEntry()
Ignore the current Connector and continue processing your existing data entry with the next Connector.
system.skipEntry()
Skip (drop) the entry completely, aborting the current cycle, return control to the start of the AssemblyLine and get the next entry from the current Iterator.
system.exitFlow()
Drop further processing of the current entry, execute end-of-cycle logic; for example, save the Iterator State Key (if the Connector is configured for this), return control to the start of the AssemblyLine and get the next
entry from the current Iterator.
system.restartEntry()
Restart from the beginning of the AssemblyLine, forcing the current Iterator to reuse the current entry.
system.skipTo(String name)
Skip to the named Connector.
system.abortAssemblyLine(String reason)
Abort the entire AssemblyLine with the specified error message.
Note: If you put any code in an Error Hook and do not terminate the current AssemblyLine or EventHandler, then processing continues regardless of how you got to the Error Hook. This means that even syntax errors in your script are ignored. So be sure to check the error object if you want to know what caused the error.
The methods described in the previous list can be regarded as goto-statements, in that no further code in this Hook is run. For example:
system.skipEntry(); // Causes the flow to change
// This next line is never executed.
task.logmsg("This will never be reached");
Note: There is a difference between an error Hook that is absent, and one that is empty – even though this may not always be easy to spot in the Configuration Editor. An empty error Hook causes the system to reset the error condition that caused the Hook to be called, after which the server continues processing, whereas an absent or undefined Hook causes the system to perform default error handling (typically aborting the AssemblyLine).