DMS Operation Tutorial
The following tutorial describes how to use DMS operations to add, update and get a document.
Importing the Example Model
You can download and import the complete tutorial model DMS.xpdl. Download the following ZIP file
containing the example model from here:
dms.zip
Perform the following steps to import the model:
- 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.
- Right-click your project and select
Import > Process Manager > Process Model.
Click Next and browse to the location of the example
model extracted from the zip file.
Creating a Process to update a Document and create a new Version
In this example process we create a new document with a given name and description. We use the DMS operation
Add Document, which creates the document and adds it to the repository. Per default, this operation
creates a document without version. We use access point versioning and pass a true value to create a
version for our new document. After that we update the document by using DMS operation Update Document.
We change the name and description of the document and create a new version.
To prepare the model and process, perform the following steps:
- 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.
- Create a process definition called Update and Version Document and open its diagram
Continue by adding the workflow elements.
Creating the Applications
Create the following applications:
- Create a DMS Operation application and name it as DMS Operation Add Document

Figure: DMS Operation Application
- Open the properties of the DMS Operation Add Document application
- Select DMS Operation in the left pane
- Select Add Document from the Operation drop-down list

Figure: Properties of DMS Operation Add Document
- Create another DMS operation application and name it as DMS Operation Update Document
- Open the properties of the DMS Operation Update Document application
- Select DMS Operation in the left pane
- Select Update Document from the Operation drop-down list

Figure: Properties of DMS Operation Update Document
Creating the Workflow
Create the following workflow:
- Start with a manual trigger
- Create an application activity Add Document and connect it to application
DMS Operation Add Document
- Create a manual activity Enter new Document Name to enter a new name for the document
- Create an application activity Update Document to update the document name and description
and create a new version. Connect it to application DMS Operation Update Document
- Create a manual activity Show Document to display the updated document
Creating the Data
Create the following data:
- Create a primitive data Initial Doc Name of type string and specify a document name, e.g.
InitialDocName.txt in the Default Value field.
- Create a primitive data Initial Description of type string and add
Initial content in the Default Value field.
- Create a primitive data New Doc Name of type string
- Create a primitive data New Doc Description of type string
- Create a primitive data Create Version of type boolean and select the
Default Value check box
- Create a document data named Document

Figure: Document Data
- Open the properties page of the document data
- Select DMS Document from the left pane and select default from the
Declared Types

Figure: Properties of Document Data
Specifying the Data Mappings
Now we specify appropriate data mappings between each activity and data.
- Specify the following In-data mapping for the Add Document application activity:
- for the Initial Doc Name data:

Figure: In data mapping for Initial Doc Name
- for the Initial Description data:

Figure: In data mapping for Initial Description
- for the Initial Doc Name data:

Figure: In data mapping for versioning
- Specify the following out data mapping for application activity Add Document

Figure: Add Document - Out Data Mapping
- Add an in data mapping from the Document data to activity
Enter new Document Name.
- Add an out data mapping from activity Enter new Document Name to data
New Doc Name.
- Specify the following in-data mappings for the Update Document application activity:
- for the Document data:

Figure: In data mapping for Document
- for the New Doc Name data:

Figure: In data mapping for New Doc Name
- for versioning:

Figure: In data mapping for versioning
- for the New Doc Description data:

Figure: In data mapping for New Doc Description
- Specify the following Out-data mapping for the Update Document application activity

Figure: Update Document - Out Mapping
- Specify the following In-data mapping for the Show Document manual activity

Figure: In data mapping for
The following screenshot displays the complete process:

Figure: Complete Process Diagram
Running the Example in the Process Portal
To run the example, perform the following steps:
- 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.
- Start the Stardust Portal as described in chapter
Logging in the Stardust Portal of the
End User Handbook. Login as
administrator (
motu/motu). You can use the
Shift-F8 short key.
- In the Workflow Execution perspective, start process
Update and Version Document.

Figure: Start Update and Version Document process
- Click the tab with the opened document InitialDocName.txt.

Figure: Open created document
- Expand the Details section of the document properties. You see the initial description added to
the created document.

Figure: Document Details
- Close the document tab for InitialDocName.txt and enter a new name for the document in the
manual activity.

Figure: Enter new document name
- Complete the activity
- Activity Show Document is opened along with the renamed document. Click on the document icon to
open the renamed document.

Figure: Show Document
- Expand the Details section of the document properties. You see the description replaced with
the new description.

Figure: Updated Document
- In the launch panel of the Workflow Execution perspective select
Search Documents in the Documents section.

Figure: Click to open the Document Search View
- Enter a search pattern for the renamed document in the Document Name field and click
Search.

Figure: Click to search for document
- The renamed document gets displayed in the search result table. In the Actions column click
the menu and select Version History

Figure: Version History
- The version history of the document gets displayed. We can see the initial document name and the changed versions
in the table.

Figure: Version History of the Document
Creating a Process to get a Document by ID
In the following example process we add a document with a given document name, retrieve the document id via a message
transformation and then use the Get Document DMS operation to retrieve the document via the given id.
Creating the Applications
Create the following applications:
- Add Document - a DMS application with operation Add Document

Figure: Add Document DMS Operation
- Get Document - a DMS application with operation Get Document

Figure: Get Document DMS Operation
- MTA Retrieve Doc ID - a simple message transformation application which retrieves a primitive
data and maps it to an outgoing primitive data. This will be used to retrieve the document id of the created
document and maps it to a primitive data.

Figure: Message Transformation Properties
Creating the Workflow
Create the following workflow:
- Start with a manual trigger
- Create a manual activity Enter Document Name to enter the name of the document to be created
- Create an application activity Add Document and connect it to application
Add Document
- Create an application activity MTA Retrieve Document ID and connect it to application
MTA Retrieve Doc ID
- Create a manual activity Show Document ID to display the retrieved document Id
- Create an application activity Get Document to retrieve the document by Id. Connect it to
application Get Document
- Create a manual activity Show Document Name to display the retrieved document
Creating the Data
Create the following data:
- Create two primitive data DocumentName and DocumentID of type string
- Create two document data NewDocument and RetrievedDocument
Specifying the Data Mappings
Now we specify appropriate data mappings between each activity and data.
- Specify the following data mappings for the Add Document application activity:
- Specify the following data mappings for the MTA Retrieve Document ID application activity:
- Specify an in-data mapping from data Document ID to activity Show Document ID
- Specify the following data mappings for the Get Document application activity:
- Specify an in-data mapping from data RetrievedDocument to activity
Show Document Name
The following screenshot displays the complete process:

Figure: Complete Process Diagram
Running the Example in the Process Portal
To run the example, perform the following steps:
- Start your server and deploy the model
- Start the Stardust Portal as described in chapter
Logging in the Stardust Portal of the
End User
Handbook. Login as administrator (
motu/motu).
- In the Workflow Execution perspective, start the process Get Document Per ID

Figure: Start DMS Operation Process
- Enter a document name for the new document and complete the activity.

Figure: Enter document name
- DMS application activity Add Document uses this data to create a document with the given name.
- Now the message transformation application maps the id of the new document to our primitive data
Document ID.
- Activity Show Document ID opens to display the primitive data with the Id retrieved from the
document.

Figure: Activity showing retrieved document Id
- Complete the activity
- DMS application activity Get Document gets the document with this Id, which is the document we
added.
- Activity Show Document Name opens and displays the name of the document with the given Id.

Figure: Activity showing the document with the specific Id