Document start event

A document start event starts a process when a document is created on an Enterprise Content Management (ECM) system. The start of a process that uses information from an ECM system is simplified by using a document start event.

Why you would use a document start event

Enterprise Content Management (ECM) systems store large amounts of information for organizations. That information is in the form of documents like reports, legal documents, invoices and proposals. In addition, ECM systems manage those documents, which means determining whether a document can be updated or deleted, for example. Setting a process to start when a document is created makes sense when the process is associated with a type of document. For example, a process might have a set of activities to investigate an insurance claim. That process can be started as soon as an insurance claim is submitted through the document start event.

How to create a document start event

You create a document start event as follows:
  1. Select a Start Event icon in a process definition. In the Properties view, select Document as the Event Type.
  2. Click the Implementation tab. In the Event Properties, select a server from the Source field drop-down list. The servers in the list are the ECM servers that are listed in the Process Application Settings page of your process application.
  3. Select the document type from the Type field. The document types that are shown are the document types available in the source.
  4. Select Include subtypes if you want the document subtypes included. For example, a medical document type might contain a dental subtype that you want included.
  5. Click the Data Mapping tab. Map the document type properties to your process variables. You can also select the + to show the additional technical properties that you might also want to map. For example, you might select a property that indicates who created the document and map that property to a process variable.
  6. Click Save or IBM BPM version 8570 cumulative fix 2017.03Finish Editing.
Note: To use a document start event with an external ECM system, you must have an event handler setup on that system that sends the Document Created event. See Performing administrative tasks for inbound events. Also, the user who is defined on the server definition must have the appropriate permissions to retrieve the details for these documents. These details are used to retrieve the required information for the data mapping.

The JavaScript starting document system variable

The identifier of the starting document is available in a JavaScript system variable. For processes and server-side services, use tw.system.currentProcessInstance.startingDocumentId to return the identifier. You can also use tw.system.currentProcessInstance.startingDocumentServerName to return the server name of the document. You can use this identifier and server name in activities, such as with Enterprise Content Management operations.

For client-side human services, use tw.system.processInstance.startingDocumentId to return the identifier. Use tw.system.processInstance.startingDocumentServerName to return the server name of the document.

The process is started in the default snapshot of a process application. In Process Center, the tip is the default snapshot unless another snapshot was explicitly configured to be the default. If the process is defined in a toolkit, it is started only if a snapshot of that toolkit is referenced by a process application. If multiple process applications reference the same toolkit that contains a process with a starting document, multiple process instances are started.