IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Modeling processes > Integrating with Enterprise Content Management (ECM) systems > Outbound interactions with Enterprise Content Management systems

Work with document content

To work with the content of documents, you can use the ECMContentStream data type to wrap a content stream and return information about the stream. A content stream is a stream of data that contains the content of a document, such as a word processing document or an image.

The ECMContentStream data type is used in the following four Enterprise Content Management (ECM) operations:

Information about these operations is found in the topic Data mapping in Enterprise Content Management operations.

The properties for the ECMContentStream data type are described in the following table:

ECMContentStream properties
Property name Description
contentLength The length of the content stream in bytes. If it is set, it must be a positive number. If the length is unknown, it must not be set.
mimeType The MIME media type of the content stream. For the primary content of a document, the MIME media type should match the value of the property cmis:contentStreamMimeType.

For example, application/pdf.

fileName The file name of the content stream. For the primary content of a document, the file name should match the value of the property cmis:contentStreamFileName.
content The value of the document. It must be of type String Base64 and encoded in UTF-8.

The following example code fragments can be used in a script activity to get and set values:

// Script sample code to set and encode the document content tw.local.ContentStream.content =  new Packages.java.lang.String(content64, "UTF-8");
    
// Script sample code to get and decode the document content 





Outbound interactions with Enterprise Content Management systems