Archiving the review document into Contentspace after a review completes

Documents are saved in the review zone located in Content Services. You can further use functions from Content Services to archive the reviewed document after a review completes.

You can create a process as follows and configure it as a postreview process in the last stage of your review. (See Integrating custom processes before and after a review stage completes .)

  1. In Workbench, create an application. For example, RCACustomApplication.

  2. Create a process. For example, ArchiveReviewDocument.

  3. Create the variables in the following table:

    Name

    Type

    Input/Output

    reviewId

    string

    Input

    reviewStatus

    string

    Input

    revision

    integer

    Input

    reviewDoc

    document

    docName

    string

    Set the default value to ReviewDocument.pdf)

    docArchiveLocation

    string

    ArchivePath

    string (Set the default value to /Company Home/MRA-Archive

  4. In the process editor, drag Event Picker Activity toolbar to the process diagram.

  5. Search for ReviewCompleteEvent, select it, and then click OK.

  6. Select Start Point from Select Event Behavior dialog box.

  7. Open Event Properties.

  8. Click on Callback - Process Data Map, and define following mapping.

    • /process_data/@reviewId to /ReviewCompleteEventData/reviewed.

    • /process_data/@revision to /ReviewCompleteEventData/revision.

    • /process_data/@reviewStatus to /ReviewCompleteEventData/status.

  9. Add a Set Value operation named Get Archive Location and Doc name and add the following data mappings:

    Location

    Expression

    /process_data/@docArchiveLocation

    concat(/process_data/@ArchivePath, "/", /process_data/@reviewStatus, "/", /process_data/@reviewId)

    /process_data/@docName

    concat("ReviewDocument_", string(/process_data/@revision), ".pdf")

  10. Add a CreateSpace operation (Document Management service) to the process map.

  11. For the SpacePath property, select the docArchiveLocation variable.

  12. Add a Get Original Document operation from the Review Commenting& Approval Core service. Perform the following configuration:

    • In the ReviewId property, select reviewId from the variable list.

    • In the Revision property, select revision from the variable list.

    • In the Document property, select reviewDoc from the variable list.

  13. Add a Store Content operation (DocumentManagementService service) and configure the following properties in the Process Properties view:

    • For the SpacePath property, select docArchiveLocation from the variable list

    • For the NodeName property, select docName from the variable list.

    • For the NodeType property, select literal from the list.

    • For the NodeContent property, select reviewDoc from the variable list.

    • In the Node Encoding property, type UTF-8 .

  14. Save and deploy the application.

// Ethnio survey code removed