You can store and view documents on an ECM server by configuring
a Document List view and, optionally, a Document Viewer view.
Before you begin
You must have an Enterprise Content Management (ECM) service
with a search operation that provides a search result. This search
result will be used with the Document List view to present a list
of documents. Creating this service is shown in Building a query for an Enterprise Content Management search operation.
The search
service created for the Document List view should comply with the
interface described by the view itself. The Default ECM
Search Service Ajax service provided in the Content Management
(SYSCM) toolkit shows an example of the expected input and output
definition. The parameter names in your search service must be the
same as those used in the Default ECM Search Service Ajax
service: maxItems, skipCount, searchAllVersions and cmisQuery.
A
tip is provided in the What to do next section for quickly creating
a search service.
If you have not created this service, however,
you can create one at the time you configure your Document List view.
You
should add the Content Management (SYSCM) toolkit to your dependencies,
if you have not added it as you will need access to the ECM types.
You may optionally want to add the Coaches (SYSC) toolkit as it has
additional user interface functions you may find helpful. To add these
toolkit dependencies, select + beside TOOLKITS.
In the Add dependency menu, select the Content
Management and Coaches toolkit
versions you require.
About this task
Adding a Document List view to a Coach makes it possible
for you to store or view documents on an ECM server. To configure
a Document List view, follow these steps:
Procedure
- Create a Human service. Beside User Interface,
click +. Select Human Service.
In the New Human Service dialog box that opens,
enter an appropriate name and click Finish.
- Select a Coach from the palette
and drag it onto the canvas. Enter an appropriate name for the Coach
and save your work. Do not select the Heritage Coach,
which is used primarily with process applications.
- Double-click the Coach you just created. The Coach editor
opens. From the palette beneath Content, drag
a Document List view onto the canvas. Do you
want to also see your documents in the Coach? Then you should also
drag a Document Viewer view to the canvas. If you do not see a Content section
on the palette, select that section from the Filter drop-down
list.
- You must connect the service with your Enterprise Content
Management (ECM) search results with the Document List view. Select
the Document List view and in the Properties section
click Configuration. Beside the Search property
click Select. From the menu beneath Ajax
Service, select the ECM service that implements the search
operation created previously.
- Select the other configuration options you want for your
implementation of the Document List view.
- Allow create: A user can add documents
to the Enterprise Content Management system in the folder specified
by the Parent folder path.
- Allow update: A user can update the content
of a document.
- Open in new window: When a user clicks
the View Document link, the document will open in a new window.
- Number of results to show: Specifies the
maximum number of documents from the search result that the user can
see in the list at one time. The default is 10 documents per page
if no value is specified.
- Show all content: If deselected and the
search result contains more documents than is specified in the Number
of results to show option, the list of documents includes Back and
Next buttons to allow the user to page through the list. If selected,
the search result is limited to the value of the Number of results
to show option and the user cannot page to see additional documents.
- Configure for use with: Select ECM
documents to work with documents in an external ECM datastore.
Select BPM documents to work with documents
in the IBM BPM document store. Information about specifying options
for ECM documents and BPM documents is found in the topic "Stock content
controls."
The remaining services are used by the Document List view.
They are preselected from the Content Management (SYSCM) toolkit.
You can, however, create your own service by selecting New and
then creating your own service.
- Search: Specifies the service used to search
for documents in the ECM document repository. Important: You must
provide a service. Use the Default ECM Search Service Ajax service
provided in the Content Management (SYSCM) toolkit as a template.
The default service shows an example of the expected input and output
definition. Information about specifying search criteria is found
in the topic "Specifying search criteria for the IBM_BPM_Document_Properties
property."
- Get all document versions: Gets all versions
of every document retrieved.
- Get document: Gets a specific document.
- Get type definition: Gets the type properties
of each document.
- Get type descendents: Gets all descendants
of the type definition.
- Set the data binding property for your Document List view
if you are going to use a Document Viewer to display a document in
the list. If you have a Document Viewer view to display the document,
you will also need to set its data binding property to communicate
with your Document List view.
Click the Variables tab.
Click Add Private. In the Name field
enter a name like documentInfo. Beside Variable
Type, click Select. From the Business
Objects list, select ECMDocumentInfo.
Select the check box beside Is List. Save your
work.
- Select the Coaches tab. Select
the Document List view on the canvas. Select the General tab
from the Properties view. Beside Binding,
click Select. From the menu select documentInfo
(ECMDocumentInfo) (List). Save your work.
- If you also have a Document Viewer view to show the
document, repeat the previous step after selecting the Document Viewer
with this difference. Expand documentInfo (ECMDocumentInfo)
(List) and select listSelected (ECMDocumentInfo).
Save your work.
- Test your Document List view implementation by selecting
the run service icon in the upper right section of the page.
What to do next
Updating any binding related to a Document
List view through a script could be a common occurrence. For example,
the values for the inputs to your search service will likely change
with time. If you run a script to update the binding you must change
the previous value. In the following JavaScript, the columns are updated
by appending text which changes the older values.
tw.local.cmisQueryString = "SELECT cmis:name, cmis:objectId ";
if (tw.local.photoCatagory) tw.local.cmisQueryString = tw.local.cmisQueryString + ", PhotoCatagory";
if (tw.local.photoSubject) tw.local.cmisQueryString = tw.local.cmisQueryString + ", PhotoSubject";
if (tw.local.photoLocation) tw.local.cmisQueryString = tw.local.cmisQueryString + ", PhotoLocation";
if (tw.local.photoDate) tw.local.cmisQueryString = tw.local.cmisQueryString + ", PhotoDate";
tw.local.cmisQueryString = tw.local.cmisQueryString + " FROM acpPhoto";
tw.local.testCoachRefresh = tw.local.testCoachRefresh + "XYZ ";
The
following steps show a quick way to create a search service:
- Copy the Default ECM Search Service to
your process application. By copying the default service you will
have the correct input and output variables and types.
- Rename the Default ECM Search Service to
an appropriate name for yourself; for example, MySearch.
- Complete one of the following steps:
- If you have configured your Document List view for use with BPM
documents, configure the search operation that is defined in the existing
IBM BPM documents Content Integration step.
- If you have configured your Document List view for use with ECM
documents, then add a Content Integration step
to the ECM documents path and configure the search operation with
an Enterprise Content Management server.
- Use the auto-map function to create the map between the input
and output service parameters and the variables.