Archive

Archive for the ‘DOCUMENTUM’ Category

Relationship and Virtual Documents in Documentum

November 26, 2011 Comments off

This Post explains how the concept of relationships and virtual documents can be used to relate objects in Documentum using Documentum Foundation Classes (DFC).

Definitions:

  1. Relationship: A relationship implies a connection between two objects. When an object is related to another object then we can define which object is the parent object or the child object or if they are equal. Relationships are system-defined as well as user-defined. In the BOK, we confine our self to user-defined relationships.
  2. Virtual Document: In Documentum, a document which holds other documents i.e. a document which acts as a container is called as a virtual document. A virtual document can contain other virtual documents. The document which acts as a container is called the parent document while the documents which are contained in parent document are called as child documents.

Overview on relationship:

Two built-in object types dm_relation and dm_relation_type are to be used to create relations between any two objects. The dm_relation_type object defines the behavior of the relation. The dm_relation object identifies the dm_relation_type object and the two objects between which the relation needs to be created. Pictorially it can be shown as:

Figure-1

The dm_relation_type object has following attributes:

  1. child_parent_label: It defines the child to parent feature of the relation.
  2. parent_child_label: It defines the parent to child feature of the relation.
  3. description: It gives the general description of the relation.
  4. parent_type: It defines the type of objects that will act as parents.
  5. child_type: It defines the type of objects that will act as child.
  6. direction_kind: It defines the nature of relationships between the objects. The expected values are:

a)    1 – Parent to Child

b)    2 – Child to Parent

c)    3 – Objects are at equal level

7. integrity_kind: It specifies the type of referential integrity used when either of the two related objects has to be deleted. The expected values are:

a)    0 – Any of the two related objects can be deleted.

b)    1 – As long as the relation exists, neither of the related objects can be deleted.

c)    2 – If one of the related objects gets deleted, other one also gets deleted.

      1. relation_name: Specifies a name for the relation
      2. security_type: It indicates the type of security to be used for the relation object. The valid values are:

a)    SYSTEM: If this value is used, then super-user privileges are required for creating, deleting or modifying the relationships pertaining to this dm_relation_type object.

b)    PARENT: In this case, the ACL for the relation is inherited from the parent object in the relation and RELATE permission is required to create, modify, or drop the relation. The exception to this is if the parent object is not a subtype of dm_sysobject, then no security will be enforced.

c)    CHILD: In this case, the ACL for the relation is inherited from the child object in the relation and RELATE permission is required to create, modify, or drop the relation. The exception to this is if the child object is not a subtype of dm_sysobject, then no security will be enforced.

d)    NONE – In this case, no security is applied. All users can create, modify or delete this kind of relationship.

The dm_relation object has following attributes:

  1. child_id: It is the r_object_id or i_chronicle_id of the child object in this relation. If i_chronicle_id is used, then ‘child label’ attribute can be used to bind the parent object to a particular version of child.
  2. parent_id: The r_object_id or i_chronicle_id of the parent object in the relations. If the attribute ‘permanent_link’ is set to TRUE then only use the i_chronicle_id of the object.
  3. permanent_link: If every new version of the parent object has to be related with the child object, then the value for this attribute must be set to TRUE and i_chronicle_id should be used in the parent_id attribute. By default the value is FALSE.
  4. relation_name: It specifies the value of relation_name attribute of the dm_relation_type object that defines the type of relationship.
  5. child_label <Optional>: If i_chronicle_id is used in the attribute ‘child_id’, then the label of the version of the child object is to be specified here.
  6. description <Optional>: Specifies the description.
  7. effective_date<Optional>: Not used by the system, a user-defined date. Custom logic could check this date to determine the state of the relationship.
  8. expiration_date<Optional>: Not used by the system, a user-defined date. Custom logic could check this date to determine the state of the relationship.
  9. order_no<Optional>: Not used by the system. Custom logic could use this integer value to order a set of relationships.
  • Creation of dm_relation_type object using DQL: The query used to create a dm_relation_type object is as follows:

create dm_relation_type object

set child_parent_label = ‘<Child to parent label>’,

set parent_child_label = ‘<Parent to child label>’,

set description = ‘<Description>’,

set parent_type = ‘<Document type>’,

set child_type = ‘<Document type>’,

set direction_kind = <0 or 1 or 2>,

set integrity_kind = <0 or 1 or 2>,

set relation_name = ‘<Name of Relation>’,

set security_type = ‘<SYSTEM or PARENT or CHILD or NONE>’

  • Creation of dm_relation object using DFC: Following methods which returns an object of type dm_relation can be used to create a dm_relation object.

1. addChildRelative(relationTypeName, childId, childLabel, isPermanent, description): This method has to be invoked on the object which is going to act as Parent in the relation. The parameters it takes are

a)    relationTypeName – Name of a valid dm_relation_type object.

b)    childId – The r_object_id or i_chronicle_id of the child object of the relation.

c)    childLabel – Version label of the child object. If this is ‘null’, the relation will contain no child label.

d)    isPermanent – Specifies if the link permanent. Valid values are TRUE or FALSE

e)    description – Specifies the description for the relation object. If ‘null’, the relation object will not have a description.

2.addParentRelative(relationTypeName, parentId, childLabel, isPermanent, description): This method has to be invoked on the object which is going to act as Child in the relation. It takes the same parameters as the method addChildRelative takes except instead of r_object_id or i_chronicle_id of the child object we pass the r_object_id or i_chronicle_id of the parent object as the parameter parentId.

Note: dm_relation object can be created through DQL also.

Overview on virtual document:

Virtual document provides a way for combining documents in various formats into one consolidated document. For e.g. one word document, one pdf document and one image can be combined to form one virtual document. There is no limitation regarding nesting of documents. One particular version or else all of the versions of a component can be combined with a virtual document. Two object types are used to store information about virtual documents. They are:

  1. Containment Object Type: It stores the information that links a component to a virtual document. Every time a component is added to a virtual document, a containment object is created for that component. The attributes of this object type can be set by the methods AppendPart, InsertPart, UpdatePart.
  2. Assembly Object Type:  An assembly object provides a snapshot of a virtual document at a given instance.

Creation of a virtual document using DFC:

A document can be converted to a virtual document by invoking the method setIsVirtualDocument on it. This method sets the r_is_virtual_doc of the document.

Note: Virtual documents can also be created using clients such as Webtop, DA etc as well as through DQL.

Requirement in the project:

