How the Set operation works when modifying entries


External applications can use a Set operation to modify an existing entry in AR System server. Unlike the Create operation, Set needs a qualification to identify the entry to modify. You must specify this qualification in Developer Studio at design time. You cannot use an attachment field as a field reference in a qualification.

The qualification might be:

  • Completely static—Incoming requests always operate on the first entry, for example, 'RequestID' = "000000000000001".
  • Semi-dynamic—Qualification looks like a static qualification except that its values can be XPATH expressions, for example, 'RequestID' = XPATH("/ROOT/RequestID").
  • Completely dynamic—Qualification is a single XPATH expression, for example, XPATH("/ROOT/QueryString").

For information about XPATH expressions, see Using-the-XPATH-function-for-web-service-qualifications.

When AR System receives an incoming Set request, it performs the following actions:

  • Determines whether the qualification is dynamic; if so, it expands the XPATH expressions with data from the incoming XML to make the qualification static.
  • Searches the base form for an entry matching the qualification.
  • Parses the incoming XML code based on the input mapping, generates field values, and modifies the matched entry. The entry modification triggers the OnModify filters.
  • After the modify action is successfully completed, obtains field values from the recently modified entry. The action of obtaining the field values triggers the OnGetEntry filters.
  • Uses the output mapping to generate XML code from these field values, and sends the XML document back as a response.

Similar to the Create operation, AR Systemreturns the same entry as the one submitted because the output mapping might be different from the input mapping. The input mapping has the incoming data, but the output mapping has computed data, for example, fields that are set by filters.

The Set operation is similar to modifying an entry in a browser and then clicking Refresh to get back the same entry. All the rules for modify also apply—required values cannot be nulled out, and system fields cannot be changed.

The Set operation can modify only one entry in the base form. You can add it to a web service multiple times, each time specifying a unique name for the operation and a set of input and output mappings. For more information, see The-Set-operation-type-for-complex-documents.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*