IBM FileNet P8, Version 5.2            

Retrieving the content of an attached document

This Content Extended Operations example illustrates using Process Designer to create a workflow to verify the content of a document.

The workflow makes use of operations to check out the latest attachment, find out how many documents of a particular content type are in the attachment, then get the content of one of those documents for verification purposes. When the document content has been verified, the checkout operation for the attachment is then cancelled.

The entire workflow example looks like this:

Workflow Map to Verify Document Content

This example uses the operation getContentWithIndex, which retrieves the document (within a set of documents) referenced by an index argument. The operation getContent is similar, but returns only the first document within the set of documents in the attachment.

  1. Assign a workflow participant.

    Add an activity step for the workflow participant or participants who will receive this work item.

  2. Check out the attachment:

    GetLatestAttachmentVersion, CheckoutAttachment, and VerifyCheckout Steps

    1. Retrieve the most recent version of the attachment assigned to the workflow.
      Note: For IBM® FileNet® P8 Content Platform Engine, this can be either a major or minor version.

      Add a component step to retrieve the attachment object for the latest attachment. Use the getLatestAttachmentVersion operation:

      getLatestAttachmentVersion Operation

    2. Verify the checkout of the attachment object.

      Add an activity step to the workflow queue. An associated workflow participant or automated process will subsequently verify the attachment object was checked out.

  3. Find out how many documents are in the attachment:

    GetContentCount and VerifyContentCount Steps

    1. Retrieve the count of documents associated with the attachment object.

      Add a component step that calls the getContentCount operation:

      getContentCount Operation

      Note: If the parameter is not specified, the check for content type is ignored. When contentType is specified, the operation returns the number of documents of the specified content type.
    2. Verify the document count retrieved.

      Add an activity step (work queue in our example) to the workflow. The workflow participant(s) can validate the success after each specific operation.

  4. Get the document content based on an index value:

    getContentWithIndex Operation

    1. Retrieve the content for a document.

      Add a component step that calls the getContentWithIndex operation:

      getContentWithIndex Operation

    2. Verify the document content retrieved.

      Add an activity step (work queue in our example) to the workflow. The workflow participant(s) can validate the success after each specific operation.

  5. Cancel the checkout for the attachment:

    cancelCheckout

    1. Cancel the checkout for the attachment object.

      Add a component step that calls the cancelCheckout operation:

      operationCancelCheckout

    2. Verify the checkout was cancelled.

      Add an activity step to the workflow queue. An associated workflow participant or automated process will subsequently verify the checkout was cancelled.



Feedback

Last updated: October 2013
bpfwd028.htm

© Copyright IBM Corporation 2014.
This information center is powered by Eclipse technology. (http://www.eclipse.org)