Consider there are three main documents A, B and C. Essentially, A, B and C represent different contracts. Consider another set of documents A1, A2, A3, B1, B2, B3, C1, C2 and C3. A1, A2 and A3 are directly related to A, B1, B2 and B2 are directly related to B, C1, C2 and C3 are directly related to C. Also, A is related to B (A is child, B is parent), B is related to C (B is child and C is parent), and C is related to A (C is child and A is parent). The documents being referred here are Documentum documents of a certain system-defined or user-defined document type.

As per the requirements:

  1. For every new version of the documents the existing relations should be valid.
  2. From the document A, we should be able to navigate to A1, A2 and A3 and also to the documents B and C. Similarly for B and C.
  3. Depending on a particular attribute of main documents (A, B and C), there should be dynamic creation or deletion of relationships between contracts.

Resolution of requirement # 1:

Issue encountered:

Documentation says that when a dm_relation object is created with attribute values permanent_link = TRUE and child_label = ‘Current’ then for every new version of parent or child a new instance of the dm_relation object is created and the relation is created between the latest versions of child object and parent object. But on implementation of the same, always the latest version of the parent object was related to child object between which the relation was initially created.

Issue resolution:

To maintain the relation across the current versions of document and for easy navigation from parent to child documents the concept of virtual documents in addition to that of relationship was used.

All the main documents A, B and C were converted to virtual documents. The child documents A1, A2 and A3 were added as children to the newly converted virtual document A. For this the following DFC methods were used in the same order as specified:

  1. asVirtualDocument(lateBindingValue, followRootAssembly): This method is invoked on a virtual document (in this case on A, B and C) and it returns the virtual document representation of the virtual document object on which it is invoked. The parameters it takes are2.   getRootNode(): This method is invoked on the virtual document representation of a virtual document. It returns the root node of the virtual document. The root node is essentially the virtual document which is at the topmost hierarchy of virtual document tree. (In our case A, B and C are root nodes)
    1. lateBindingValue – the version label of the virtual document. To meet our requirement the value should be “Current”.
    2. folowRootassembly: If the value is set to TRUE, the assembly specified by the root node will be used as the virtual document.
    3. getRootNode(): This method is invoked on the virtual document representation of a virtual document. It returns the root node of the virtual document. The root node is essentially the virtual document which is at the topmost hierarchy of virtual document tree. (In our case A, B and C are root nodes
  2. addNode(parentNode, insertAfterNode, objectChronId, binding, followAssembly, overrideLateBindingValue): This method is invoked on the root node of a virtual document. This method adds a new node to the virtual document on which it is invoked. The parameters it takes are:
  • parentNode: The root node.
  • insertAfterNode: A virtual document node that will immediately precede the new node in the virtual document’s hierarchy. If this parameter is null, the new node is placed as the first child of parentNode.
  • objectChronId: i_chronicle_id of the document which is to be added as child to the virtual document. (In or case i_chronicle_id of A1, A2, A3, B1, B2, B3, C1, C2 and C3).
  • binding: The version label of the version of the child document with which we want to bind the child document with the virtual document.
  • followAssembly: It is set to TRUE if the follow_assembly attribute has to be set to TRUE for the component.
  • overrideLateBindingValue: It is set to TRUE if the version label identified in binding is to be used to resolve late-bound descendents of this component.

So using the concept of virtual document always the current versions of document are present in the parent virtual document. Thus the current versions of A and A1, A2, A3 are always related. And since A has been converted to virtual document, we can navigate to A1, A2 and A3 by just clicking on A.

Resolution of requirement # 2:

Now using the concept of relationship, a relation was created between A and B, B and C, A and C each. Thus navigation across the different contracts A, B and C was possible. Pictorially this can be shown as:

Figure-2

In the above figure the arrow denotes the relationship between two documents.

Resolution of requirement #3:

Requirement #3 states that there should be dynamic creation or deletion of relations between main documents depending on a particular attribute, say, attr. The value of attr for, let’s say, document A determines to which document, A will act as child. If the value of attr for document A is changed so as to imply that A and B are no longer related, then the relation object existing between A and B should be destroyed. If the new value points toward new document D, then a relation has to be created between A and D.

So the change in value of that particular attribute needs to be intercepted. The interception can be done as follows:

  1. Write a TBO (Type based object) for the document type to which A belongs to.                

 Note: For details on TBO refer BusinessObjectsDevelopersGuide.pdf provided by Documentum.

  1. In the TBO, override the method setString(attribute name, value of attribute), if the attribute attr is single-valued attribute or appendString(attribute name, value of attribute), if it is multi-valued attribute. These two methods captures all the attributes and their values for a document type. setString captures the single-valued attributes while appendString captures the multi-valued attributes.
  2. In either of the method, compare the old value of attribute attr with the new one. If there’s any change destroy all the existing relations which involves the document A as child. This can be done using the DFC method removeParentRelative(relationTypeName,parentId,childLabel).  Invoke this method on A. The parameters it takes are:Now use the method addParentRelative as explained, to relate document D as parent to document A.
    1. relationTypeName – Name of the relation object.
    2. parentId – r_object_id of parent object.
    3. childLabel – version label of child object.
  3. Every time the value is changed for attribute attr and the document is saved, the corresponding TBO is invoked and the above mentioned methods will be executed. Thus dynamic creation or deletion of relations can be achieved.

Conclusion: Thus the concept of relationships and virtual documents can be used together to relate objects in Documentum using Documentum Foundation Classes (DFC).

Documentum Full Text Index Server

November 2, 2011 Comments off

For faster and better search functionalities EMC has developed a Full Text Index Server which is installed separately with the Content management software to provide an index based search capability. In version 5.2.5 SPx the full text search engine was using Verity which has been now changed to FAST (Fast Search & Transfer) in 5.3 SPx onwards and xPlore replaced further.

In Verity we have to explicitly define the attributes to be indexed, in the content server configuration, whereas one of the salient features of FAST is that by default, all the attributes are indexed along with the content of the document. Since, FAST is no longer tightly coupled with the installation of the content server; one has the option of not installing Index
 Server. If the Full Text Index server is not installed, simple search will perform a case sensitive database search against object_name, title and subject attributes of dm_sysobject and its subtypes.

This post describes the various components of Index Server and their operations.

1.   Software Components

Full-text indexing in a Documentum repository is controlled by three software components:

  • Content Server, which manages the objects in a repository, generates the events that trigger  full-text indexing operations, queries the full-text indexes, and returns query results to client applications.
  • The index agent, which exports documents from a repository and prepares them for indexing.
  • The index server, which is a third-party server product that creates and maintains the full-text index for a repository. The index server also receives full-text queries from Content Server and responds to those queries.

2.   Set Up Configuration

a)  Basic Set Up

The basic indexing model consists of a single index agent and index server supporting a single repository. The index agent and index server may be installed on the Content Server host or on a different host.

