On IBM BPM 8.6.0 the ECM controls live in the Content Management toolkit (SYSCM) and work against any CMIS server (FileNet, Box, the BPM document store itself). Steps:
- Define the ECM server: Process App Settings > Servers > Add > type Enterprise Content Management server: CMIS URL (FileNet: https://host:9443/fncmis/resources/Service), repository (object store) id, user / password or "use process user". Test the connection.
- Add the dependency on the Content Management toolkit and choose the server in the coach views' ECM server option (or the "Default ECM server" of the app).
- Coach: ECM File Uploader (uploads into a folder: option Folder path or Folder id, document class, properties), ECM Document List (documents of a folder or bound list of ECMDocumentInfo), ECM File List (older name of the same idea) and ECM Document Viewer.
- Bind data: the uploader's output is an ECMDocumentInfo (id, name, folder, properties); the list is bound to a list of ECMDocumentInfo and can be filtered with a CMIS query.
// service flow: create a folder per instance and give its path to the coach
var folder = tw.system.ecm.createFolder(tw.env.ecmServerName, "/Orders", "ORD-" + tw.local.orderId); // ECMFolder
tw.local.folderId = folder.objectId;
// search documents of that folder (CMIS)
var results = tw.system.ecm.search(tw.env.ecmServerName, "SELECT * FROM Document WHERE IN_FOLDER('" + tw.local.folderId + "')");Alternatively use the integration services of the toolkit in a service flow (Create Document, Get Document Content, Update Document Properties, Search) when the upload must happen server-side (generated files). Common issues: the CMIS user needs create rights on the folder, the object store's default document class must allow the mapped properties, and the FileNet certificate must be in the BPM truststore.
References