Using the Delete mode
The most common and simple pattern for using a Connector in Delete mode is:
-
Using the Config Editor, add a Connector in Delete mode to your workspace. See Creating a Connector.
-
Set the mode (Delete) 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 [Input Attribute mapping](inputattributemapping.html#inputattributemapping "Input Attribute mapping is the process that accomplishes the moving of data from the input source to the Work entry in the AssemblyLine. Input Attribute maps are shown in the Attribute Maps window of the Connector, with an arrow pointing to the Connector from an entity referred to as "[Source]". They are also shown in the Schema window, under Input Attribute map.").
-
In the Input Attribute Map tab you can select attributes from the Connector Attribute list and then drag them into your Input Map. You can also add and remove attributes manually. Note: The Input Map is used in Delete mode for reading the matching entry found in the data source into the conn entry object, which can then be used in your scripts (for example, to determine if the entry actually is to be deleted).
-
Open the Link Criteria tab on the Connector configuration window and set up the rules for attribute matching. The outcome of this process will determine which entries are retrieved from the connected system, and 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");
See Link Criteria for more information about Link Criteria.
-
If you did not create the Connector directly inside an AssemblyLine, then to use the Connector in an AssemblyLine, drag it from its location in <workspace>/Resources/Connectors to the Flow section of the AssemblyLine.