b)  Consolidated Set Up

In a consolidated deployment, a single index server provides search and indexing services to multiple repositories. The repositories may be in the same Content Server installation or on different hosts. However, all repositories must be of the same Content Server version.

3.   Index Server Processes

The index server consists of five groups of processes that have different functions.

a) Document processors

Document processors (also sometimes called procservers) extract indexable content from content files, convert DFTXML to FIXML (a format that is used directly by the indexer), and merge the indexable content with the metadata during the DFTXML conversion process. Document processors are the largest consumer of CPU power in the index server.

b) Indexer

The indexer creates the searchable full-text index from the intermediate FIXML format. It consists of two processes. The frtsobj process interfaces with the document processor and spawns different findex processes as necessary to build the index from FIXML.

c) Query and Results servers

The QR Server (Query and Results Server) is a permanently-running process that accepts queries from Content Server, passes queries to the fsearch processes, and merges the results when there are multiple fsearch processes running.

The index server can run in continuous mode or in a special mode called suspended mode. In suspended mode, FIXML is generated for any updates
to the index but not integrated into the index. When the index server is taken out of suspended mode, the index is updated. Running in suspended mode; speeds up the indexing process. Suspended mode should be used when the requirement is to index large volume of documents or to re-index an entire repository.

4.   Health check up for Index Server processes

Execute the following command through command prompt

nctrl sysstatus

This will list all the Index Server process with their status.

Another option is to use Index Server admin console through <a href=”http://localhost:/admin”>http://localhost:<portno.>/admin and navigate to “System Management” tab.

Navigate to “Matching Engines” tab for details on total no. of documents in all the filestores (if there are multiple repositories) and the no. of documents processed by Index Server. It also provides a link to Index Server log file.

5.   How to determine Index Server ports

Using the Index server base port we can determine the ports for various Index Server processes

Index Server admin console: Base Port + 3000

FAST Search console: Base Port + 2100

6.   Fulltext indexing queue messages

When a document has been marked and submitted for fulltext indexing, it is queued to the Index Agent/Index Server.

The fulltext index status can be checked by the following dql query:

select sent_by, date_sent, item_name, content_type, task_state, message from dmi_queue_item where item_id = ”

The task_state can have one of the following values:

‘’ – The item is available to be picked up by an Index Agent for indexing.

‘acquired’ – The item is being processed. If an Index Agent stops abruptly, a queue item can be left in this state until the Index Agent is restarted or an Administrator clears the queue item.

‘warning’ – The item was indexed with a warning. Often it indicates that the content of the object failed to index but the meta-data was successfully indexed.

The ‘message’ attribute and the Index Agent log will have further details.

‘failed’ – The item failed to index, please refer to the ‘message’ attribute and the Index Agent log for more information.

‘done’ – Successfully indexed the item

7.   Index Agent Modes

An index agent may run in one of three operational modes:

normal

In normal mode, the index agent process index queue items and prepares the SysObjects associated with the queue items for indexing. When the index agent successfully submits the object for indexing, the index agent deletes the queue item from the repository. If the object is not submitted successfully, the queue item remains in the repository and the error or warning generated by the attempt to index the object is stored in the queue item.

migration

In migration mode, the index agent processes all SysObjects in a repository sequentially in r_object_id order and prepares them for indexing. A special queue item, the high-water mark queue item, is used to mark the index agent’s progress in the repository.

An index agent in normal mode and an index agent in migration mode cannot simultaneously update the same index.

file

In file mode, a file is used to submit a list of objects IDs to the index agent when a new index is created and index verification determines which objects are missing from the index.

8.   Switching modes of Index Agent

At the time of Index Agent set up the wizard gives an option to start the Index Agent under “Normal” or “Migration” mode.

The following steps should be performed to change the Index Agent from one mode to another.

1. Login to Index Agent Admin console through http://localhost:<index agent port no.>/IndexAgent<no.>/login.jsp

e.g., http://localhost:9081/IndexAgent1/login.jsp

2. Stop the Index Agent

3. Now change the Index Agent mode from Normal to Migration or Migration to Normal as the case may be.


4. Click on OK

5. Start the Index Agent again.

Note:

i) While in Migration mode Index Agent doesn’t appear in DA under Indexing Management tab. On the Index Agent admin screen it will provide the details of the no. of documents processed out of the total no. of documents.

ii) If the Index Agent service is restarted from services console then start the Index Agent from Index Agent Admin console or through DA under Indexing Management tab.

9.   Re-configuring Index Agent and FAST

Configuring another IA and FAST to a repository previously configured to work with one IA and FAST doesn’t modify dm_ftengine_config object and IA fails to start displaying error to connect to old FAST machine.

To resolve:

Manually update the dm_ftengine_config object based on the settings from the new machine

1. Go to IAPI and execute the following API –

iapi> retrieve,c,dm_ftengine_config

2. Note the object_id retrieved by the above API and use it to execute the following API –

iapi> dump,c,l

3. In the dump results note the following param_name, param_value pairs

fds_base_port should match 13000 or the base port number for Index Server Install

fds_config_host should match the host name where the Index Server is installed.

and so on….

4. The param_name/param_value pairs should be changed to match the values for the index server install.

5. Delete the following via dql:

delete dm_ftengine_config object where r_object_id = ‘old_value’

delete dm_ftindex_agent_config object where r_object_id = ‘old_value’

6. Run the index agent configuration program to create new index agent.

10.   Relocating fulltext indexes in Index Server

The following steps describe how we can change the location of fulltext indexes

 1. Shutdown the Index Agent

 2. Shutdown the Index Server

 3. Copy the indexes to the target location ( both the fixml and the index directories)

 4. Default location of the fixml and index directories:

      for Windows – %DOCUMENTUM%/data/fulltext

      for Unix –$DOCUMENTUM/data/fulltext

 5. Edit the following:

 In Windows:  %DOCUMENTUM/%fulltext/IndexServer/etc/searchrc-1.xml. Change the “index path”

 In Unix: $DOCUMENTUM/fulltext/IndexServer/etc/searchrc-1.xml. Change the “index path”

6. Edit the following:

 In Windows: %DOCUMENTUM%/fulltext/IndexServer/etc/config_data/RTSearch/ webcluster/rtsearchrc.xml. Change fixmlpath and fsearchdatasetdir to the new path

 In Unix: $DOCUMENTUM/fulltext/IndexServer/etc/config_data/RTSearch/webcluster/rtsearchrc.xml. Change fixmlpath and fsearchdatasetdir to the new path

 7. Startup IndexServer, Index Agent

11.   dm_FTCreateEvents Job

