Bulk Update Items operation
The Bulk Update Items operation updates a field in the BMC Remedy Action Request (AR) System data store with a new value for each item in the XML document. This operation updates the items in a transaction-based manner. Even if one field in the <items>
XML contains an incorrect/invalid value, the entire operation fails.
The following table describes the input elements for the Bulk Update Items operation.
Input elements for the Bulk Update Items operation
Input element | Description | Required |
---|---|---|
| Specifies the name of the adapter in the adapter configuration that is used to execute the operation | No |
| Specifies the XML document containing the elements required to update a record for the specified fields in the BMC Remedy AR System schema Note You must specify values for each field required by BMC Remedy AR System to update a complete record. | Yes |
Note
Before running the operation, ensure that you specify the value of the Action field in the Call Adapter Activity to bulk-update.
The following figure shows a sample adapter request for the Bulk Update Items operation.
Sample adapter request XML for the Bulk Update Items operation
<adapter-request>
<request-action>bulk-update</request-action>
<request-data>
<remedy-action>
<items>
<item>
<schema>CHG:ChangeInterface_Create</schema>
<updated-field>Description</updated-field>
<updated-field-value>Updated through Bulk update operation</updated-field-value>
<entry-id>000000000001958</entry-id>
</item>
<item>
<schema>CHG:ChangeInterface_Create</schema>
<updated-field>Description</updated-field>
<updated-field-value>Updated through Bulk update operation</updated-field-value>
<entry-id>000000000001959</entry-id>
</item>
<item>
<schema>CHG:ChangeInterface_Create</schema>
<updated-field>Description</updated-field>
<updated-field-value>Updated through Bulk update operation</updated-field-value>
<entry-id>000000000001960</entry-id>
</item>
<item>
<schema>CHG:ChangeInterface_Create</schema>
<updated-field>Description</updated-field>
<!-- here this field contains invalid data -->
<updated-field-value>Updated through Bulk update operation</updated-field-value>
<entry-id>000000000001961</entry-id>
</item>
<item>
<schema>CHG:ChangeInterface_Create</schema>
<updated-field>Description</updated-field>
<updated-field-value>Updated through Bulk update operation</updated-field-value>
<entry-id>000000000001962</entry-id>
</item>
<item>
<schema>CHG:ChangeInterface_Create</schema>
<updated-field>Description</updated-field>
<updated-field-value>Updated through Bulk update operation</updated-field-value>
<entry-id>000000000001963</entry-id>
</item>
<item>
<schema>CHG:ChangeInterface_Create</schema>
<updated-field>Description</updated-field>
<updated-field-value>Updated through Bulk update operation</updated-field-value>
<entry-id>000000000001964</entry-id>
</item>
<item>
<schema>CHG:ChangeInterface_Create</schema>
<updated-field>Description</updated-field>
<updated-field-value>Updated through Bulk update operation</updated-field-value>
<entry-id>000000000001965</entry-id>
</item>
</items>
</remedy-action>
</request-data>
</adapter-request>
The following figure shows the adapter response for the Bulk Update Items operation.
Adapter response XML for the Bulk Update Items operation
<adapter-response>
<execution-duration>10450</execution-duration>
<status>success</status>
<messageBase64 />
<data>
<bulk-update-action-result>
<metadata>
<requested-entry-count>8</requested-entry-count>
<updated-entry-count>8</updated-entry-count>
<status>success</status>
</metadata>
</bulk-update-action-result>
</data>
</adapter-response>
The following table describes the output element for the Bulk Update Items operation.
Output element for the Bulk Update Items operation
Output | Description |
---|---|
| Specifies the XML document returned by the adapter request executed on BMC Remedy AR System |
<bulk-insert-action-result> | Contains the metadata and XML response entries |
<requested-entry-count> | Contains the number of entries passed in the items XML Example: 5 |
<created-entry-count> | Contains the number of entries created successfully in BMC Remedy AR System Example: 5 |
<status> | Contains the status of the request. If the status is If failed, the status appears as |
<status-reason> | Contains the error message and the reason for the request failure as returned by the BMC Remedy AR System server API. |
<failed-item-index> | In case of a failed status, this element value will be the item (in items request XML) index position due to which the bulk operation is aborted/failed. |
<entry-id> | Contains the ID for the entry with incorrect or invalid data, which caused the complete request to fail. |
<schema> | Contains the schema for the entry that is not updated due to the adapter request failure. |
The following figure shows the adapter response XML if the request fails.
Adapter response XML if the request fails
<adapter-response>
<execution-duration>13564</execution-duration>
<status>success</status>
<messageBase64></messageBase64>
<data>
<bulk-update-action-result>
<metadata>
<requested-entry-count>8</requested-entry-count>
<updated-entry-count>0</updated-entry-count>
<status>error</status>
<status-reason>ERROR (306): Value does not fall within the limits
specified for the field; (Pattern - $MENU$) : 1000000082</status-reason>
<failed-item-entry>
<entry-id>000000000001961</entry-id> <!-- you can see the invalid
input item XML in request that has the same entry ID provided here -->
<schema>CHG:ChangeInterface_Create</schema>
</failed-item-entry>
</metadata>
</bulk-update-action-result>
</data>
</adapter-response>
Comments
Log in or register to comment.