IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Enterprise Content Management > Overview of WebSphere Adapter for Enterprise Content Management > Technical overview > Outbound processing > Outbound operations

Create operation

The Create operation creates a document or a folder corresponding to the selected Document type or Folders in the Content Management Repository specified content.


Document Types

The adapter receives a request in the form of a business object to a create instance of a Document type in the CMIS Repository. The adapter processes the request and a document with a unique immutable Object Identity (ID) is created in the Content Management Repository. The content of the document is obtained from the attribute values of the requested business object.

An example of a request business object is modeled as below:

Figure 1. Structure of a request business object

Every Document Type has a set of named, but not explicitly ordered, Properties that are added in a separate business object. The name of this business object would be the Document Type in Camel-case, followed by the word Properties.

The content of the Document is handled in a separate business object titled DocumentContent.

LocalPath and Bytes are options for filling up the content that should go into the document. If you want to refer to a file in the local file system from which content is to be taken, provide the absolute file name in the LocalPath Business Object field. If you want to provide the content as hexBinary bytes, provide the content in hexBinary form in the Bytes Business Object field.

The Bytes field takes precedence over the LocalPath field. Therefore, if you provide values for both the Bytes and the LocalPath fields, the adapter takes the value provided in the Bytes field, and continue the process.

After the document is created, the Properties business object is sent back to the calling component as a response to indicate that the document was created successfully.

Figure 2. Structure of a response business object

After a successful create operation, the containment name of the document is populated in the pathSegment property. To perform other operations using the filename, reference the value of the pathSegment property in the cmisU58name property.


Folders

The adapter receives a request in the form of a business object to a create an instance of a Folder in the Content Management Repository. The adapter processes the request and a Folder with a unique immutable Object Identity (ID) is created in the Content Management Repository.

To successfully execute a request, either the Path or the Id values in the Parent child business object must be provided in the request business object. This represents the parent folder in which the new folder is created.

An example of a request business object for Folders is modeled as below:

Figure 3. Structure of a request business object for Folders

After the Folder is created, the Properties Business Object is sent back to the calling component as a response to indicate that the Folder was created successfully.

Figure 4. Structure of a response business object for Folders

During run time, if data is not entered for any of the fields, namely,

a MissingDataException error is returned. This eventually manifests as a ResourceException which is returned to the calling component.

Outbound operations


Related reference:

Fault business objects