The Create Full-Text Events tool (dm_FTCreateEvents) may be used in two ways:

 a) To complete an upgrade by causing any objects missed by the pre-upgrade indexing operations to be indexed.

 The job generates events for each index able object added to a repository between the time a new 5.3 or later full-text index is created for a 5.2.5 repository and when the repository is upgraded to 5.3.

 This is the out-of-the-box behavior of the job.

 b) To generate the events required to re-index an entire 5.3 SP1 or later repository.

 Re-indexing the repository does not require deleting the existing index.

Please refer to the screenshot for the configuration of dm_FTCreateEvents Job –

To generate the events required to re-index an entire 5.3 SPx or later repository the -full_reindex argument must be set to TRUE to generate the required events.

The first time the job runs in its default mode, the job determines the last object indexed by an index agent running in migration mode and the date on which that object was indexed. The job searches for objects modified after that date and before the job runs for the first time and generates events for those objects. On its subsequent iterations, the job searches for objects modified after the end of the last iteration and before the beginning of the current iteration.

Before the job is run in a 5.3 SP1 or later repository with argument –full_reindex set to TRUE, you must create a high-water-mark queue item (dmi_queue_item) manually using the API –

create,c,dmi_queue_item

save,c,l

and specify the r_object_id of the queue item as the -high_water_mark_id argument of the dm_FTCreateEvents Job.

In case you get the following error message in the job’s report –

FTCreateEvents was aborted. Error happened while processing job. Error: No high water mark found for qualification:

Verify the -high_water_mark_id attribute and check whether the API was executed after installation or re-installation of the index server to get the required r_object_id argument.    

Disable the job if the application is not using Full Text Index Server.

The job can also be de-activated if the following events are registered for dm_fulltext_index_user’

  • dm_save
  • dm_destroy
  • dm_readonlysave
  • dm_checkin
  • dm_move_content

Execute the following query to verify the same:

select event from dmi_registry where user_name=’dm_fulltext_index_user’ 

12.   Using FT Integrity Tool

Modify the parameter file:

a) Login to the index server. Navigate to the parameter file location.
On Windows, Drive:\ProgramFiles\Documentum\IndexAgents\IndexAgentN\webapps\IndexAgentN

b) Open the ftintegrity.params.txt file in a text editor.

The first line is  -D repositoryname

where repositoryname is the repository for which you created a new index.

c) Add the following two lines immediately after the first line

-U username

-P password

where username is the user name of the Superuser whose account was used to install the index agent and password is the Superuser’s password.

 d) Save the  ftintegrity.params.txt file to %Documentum%\fulltext\IndexServer\bin  (Windows).

Sample FT Integrity params file

Note: The instruction above save a Superuser name and password to the file system in a plain text parameter file. For security reasons, you may wish to remove that information from the file after running the FTIntegrity tool. It is recommended that you save the parameter file in a location accessible only to the repository Superuser and installation owner.

 To run the index verification tool:

  1. Navigate to %Documentum%\fulltext\IndexServer\bin (Windows) or
  2. To verify both completeness and accuracy, open a command prompt and execute

           cobra ftintegrity.py -i ftintegrity.params.txt -m b

  1. To verify completenes only, open a command prompt and execute

           cobra ftintegrity.py -i ftintegrity.params.txt -m c

  1. To verify accuracy only and query all indexed objects, open a command prompt and execute

           cobra ftintegrity.py -i ftintegrity.params.txt -m a

FT Integrity generates 3 reports

res-comp-common.txt – object id of all documents that are found in both index and repository.

res-comp-dctmonly.txt – object id of documents that are in repository but not indexed

res-comp-fastonly.txt –object id of documents in index but not in repository.

It also generates ftintegrityoutput.txt file which is nothing but the console output generated in the text format.

 To resubmit objects that failed indexing:

a) Navigate to %DOCUMENTUM\fulltext\indexerver\bin.

b) Copy the res-comp-dctmonly.txt file to

drive:\Program Files\Documentum\IndexAgents\IndexAgentN\webapps\IndexAgentN\WEBINF\classes.

c) Rename the res-comp-dctmonly.txt file to ids.txt

The index agent periodically checks for the existence of ids.txt. If the file is found, the objects are resubmitted for indexing.

13.   Moving From Index Server 5.3 SPx to D6.5 SPx

 a) Index Server D6.5 can use indexes created by a 5.3 SPx Index Server. This reduces the overhead of indexing the entire repository during upgrade.

 While uninstalling Index Server 5.3 SPx leave the checkbox for deleting the Indexes unchecked. Then during D6.5 Index Server installation point it to the existing indices folder as data folder.

b) While upgrading from 5.3 SPx to D6.5 Index Server the data folder, if the indices from 5.3 are preserved, should be on the same drive as the Index Server home directory.

c) The path for attribute mapping xml is $Documentum\ fulltext\fast as against $Documentum\fulltext\fast40 folder in 5.3 SPx

 This path should be correct in dm_ftengine_config object for index based search to function properly.

d) Index Agent in D6.5 uses 20 consecutive ports as against 1 port in 5.3 SPx. i.e. If Index Agent 1 is running at port 9081 then Index Agent 2 cannot take any ports from 9081 to 9100.

e) D6.5 doesn’t provide an option to switch Index Agent between different modes using Index Agent admin console.

f) The params file for using FT Integrity tool is placed under $Documentum\jboss4.2.0\server\DctmServer_IndexAgentN\deploy\IndexAgentN.war

Accordingly the ids.txt file should be placed under $Documentum\jboss4.2.0\server\DctmServer_IndexAgentN\deploy\IndexAgentN.war\WEB-INF\classes

Hope this Post is useful for all those developers who needed more and step by step info on Index Servers.

Publish Content to a website using Documentum Web Publisher

September 30, 2011 1 comment

Today’s global companies produce an enormous amount of content.  Web sites and portals are the first avenue to distribute this business information to all major stakeholders. Web content management has become a primary strategy to help organizations communicate more effectively with their key audiences. Ineffective web content management can significantly undermine company messaging, decrease sales, increase staffing requirements, and raise operational costs and risks.

This post briefly discusses the need for web content management and the solution provided by documentum. It also describes how to publish content to a website using Documentum Web Publisher.

Documentum Web content management solution

Documentum provides an enterprise content management approach for managing all unstructured data including documents, web pages, XML, and rich media throughout the organization. Documentum web content management system is built on this underlying architecture to support management and publishing of all unstructured content types.  It can drive down costs, simplify the management of multiple sites, and increase productivity for the creation, approval, and publishing of content, ultimately delivering a superior user experience to raise customer satisfaction and revenues.

  Key components:

  • Web Publisher

