Example for UpdateRecordState Activity

<Activity Name="UpdateRecordState">
  <Start/>
  <Description lang="en">Set status as approved.</Description>
  <Action>UpdateRecordState</Action>
  <Parameter direction="in" name="Status" type="string"   eval="constant">CONFIRMED</Parameter>
  <Parameter direction="in" name="InDocument" type="document"   eval="variable">inDoc</Parameter>
  <Parameter direction="in" name="RecordPerAsyncCall" type="long"   eval="constant">10</Parameter>
  <Parameter direction="in" name="AsynProcessIndicator" type="boolean"   eval="constant">true</Parameter>
</Activity>

For all records which are already confirmed or Rejected, any change requested is ignored. Status change request to UNCONFIRMED is ignored for records which are not DRAFT.

If record List is specified, and it is not null, records are selected using record list. From the record list, only those records which have product logs are selected for status update. If record list is not specified or is null, all records associated with event (based on product logs) is selected for status update. Note that only product logs with operations IMPORT, CREATE PRODUCT, EDIT PRODUCT, DELETE PRODUCT, MASSUPDATE are considered.

If new status requested is REJECTED, all unconfirmed versions associated with the event are rejected.

If new status requested is CONFIRMED or UNCONFIRMED, only the last version associated with the event is updated.

If the new status requested is REJECTED or CONFIRMED, record count for the catalog is updated as well.

Record status is not updated to CONFIRMED or UNCONFIRMED if the record version being updated will generate a conflict and OverrideConflict flag is false.

CommandStatus indicates if there was any conflict, override of data, merge done for any one record. Conflict take precedence over override and override takes precedence over merge.

If a conflict is detected, the record status update for ALL records is ignored.