Creating the Document Triage Workflow

For our example model DocumentTriageExample.xpdl we create two processes, one for Document Rendezvous waiting for incoming Documents, and one for the Document Triage, containing the predefined UI Mashup activity for indexing.

You find the complete example model DocumentTriageExample.xpdl as well as model DocumentRequestPredefined.xpdl containing the predefined structured data type in the all-tutorials.zip file in the document-triage/src/main/resources folder.

Importing and preparing the predefined Data Model

To make the predefined structured data type, which is required for our Document Triage, available, import the DocumentRequestPredefined.xpdl model from the all-tutorials.zip file.

The usage of this predefined model is described in detail in section Predefined Document Request Model Structure of chapter Triaging Documents in the End User Handbook.

Do not forget to adjust the server base URL in the Default Value entry field of the serverBaseUrl configuration variable of the predefined model.


Figure: Enter Server Base URL

Creating Business Object and Document Data

To create the example Document Triage model, create the following data type and data:

  1. Create a Structured Type Loan Application Type with the String fields TaxId, FirstName and LastName.

  2. Create Structured Data Loan Applicant of this type and enable it to be used as Business Object.

  3. Select TaxId as primary key and FirstName as name field.

  4. Create a structured data of type Document Request Predefined/DOCUMENT_REQUEST. This is the document request data type of the Document Request Predefined model. This type is described in detail in section Predefined Document Request Model Structure of chapter Triaging Documents in the End User Handbook.

For details on defining structured data as Business Objects refer to chapter Specifying Structured Data as Business Object in the Business Process Modeling Handbook.

Creating a Document Upload Process

Add a simple document triage process Document Triage:

  1. Add a manual activity Upload Documents to provide the option to upload documents as process attachments
  2. Drag and drop the Document Triage Panel UI Mashup application from the predefined Document Request model to the diagram canvas of the document triage process.

    Drag UI Mashup Application

  3. The activity properties pane displays the implementation of the Document Request Predefined/Document Triage Panel application.

    Application Properties

  4. Connect the activities
  5. Set the process properties to support process attachments.

    Support Process Attachments

The process now looks similar to the following:


Figure: Example Document Upload process

Preparing the Document Rendezvous

Now we create process Loan Application for invoking a Document Rendezvous. We use a Script task for easier reading of Document Request data. Prepare the workflow as follows:

  1. Create a Script Invocation application Define Requested Documents

    Script Task

  2. In the

    Script Task

  3. In the property page of the application enter the DOCUMENT_REQUEST type from the predefined model as OUT parameter:

  4. In the Configuration tab, enter JavaScript to define the document request data, for example:
    documentRequest = {Documents: [{
             Name : "ID",
             Exists : false,
             Accepted : false,
             Required : true,
             DocumentLocation : "",
             IsAttachment : false,
             IsTemplate : false,
             ConvertToPDF : true,
             DocumentID : "",
             DocumentType : "",
             Comment : "",
             ACL : ""
         }, {
             Name : "PaySlip",
             Exists : false,
             Accepted : false,
             Required : true,
             DocumentLocation : "",
             IsAttachment : false,
             IsTemplate : false,
             ConvertToPDF : true,
             DocumentID : "",
             DocumentType : "",
             Comment : "",
             ACL : ""
         }]}

  5. Drag the Script Invocation application to the diagram canvas.

    Drag Script Invocation

  6. Drag the DOCUMENT REQUEST and the Loan Applicant data to the diagram canvas.
  7. Create a manual activity Get Application Info reading data to the Business Object data.
  8. Create a Rendezvous Route Activity Document Rendezvous Loan(Task = None):
    1. Select Task None Task.

      None Task

    2. Begin the Activity ID of the Route Activity with DocumentRendezvous, e.g. DocumentRendezvous_Loan. Do not include spaces in the ID!
    3. Mark this Activity as Hibernate Initially

    Route Activity Properties

  9. Create in and out data mappings from this activity to the DOCUMENT_REQUEST data.
  10. Create an activity Loan Review with an in data mapping from Loan Application data to display the resulting Business Object data.
  11. Open the properties pane of the Loan Application process.
  12. Mark the process to support process attachments.
  13. Add LoanApplicant.TaxId as descriptor.

    Add Descriptor

  14. Add DOCUMENT_REQUEST as in and out data paths.

The following screenshot shows the example Document Rendezvous process for Loan application:

Claims Processing Example
Figure: Loan Application Example Workflow

For details on the Document Rendezvous concept in general, please refer to chapter Document Rendezvous in the Stardust Concepts Document Rendezvous in the Concepts part.