Web Publisher is a browser-based application that simplifies and automates the creation, review, and publication of web content. It works within Documentum 5, using Documentum Content Server to store and process content. It uses Documentum Site Caching Services (SCS) to publish content to web.  Web Publisher manages web content through its entire life: creation, review, approval, publishing and archiving. Web Publisher also includes a full complement of capabilities for global site management, faster web development using templates and presentation files, administration. Web Publisher can be integrated with authoring tools to develop web sites. 

  • Documentum Content Server

Content Server stores content and meta data in a repository called docbase. It provides full set of content management services, including library services (check in and check out), version control, archiving options and process management features such as workflows and lifecycles. It also provides secure access to the content stored in the repository.

  • Site Caching Services

Documentum Site Caching Services  (SCS) publish documents directly from a docbase to a web site. It extends the capabilities of content server. It has two components, source software and target software. The source software has to be installed on content server host and target software on web server. SCS chooses which content to publish and to what location according to the parameters in a publishing configuration. User can create publishing configurations in Documentum Administrator.

  • Site Deployment Services

Site Deployment Services, retrieves the web site from the Site Caching Services repository and deploys the site to multiple servers or Internet Service Providers.

Related Solutions:

The Documentum web content management solution is strengthened by complementary products that address more sophisticated web challenges such as rich media authoring environments, better searching and navigation, better collaboration, portals, and records management for compliance.

  • Content Intelligent Services

            Content Intelligent Services provides better searching, navigation and personalization for the large amount of web content.

  • Content Rendition Services

Content Rendition Services automates the conversion of standard desktop document formats into Web-ready formats such as PDF and HTML and stores the renditions in a Documentum repository alongside the original.

  • Content Media Services

Content Media Services performs all analysis and transformations activities for any media file format.

  • Web Publisher Portlets

This is the portal solution offered by documentum.  Web Publisher portlets allow users to participate in fundamental, content-based business processes without leaving their familiar portal environments or learning a new application and include three out-of-the-box portlets that are also fully customizable: My Web Publisher, Submit Content, and Published Content.

  • My Web Publisher – provides a personalized view, allowing users to easily see vital information such as the number of unread tasks and notifications
  • Submit Content – displays all Web Publisher templates that an end user is allowed to access and summarizes files that have been created, published, and checked out
  • Published Content – provides users with a list of documents in an active published state and grouped by category such as announcements, corporate news, or human resources (HR)
  • Record Management Solution – Record management solution helps companies to comply with regulations governing electronic information.
  • eRoom –  eRoom is a web based collaboration tool that allows people to work together on content, projects, and processes both within the enterprise and beyond. This may include external entities such as partners, suppliers, customers, and clients.
  • Inter enterprise workflow services – With Inter enterprise workflow services, documentum workflows can be extended across a company’s firewall to include business partners. It also enables integration of documentum workflows with workflow engines, including EAI and BPM systems as well as with workflows from other enterprise applications. 

Publishing Content to a Website

Traditionally web teams or IT departments manage web sites manually. Web teams are overwhelmed with demands to constantly publish new content and ensure higher quality standards while managing hundreds of thousands of web pages across external websites and portals. To overcome these challenges, organizations need to empower business content owners to author and publish content. Providing content templates can help in maintaining brand integrity across all sites. Companies should also ensure that content is reviewed and approved before it is published.  Organizations can achieve consistency and quality with out burdening web teams with costly and time intensive manual updates by having a web content management solution.  We will see how this can be achieved using documentum as a web content management tool.

Web teams can create web sites using Web Publisher. Web sites created are stored in web cabinets. Web administrator can create groups, which define specific job functions like content authoring, reviewing and add users to these groups. Web developers can design content templates, assign a life cycle and workflow to the template and make it available for use via web using Web Publisher. Life cycle identifies the state of a document.  Web Publisher default life cycle has following states: Start, WIP, Staging, Approved and Active.                       

  • Start

When content is newly created or newly versioned, Web Publisher places it in the Start state, for initialization purposes, and then immediately promotes it to the WIP state.

  • WIP (Work In Progress)

Content in draft or review.

  • Staging

Content that is complete and ready for testing on a staging Web site. By default, Web Publisher does not allow users to modify a file’s content, location or properties if the file has advanced to the Staging state or beyond.

  • Approved

Content that is approved for the active Web site but has not yet reached its publication date (i.e., effective date).

  • Active

Content that is on the active Web site.

A workflow defines activities to be performed on content. It defines the users who will perform the set of activities. Workflow can also include automatic tasks, which are performed by the system. For example, an automatic task might promote a file to a new lifecycle state. Using Web Publisher, web teams can create workflow templates, which can be later be reused for any content type.

Content authors can create content based on content templates to which a life cycle or workflow is assigned. The content templates help companies to maintain brand integrity. Review and approval of content can be automated using workflow. Thus enterprises can control what content is created, by whom, and in what manner.

Once the content is approved it has to be published. Content owners can publish content using Web Publisher. For this, a publishing configuration has to be created for the web site. This is done using documentum administrator. User can have separate publishing configurations for different life cycle stages (WIP, Staging and Active stages) for each web cabinet. Each publishing configuration publishes to a separate target location: the WIP and Staging sites are for internal testing; the Active site is the live web site. Users would access the WIP and Staging sites through the Web Publisher preview command or a URL.

If a web site is created in multiple file formats or languages, use the publishing configuration to determine what format or language is published to a given web server. For example, suppose product.htm has three renditions: product.htm, product.xml, and product.wml. User can create two publishing configurations for the site: one that publishes HTML, GIF, and CSS files, and another that publishes WML files (Product.xml is used for development and is not published).

When a publishing configuration is created, SCS automatically creates a publishing job.

         SCS publish operation can be initiated when any of the following occur:

  • When the publishing job’s regular interval occurs.
  • When a user manually publishes content through the Publish command.
  • When content is manually or automatically promoted to Staging or Active state. Promotion initiates the publishing operation only if the web site is configured to use synchronous publishing. Manual promotion occurs when a user either promotes content to the next lifecycle state or power promotes content to the Approved lifecycle state. Automatic promotion occurs when Web Publisher promotes content through an automatic workflow task or through the arrival of the content’s effective date. If a web page reaches the approved state after the effective date is met, the page is published the next time the site is updated.
  • When a user previews content in the WIP or Staging states to see how it will appear on the web. Web Publisher initiates the publishing operation if the content has been modified since the last publishing job ran.

Web Publisher removes web pages from web sites when the pages meet their expiration dates. Steps to create and publish content to a website   are given below.

