DMS Operation Tutorial

The following tutorial shows an example usage of the Get Document, Add Document and Update Document DMS functionality deployed in the Stardust RAD environment. For detailed information on setting up embedded Tomcat or creating a dynamic Webproject, please refer to the chapter Getting Started of the Stardust Support Case Example tutorial.

Importing the Example Model

Perform the following steps to download the example model directly.

  1. Download the following ZIP file containing the example model
  2. dms.zip

  3. Create a dynamic Web project designed to deploy Stardust Process Platform models to run in the Stardust Portal. For detailed information on creating dynamic Web projects for usage with the Stardust Portal, please refer to the Rapid Application Development guide.
  4. Right-click the project and select Import > Process Manager > Process Model. Click Next and browse to the location of the example model extracted from the zip file.
  5. Deploy the model and execute the process DMS Operation

Creating the Example Model

Perform the following steps to create the example model:

  1. Create a dynamic Web project. For more information, please refer to the Rapid Application Development guide.
  2. Create a process definition called DMS Operation
  3. Open the process definition diagram of DMS Operation process
  4. Create a manual trigger
  5. Create three application activities named Add Document, Get Document, and Update Document respectively.
  6. Create a route activity named Get New Document Name
  7. Connect these activities
  8. Connect the manual trigger to the Add Document activity
  9. Create a DMS Operation and name it as DMS Operation Add Document
  10. DMS Operation
    Figure: DMS Operation Application

  11. Open the properties of the DMS Operation Add Document application
  12. Select DMS Operation from the left pane and select Add Document from the Operation drop-down list
  13. Properties
    Figure: Properties of DMS Operation Add Document

  14. Connect the DMS Operation Add Document application to the Add Document application activity
  15. Similarly, create two more DMS operation application and name them as DMS Operation Get Document and DMS Operation Update Document
  16. Connect the DMS Operation Get Document application to the Get Document application activity
  17. Open the properties of the DMS Operation Get Document application
  18. Select DMS Operation from the left pane and select Get Document from the Operation drop-down list
  19. Properties
    Figure: Properties of DMS Operation Get Document

  20. Connect the DMS Operation Update Document application to the Update Document application activity
  21. Open the properties of the DMS Operation Update Document application
  22. Select DMS Operation from the left pane and select Update Document from the Operation drop-down list
  23. Properties
    Figure: Properties of DMS Operation Update Document

  24. Create primitive data type My Doc of string type and specify My Document in Default Value field
  25. Create primitive data type New Name of string type and specify Versioned in Default Value field
  26. Create primitive data type Create Version of boolean type and select the Default Value check box
  27. Create three document data named Request Form, New Name of Form and Updated Form
  28. Document Data
    Figure: Document Data

  29. Open the properties page of each document data
  30. Select DMS Document from the left pane and select default from the Declared Types
  31. Properties
    Figure: Properties of Document Data

Specifying Data Mappings

You need to specify appropriate data mappings between each activity and data.

  1. Specify the following In-data mapping for the Add Document application activity
  2. Properties
    Figure: Add Document - In Mapping

  3. Specify the following Out-data mapping for the Add Document application activity
  4. Properties
    Figure: Add Document - Out Mapping

  5. Specify the following In-data mapping for the Get Document application activity
  6. Properties
    Figure: Get Document - In Mapping

  7. Specify the following Out-data mapping for the Get Document application activity
  8. Properties
    Figure: Get Document - Out Mapping

  9. Specify the following In-data mapping for the Get New Document Name route activity
  10. Properties
    Figure: Get New Document Name - In Mapping

  11. Specify the following Out-data mapping for the Get New Document Name route activity
  12. Properties
    Figure: Get New Document Name - Out Mapping

  13. Specify the following In-data mapping for the Update Document application activity
  14. Properties
    Figure: Update Document - In Mapping

  15. Specify the following In-data mapping for the Update Document application activity
  16. Properties
    Figure: Update Document - In Mapping

  17. Specify the following Out-data mapping for the Update Document application activity
  18. Properties
    Figure: Update Document - Out Mapping

  19. Specify the following In-data mapping for the Show Document manual activity
  20. Properties
    Figure: Show Document - In Mapping

The following screenshot displays the complete model.

Properties
Figure: Complete DMS Operation Model

Executing the Workflow

When you execute the DMS Operation process for add document, in the background, a DMS document gets created and added to the repository. For the add document operation, document is created without any version. Then, the document name and its version get updated and the updated document name is stored in the repository. Along with the Show Document activity the updated document name and its new version gets displayed.

Perform the following steps:

  1. Start your server and deploy the model. For details on how to deploy a model, please refer to the chapter Deploying a Workflow Model of the Support Case Example.
  2. Start the Stardust Portal as described in the chapter Logging in the Stardust Portal of the End User Handbook. Login as administrator (motu/motu). You can use the Shift-F8 short key.
  3. In the Workflow Perspective, start the process DMS Operation
  4. Process
    Figure: Start DMS Operation Process

    In the activity panel, Show Document activity displays the DMS document.

    Show Document
    Figure: Show Document

  5. Click on the document named Versioned. Also, note that the document version gets displayed along with document.
  6.  Document
    Figure: Document named Version

  7. Switch to the Administration perspective
  8. In the Administration Views, click Document Repository view
  9. In the Root > process-instances directory, drill-down to the latest executed process instance.
  10. The document name gets displayed.

     Document
    Figure: Document

  11. Right-click the document and select Version History
  12.  History
    Figure: Version History

    The version history of the document gets displayed.

     History
    Figure: Version History of the Document

  13. Upload a new document and perform other document operations on the document