Using the Update mode
The most common and simple pattern for using a Connector in Update mode is:
-
Using the Config Editor, add a Connector in Update mode to your workspace. See Creating a Connector.
-
Set the mode (Update) and other connection parameters for this Connector in the Connection tab; required parameters are marked with an asterisk (*). Some Connectors require you to configure a Parser as well in the Parser tab.
-
Set up the Attribute Map; see [Output Attribute mapping](outputattributemapping.html#outputattributemapping "Output Attribute mapping is the process that accomplishes the moving of data from the Work entry in the AssemblyLine to the output destination in the connected system. Output Attribute maps are shown in the Attribute Maps window of the Connector, when brought up in the Connector Editor, with an arrow pointing from the Connector to an entity referred to as "[Target]". They are also shown in the Schema window, under Output Attribute map.").
-
Open the Link Criteria tab on the Connector configuration window and set up the rules for attribute matching. Here you have a couple of choices:
-
Click Add to add a new Link Criterion and select an attribute from the connected system, the matching operator (for example, Equals, Begins With, and so forth) and then the Work entry attribute to be matched. When the Connector performs the Lookup, it creates the underlying API or protocol syntax based on the Link Criteria you have specified, keeping your solution independent of the type of system used. You can add multiple Link Criteria, which are connected by the Boolean operator AND, together to build the search call.
-
You can also select Build criteria with custom script, which opens a script editor window where you can create your own search string, passing this back to the Connector using the ret.filter object. For example:
ret.filter = "uid=" + work.getString("uid");
Note that Expressions can also be used to dynamically specify the Attribute or Value to use for any Link Criteria. See Expressions for information. Also see Link Criteria for more details about Link Criteria.
-
Entries with the Attributes you have selected to map on input are added in the data source during the AssemblyLine's execution.
To use the Connector in an AssemblyLine, drag it from its location in <workspace>/Resources/Connectors to the Flow section of an AssemblyLine. You can now map Work entry attributes to the output by dragging attributes that were mapped in previously, onto the Update Connector in the Attribute Maps window of the AssemblyLine.
You can also create entirely new Attributes by right-clicking on the Connector in this window, and selecting Add attribute map item.
Note: In Update mode, multiple entries can be updated. See "AssemblyLine and Connector mode flowcharts" in Reference.