Steps to Create and Publish Content to Website

  1.       Log in to Web Publisher as administrator.
  2.       Go to Administration->User Management-> Users
  3.       Add users to docbase. Refer Web Publisher help for more details.
  4.       Add users to content author, content manager, administrator groups
  5.       Assign the Client Capability of content author user to contributor.
  6.       Assign the Client Capability of content manager user to coordinator.
  7.       Assign the Client Capability of administrator to system administrator.
  8.      Create a workflow template using workflow manager.  User can either use the desktop version of workflow              manager or web version that can be accessed from Web Publisher.

Web Publisher provides default workflow templates. For e.g. Submit to Web site, which is a simple workflow, is used to publish content to a web site. When starting this workflow, the content manager specifies an author to work on the content. The task appears in content author’s inbox. Content author modifies the content and forwards it to the manager for review. Web Publisher promotes the content from WIP to Staging prior to review. If the reviewer rejects the task, Web Publisher demotes it to WIP and routes it back to its originator. If a reviewer approves the task, Web Publisher routes the content to an approver and the content is promoted to Approved Stage. Once content is approved it is automatically promoted to Active stage and is published to the website.

To start creation of a workflow template using desktop version of workflow manager

a) Open Workflow Manager.

b) Log in to Workflow Manager as Web Publisher administrator. A Web Publisher administrator should have superuser permissions.

c) Choose File->Open. Browse to System->Applications->Web Publisher folder and select a Web Publisher default workflow.

    For example, Submit to Web site. This opens a default Web Publisher workflow on which to base custom workflow.

d) Choose File->Save As and save the workflow with a name that represents the workflow.

                All workflows must be saved in System->Applications->WebPublisher-><user_defined_workflow_folder>.

               Create a new folder or save workflows to the Web Publisher root folder.

e) Validate the template.

f) Install the new workflow template

g) Make it available through Web Publisher.

For more information on creating workflows, refer to Workflow Manager User Guide.

To access workflow manager from Web Publisher, log in to Web Publisher as a Web Publisher administrator.

Select Web Publisher Admin->Workflow templates and repeat the steps from c to g

9.     Create a new category under Templates in Web Publisher

          10.   Import a template to the new category that is created. Template provides layout for content.

          11.    Assign default life cycle and the newly created workflow to the template.

          12.    Make the template available for use.

          13.   Create a web cabinet in Web Publisher

          14.   Create a folder in web cabinet

          15.   Create content using the newly created template in Web Publisher

            16.  Create a site publishing configuration in documentum administrator

                          i) Start Documentum Administrator and connect to the docbase as a superuser.

                          ii) Click Site Publishing.

                          iii) Create a new site-publishing configuration.

                          iv) Set values in the site-publishing configuration:

                             a) Click Active.

                             b) In the Version field, type Active.

                             c) Click Publishing Folder and browse the Docbase to the website folder (web cabinet).

                             d) Type the target host name. This is the host where the SCS target software is installed.

                             e) Type the target port for making connections to the target host. The port entered must match the port          

                                 specified at the time of installation of SCS (DefaultPort, 2789)

                             f) Type the target root directory to which user wants to publish the content. To publish web pages to

                                  Apache Tomcat, give this as target directory:

                                         C:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT

                            g)  Choose the connection type.

                            h)  Click the Advanced tab.

                            i)  Select a new export directory or leave the default unchanged.

                            j)  Type the transfer user name, password, and domain. Enter the transfer authentication domain name that

                                 was provided during SCS target installation. Enter a valid username and password.

                           k) Click Ok.

17.  Log in to Web Publisher as content manager

18.  Start the new workflow using Web Publisher

a.      Navigate to the content created.

b.        Select the checkbox.

c.         Go to Tools

d.        Select Workflow -> Start  

e.      Assign a content author and web admin

19.  Workflow tasks will appear in user’s inbox

20.  User can accept and forward the task to next user or reject it

21.  Content is automatically published to web site once it is approved.

I would conclude in writing  Documentum provides an enterprise approach to transform online presence and drive ROI. It provides an easy-to-use, browser-based interface that empowers non-technical users to easily create, manage, and publish content for multilingual web sites and portals. This solution is suitable for medium to large size companies.

Presets in Documentum 6.5

June 9, 2011 1 comment

WDK (web development kit) customizations have been part and parcel of all custom Documentum WebTop applications. The customizations includes copying the WDK components (XMLs, JSPs, custom class etc) into the custom layer. Until version 5.3 SP6 there were no Documentum out of the box features that allowed developers to perform basic customization without having to customize the WDK components manually.

Documentum 6 and above version presented the idea of “Presets”. This versatile out of the box feature in Documentum enable Documentum developers to perform basic WDK customization/configuration with a few clicks of the mouse.

This Post  deals with the basics of Documentum presets and demonstrates a sample preset configuration.

Presets

Presets are out of the box feature in Documentum which enable Documentum developers to perform basic WDK customization/configuration with a few clicks of the mouse.Presets are easy to apply rules or configurations that can be created to bring in WDK configurations and setting without having to configure JSP’s pr XML’s manually. Though presets cannot completely replace WDK customizations, they certainly save time when used to make simple and common WDK changes in Documentum WebTop application.

Below an attempt is made to explain the various options available for presets and the way to configure them. Though all the options are being touched upon, for simplicity I am picking up an example preset which I will be using to disable the “FileàNewàDocument” option for all users except administrators.

 1. Presets option is available in Documentum WebTop once you have logged in as Documentum administrator. It can be seen in the left browser tree under Administration–>Presets

  1. When clicked on “Presets” the right panel will display the list of Presets if any exists.
  2. Use the menu bar option File–>New–>Preset to configure a new Preset

3. This will pull up a screen with the “Setup” tab pre selected. This screen offers the user with four options as shown below.

4. The four options are as follows

  1. Apply to User/Group/Role: This option enables us to configure a preset for a specific user/group or role. For example to configure a preset which would disable “Fileà NewàDocument” option for all users except the members of “admingroup” group, this would be the option to be selected.
  2. Apply to existing location: This option enables us to configure a preset for a specific location. For example if anyone wants to configure a preset that would enable /disable navigations or menu bar options for a particular folder or cabinet this would be the option to be selected.
  3. Apply to specific type: This option enables us to configure a preset for a specific object type. For example if anyone wants to configure a preset for dm_document( or any custom ) object type alone then this would be the best option.
  4. Apply to specific repository: This option enables us to configure a preset at the repository level. For example if anyone wants to configure a preset which would display only custom object types while creating a new document in WebTop for all users who are logged into a repository (docbase) then this would be the option they have to look into.

