AssemblyLines are often called as compound functions from other AssemblyLines. Setting up a call to perform a specific task and mapping in and out parameters can be tedious in a scripting environment. To ease the integration of AssemblyLines into a work flow, the AssemblyLine Connector provides a standard and familiar way of doing this; it wraps much of the scripting involved to execute an AssemblyLine. The AssemblyLine connector uses the AssemblyLine manual cycle mode for inline execution; and internally it uses the AssemblyLine Function Component to do its work.
The AssemblyLine Connector supports Iterator mode only, except when calling another AssemblyLine which supports AssemblyLine Operations. See "AssemblyLine Operations" in IBM TDI V7.1 Users Guide and Appendix D. Creating new components using Adapters for more information.
The server-server capability made possible by using this Connector addresses security concerns when managers want TDI developers to access connected systems, but not to access the operational parameters of the Connector - or to impact its availability by deploying the new function on the same physical server.
The Connector needs the following parameters:
When the target AssemblyLine is created, all these attributes and values provided by you here are passed to the target AssemblyLine before any of the connectors are initialized. Access to these attribute/value pairs can be done through scripting as in: task.getOpEntry().getAttribute("<name from schema>") or by using the expression editor under the operations folder.
The AssemblyLine Connector iterates on the result set from the target AssemblyLine which is always run synchronously in manual cycle mode by the AssemblyLine Connector. The target AssemblyLine can be local to the thread or on a remote server by use of the Server API.
Note that most of the functionality is implemented in the AssemblyLine Function Component component, so the AssemblyLine Connector simply redirects the occurring errors.
The AssemblyLineConnector dynamically reports its available connector modes (for example, Iterator) based on the available operations in the target AssemblyLine. The target AssemblyLine can define any operation name which will appear in the connector's mode drop-down list. Any operation/mode that is not a standard mode name will implicitly use CallReply mode internally (that is, the UI changes to the CallReply equivalent layout and the queryReply method is invoked on the AssemblyLineConnector). To further aid in development of custom connectors, the AssemblyLine connector gives the operation names listed below special significance. The operation names are the same as the function names for the ScriptConnector and also the same names as the ConnectorInterface method names.
|Computed Mode||Required Operations|
These two are optional operations but will be invoked if present.
When one or more of these are present, the AssemblyLine Connector will compute supported modes based on the operations and the target AssemblyLine is said to be in adapter mode. The difference between normal mode and adapter mode is how the AssemblyLine connector calls the target AssemblyLine's operations.
As an example, if the target AssemblyLine implements findEntry as an operation, the UI will show Lookup as an available mode. When the AssemblyLine Connector is called by the AssemblyLine, it will forward the "native" methods (for example, findEntry) directly to the target AssemblyLine by invoking the findEntry operation. Another example is Delete where the AssemblyLine connector will invoke findEntry followed by deleteEntry to perform a delete operation. In normal mode (for example, the target AssemblyLine defines the DeleteUser operation), the AssemblyLine Connector would simply invoke the DeleteUser operation leaving the entire delete operation up to the target AssemblyLine. Although the target AssemblyLine can define standard modes as operations, this is not recommended as some operations will simply not function correctly because they require more than one operation to complete the mode operation (like delete and update that calls findEntry before deleting or updating).
When the AssemblyLine Connector invokes an operation in an adapter mode AssemblyLine it will pass the result from its output attribute map to the target AssemblyLine's work entry. In cases where a link criteria is required, the AssemblyLine Connector adds the com.ibm.di.server.SearchCriteria instance object to the op-entry of the target AssemblyLine as search. The target AssemblyLine can retrieve this object by calling task.getOpEntry()..getObject("search").
The result from the target AssemblyLine is always communicated back in the work entry. This entry becomes the conn entry of the AssemblyLine Connector which is then subjected to its input attribute map. One exception to this rule is when the resulting work entry contains an attribute named "conn". When this attribute is present, the AssemblyLine connector will disregard all attributes in the returned work entry and use the conn attribute as the result from the operation. The conn entry can contain any number of Entry objects. This is typically used when findEntry returns either null or more than one entry. If the conn attribute has no values it is the equivalent of returning null, which will cause the on-no-match hook to be called. When the conn attribute has more than one value, the AssemblyLine Connector will add all entries to its multiple-found array so that the AssemblyLine triggers the on multiple found hook and makes the duplicate entries available using the getFindEntryCount() and getNextFindEntry() methods. If the conn attribute contains objects that are not of type com.ibm.di.entry.Entry an error will be thrown.
If the AssemblyLine Connector's target AssemblyLine has no operations defined the AssemblyLine Connector will report Iterator as its only mode. The AssemblyLine connector will not invoke operations on the target AssemblyLine but simply invoke the executeCycle(work) of the target AssemblyLine to get the next input entry.
The schema for an AssemblyLine Connector can be retrieved after the Connector has been configured with the correct target AssemblyLine, and the mode to use has been chosen. In order to facilitate discovering the schema the following considerations apply:
If neither of the two preceding steps yield a match (for example, because you use an unknown operation) the schema is retrieved form an operation called "querySchema". This operation is never called; it is only used to define a schema that can be retrieved in the AssemblyLine Connector.
A value of "*" will map all attributes.
The target AssemblyLine can be passed a Task Control Block (TCB) as a parameter. This parameter is runtime generated and the AssemblyLine Connector will use this to pass parameters to the target AssemblyLine. This is an alternative to providing parameters through the target AL's "Published AssemblyLine Initialize Parameters" Operation, in conjunction with the AssemblyLine Parameters parameter.
Appendix D. Creating new components using Adapters.