5. To continue with the steps, here we would be continuing by using option a mentioned above. Using this we would try to create a preset such that “FileàNewàDocument” option is disabled for all users who are members of “admingroup” group.

6. In the screen shown in step 4 click on “Select…” button for Apply to User/Group/Role: option. A screen as shown below will be pulled up to select the required group. In this example we will be selecting “admingroup”.Filter the required group and select it. Click OK

7. Once the group is selected, the next step would be to move to the “Rules” tab. Provide the “Preset name” and “Description” textbox and then click on Next button to move to “Rules” tab.

8. The “Rules” tab will present us with a screen which allows us to configure various entities with respect to the group we selected.

 Note : In this case these entities can be applied for group. As mentioned before (step 5) the same set of entities can be applied for other options,  that is the rules can be applied for type, docbase or location as well.

9. The above screen displays the following rules. For each rules there are configurations/actions that can be selected. Most of the options are self explanatory.

a. Permissions

b. Formats

c. Types

d. Groups

e. Workflows

f. Lifecycles

g. Templates

h. Actions

i. Navigation

j. Attributes

10 .Here since we are going to disable the menu item “File–>New–>Document” we will be selecting the option “Actions

11. When the option action is selected, an “Action Selector” drop down is presented to the user. We have the option to select a particular action and then add them to the “Excluded” list. Here we will be selecting the action “File–>New–>Document”.

12. Click “Finish” .The new preset is created and this will be visible in the Presets list. Refer image below.

13. The comparison between the screen shots taken for “File–>New–>Document” action before and after the preset is created.

Note: As mentioned in the steps above various kinds of Presets can be created. While planning to create presets, one thing to be borne in mind is that if a preset is applied to a group, location, docbase or type, it is not possible to create another preset for the same group, location, docbase or type.

More Details and Limitations of presets

Please refer Documentum WebTop release notes for more details and to know about limitations of presets.

  1. Presets are created as dmc_preset_package objects in Documentum
  2. WebTop presets reside in Documentum under the location given below    “Cabinets/Resources/Registry/Presets/Webtop/Preset Packages”
  3. A preset can be queried using the DQL select * from dmc_preset_package where object_name like ‘%<name of preset>%’

Any Points missed please mention it in the comments , will refresh the Post.

Configuring Documentum WebPublisher

June 7, 2011 Comments off

There has been a lot of Emails floating to me these days regarding  Documentum WebPublisher Configuration and Setup. I myself being newbie to WebPublisher could not reply back , so thought of coming back with a research and small Proof-Of-Concept at my end.

Before we start discussing about Documentum WebPublisher (WP) Configuration , here are few of the Pre-Requisites we need to take care:

The following Software / Components have to be installed before the actual services are installed:

  • Application server (e.g. Tomcat server) into Target Web Server
  • Database Server (e.g. MS SQL server)
  • Documentum Content Server
  • Web Publisher Server Files on Content Server
  • Web Publisher on target Web Server
  • Site Caching Service (SCS) Source on Content server
  • Site Caching Service (SCS) Target on target Web server

Documentum WP helps in Publishing the content from Documentum repositories.

Steps to create  &  publish the content:

 1.Create a workflow template using workflow manager.  User can either use the desktop version of workflow manager or web version that can be accessed from Web Publisher.

 To start creation of a workflow template using desktop version of workflow manager

 a) Open Workflow Manager.

b) Log in to Workflow Manager as Web Publisher administrator. A Web Publisher administrator should have super user permissions.

c) Choose File->Open. Browse to System->Applications->Web Publisher folder and select a Web Publisher default workflow. For example, Submit to Web site. This opens a default Web Publisher workflow on which to base custom workflow.

d) Choose File->Save As and save the workflow with a name that represents the workflow. All workflows must be saved in System->Applications->WebPublisher-><user_defined_workflow_folder>. Create a new folder or save workflows to the Web Publisher root folder.

e) Validate the template.

f) Install the new workflow template

g) Make it available through Web Publisher.

To access workflow manager from Web Publisher, log in to Web Publisher as a Web Publisher administrator.

Goto Administration – > Web Publisher Admin->Workflow templates and repeat the steps from c to g.

2.    Create a new category under Templates in Web Publisher. Goto Site Manager -> Templates and create.

3.    Import a template to the new category that is created. Template provides layout for content.

4.     Assign default life cycle and the newly created workflow to the template.

5.    Make the template available for use.

6.    Create a web cabinet in Web Publisher.

7.    Create a folder in web cabinet.

8.    Create content using the newly created template in Web Publisher.

9.    Create a site publishing configuration in documentum administrator

             i.        Start Documentum Administrator and connect to the docbase as a superuser.

            ii.         Click Site Publishing.

           iii.        Create a new site-publishing configuration.

      iv.        Set values in the site-publishing configuration:

a.    Click Active. In the Version field, type Active.

b.    Click Publishing Folder and browse the Docbase to the website folder (web cabinet).

c.    Type the target host name. This is the host where the SCS target software is installed.

d.    Type the target port for making connections to the target host. The port entered must match the port specified at the time of installation of SCS (DefaultPort , 2789)

e.    Type the target root directory to which user wants to publish the content. To publish web pages to Apache Tomcat, give this as target directory:

C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ROOT

f.     Choose the connection type.

g.    Click the Advanced tab. Select a new export directory or leave the default unchanged.

h.    Type the transfer user name, password, and domain. Enter the transfer authentication domain name that was provided during SCS target installation. Enter a valid username and password. Click Ok.

10. If the content that is created is not in a web-safe format, then convert it into web-ready format. This is done

a.    Login to WP as administrator and go to the Administration -> Web Publisher Admin -> Settings -> File Formats and define the file formats as “Web formats”, they will then be recognized as Web-safe formats.

b.    Set  a_special_app field of that content equal to “2” by update statement in DQL.

DQL query—

Update dm_document OBJECT SET a_special_app=’2’ where r_object_id=’<object id of the content which you want to publish>’

11. Log in to Web Publisher as Administrator.

12. Start the new workflow using Web Publisher.

13. Navigate to the content created.

14. Select the checkbox

15. Go to Tools

16. Select Workflow -> Start  

17. Assign a content author and web admin as administrator.

18.  Workflow tasks will appear in user’s inbox.

19. User can accept and forward the task to next user or reject it.

20. In Documentum Administrator, browse to the respective site configuration created. Select it and can then goto  tools tab ->Publish. Content is automatically published once it is approved.

Could not compress the article further , appreciate your patience, Hope the Post is useful and clarifies all the doubts as to How to Configure WP.

Awaiting Comments.

Installing Documentum TBO using Composer

May 12, 2011 3 comments

Introduction:

The Business Object Framework (BOF) is a set of functionality that provides ability to hook into any of the methods in the standard DFC object interfaces.

BOF’s are of two kinds:

  1. Type Based Object(TBO)
  2. Service Based Object(SBO)

TBO’s are used when only one object type needs its functionality overridden whereas, we use a SBO when the functionality is overridden for different object types or in case we want to use the functionality in many other TBO’s.

The main use of TBO is the ability it gives a developer to override selected functionality of the DfSysObject or any of its child types.

Module 1: Creating the TBO

Steps to be followed for creating a TBO jar

  1. Create a java class using the same name as the object type.
  2. The java class will have to extend DfDocument and will have to override its 4 functions getVersion, getVendorString (), isCompatible (String s) and supportsFeature (String s)
  3. Then it will have to override the function that the tbo is needed for example doSave () etc.
  4. Compile this class and make a jar of it.

Module 2: Installing the TBO

Steps for installing the TBO in the docbase

  1. Create a new Documentum project in Composer
  2. Right Click on Artifacts and select New>>Other. In the New screen select Documentum Artifact>> Jar
    Definition

 

Click on Next, and in the Artifact name field enter the name of the object type and click finish

 3. Now for configuring the new jardef that we created. Since we have created only an implementation of the TBO, select Type field as Implementation. And  in the jar content browse and choose your jar file that was created in the Module 1.

4. Right Click on Artifacts and select New>>Other. In the New screen select Documentum Artifact>> Module

Click on Next, and in the Artifact name field enter the name of the object type and click finish

5. Now for configuring the new module that we created. In the Info tab select TBO from the drop down menu for Type.

6. In the Core JARs tab select Add for Implementation JARs and select the jardef created in previous step. Now click on Select in front of class Name this will display the class details of the jar in the jardef select the appropriate class.

7. Right click on Project and select the “Install Documentum Project” menu item.

Enter the username and password and click on Login button. The user will be authenticated and the Next and Finish buttons will become active. Click Finish to install the TBO into the docbase. This may take some time.

 Now whenever an object of the type for which the TBO was created is invoked or created the TBO will be fired. The TBO can be found at Cabinets>>System>>Modules>>TBO

 Module 3: Re-Installing the TBO

In case the java class has been modified, then the TBO needs to be re-installed. The steps to re-install TBO are as follows

  1. Delete the folder with the TBO name in the location (Cabinets/System/Modules/TBO)
  2. Recreate the jar using the new java file.
  3. In Composer remove the jar file from the jardef and add the new jar file
  4. Reinstall the Project to the docbase.

Uploading Document In Documentum Through Java

April 13, 2011 1 comment

Document management is a requirement in many applications and documentum is a widely used document management system. Document management starts with document upload. Once a document is uploaded it can be associated with workflow and lifecycle. In addition to this, different versions of the document can be created and maintained. This document focuses on saving documents with metadata in the documentum using java and JSF.

An object or document in documentum can be considered to be a combination of metadata and physical file. A content model that defines the attributes of the document can be created in the documentum. This can be used to refer to the attributes that are associated with the document.

FLOW:

A Documentum object has to be created before storing data in the Documentum.

Following are the steps to do the same.

1. Get the session for the user who is creating the object

Sample code to get the session object

// Getting the clientIDfClient client =DfClient.getLocalClient();

// Preparing IDfLogininfo object with the user credentialsIDfLoginInfo loginInfo = new DfLoginInfo();

// Set the UserloginInfo.setUser(“<userid>”);

// Set the passwordloginInfo.setPassword(“<password>”);

// Get the session managersessionManager= client.newSessionManager();

// set the user identity for the session managersessionManager.setIdentity(“”,loginInfo);

// Get the IDfSessionIDfSession session = sessionManager.getSession(“”)
2. Create a documentum object Before uploading a document, a place holder for the document, with an identifier has to be created in the documentum.

Given below is the sample code for doing the same.

IDfDocument documentObj = (IDfDocument)session.newObject(“name_of_the_contentmodel”);

documentObj.setContentType(“crtext”);

documentObj.save();

where,“name_of_the_contentmodel” , is the type of the object to be created.

“crtext” is the documentum format for a text file.

Setting the content type for the file to be uploaded is mandatory.

On creating a new object, a unique identifier, say objectId is generated.

It can be obtained using “documentObj.getObjectId()”.

Once the object is created, it can be accessed using methods of the Interface,

IDfSysObject.IDfSysObject sysObject = (IDfSysObject)session.getObject(new DfId(documentObj.getObjectId());

where, documentObj.getObjectId() is the documentum object.

Saving Metadata

Document attributes obtained from UI or otherwise can be set and then saved in the documentum using the object reference, sysObject as shown below.

sysObject.setString(identifier for the attribute in the documentum , value for the attribute).

sysObject.setInt(identifier for the attribute in the documentum, value for the attribute)

sysObject.setTime(identifier for the attribute in the documentum, new DfTime(date))

Attaching repeating values(List of objects) , to a property of the documetum object

for (Object value : repeatingValues){

document.appendValue(identifier for the attribute in the documentum,new DfValue(value,sysObject.getAttrDataType(identifier for the attribute in the documentum)));

}

}

sysObject.save()

sysObject.save(), saves the attributes in the documentum.

Uploading file:

UI

In JSF, hx:fileUpload can be used to browse and select a file. This tag accepts data in the form of an array of bytes.

Code in the .jsp file

<hx:fileupload id=”fileupload1″ value=”#{managedBeanName.fileData}” >

<hx:fileProp name=”fileName” value=”#{ managedBeanName.uploadFileName}”/>

<hx:fileProp name=”contentType” value=”#{ managedBeanName.format}”/>

hx:fileupload>

private byte[] fileData = null;—-property in the managed bean to store the content of the file.

private String uploadFileName = null;—-property in the managed bean that stores the file name.

private String format = null;—-property in the managed bean that stores the file format.

Sample java code for saving the file content in the Documentum

FileOutputStream fileOutputStream = null;

ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();

byteArrayOutputStream.write(fileData);

IDfSysObject sysObject= (IDfSysObject)session.getObject(new DfId(documentObj.getObjectId());

sysObject.setContent(byteArrayOutputStream);

sysObject.setContentType(format)sysObject.save();

byteArrayOutputStream.flush();

byteArrayOutputStream.close();

where, sysObject is the reference to the Documentum object , that will hold the uploaded data and “format” is the format of the file to be uploaded .

Setting contentType is mandatory and the format of the file has to be mapped to Documentum format using resource bundle. The uploaded file, with its attributes can be viewed through the Documentum administrator.

%d bloggers like this: