Deleted document participating in a workflow

October 29th, 2008 Sarath Akkineni Posted in DCTM 2 Comments »

Many of you would have already encountered this issue dealing with workflows in Documentum. Deleted documents in a workflow can be an administrative nightmare! Documentum does not gracefully handle deleted documents participating in a workflow.

The following errors are encountered when users try to complete tasks with deleted documents in them:

[DM_WORKFLOW_E_MANU_PACKAGE]error:  ”Failed to manufacture packages for activity Review (20) of workflow (4dxxxxxxx0002500).”

[DM_WORKFLOW_E_BINDING_PACKAGE]error:  ”Package binding failed because no object could be identified by package ID (09xxxxxxx000b3a9) with package label CURRENT.”

4d01817c80002500 – Identifies the workflow in progress and

0901817c8000b3a9 – Identifies the document that was deleted

The following procedures can be followed to handle this issue:

Procedure 1:

This procedure is executed strictly using Documentum DQL and API with no direct updates to the database.

  • Removing the packages affected from the work items
  • Add existing documents into new packages
  • Attach the package to the work items
  • Attach the existing comments (notes) to the packages
  1. Get the workitem detailsselect wi.r_object_id from dmi_workitem wi, dm_activity act where wi.r_workflow_id=’4d01817c80002500′ and act.object_name = ‘<name of the task that >’ and wi.r_act_def_id = act.r_object_id
  2. Get the package details and

select r_object_id, r_component_id, r_note_id, r_package_name, r_package_type, r_port_name, r_note_flag from dmi_package WHERE r_object_id IN (select pack.r_object_id from dmi_workitem wi, dm_activity act, dmi_package pack where wi.r_workflow_id=’4d01817c80002500′ and act.object_name = ‘OPS Review’ and wi.r_act_def_id = act.r_object_id and pack.r_workflow_id = wi.r_workflow_id and pack.r_act_seqno = wi.r_act_seqno)

Remove the package
removepackage,c,4a01817c80002d04,’DocumentPackage’

addpackage,c,4a01817c80002d04,’DocumentPackage’,'gf_document’,’0901817c8000b3c0,0901817c8000b3a9,0901817c8000b53d’

addnote,c,4101817c8000bd13,4901817c80002d0b

Procedure 2:

This procedure involves retrieving all the packages that contain the deleted document and updating the database.

Execute the following DQL statements:

  1. Retrieve the Chronicle ID of the document deleted.SELECT DISTINCT r_component_chron_id FROM dmi_package WHERE ANY r_component_id = ‘09xxxxxxx000b3a9

  2. Review the state of the workflow and gather the list of activity sequence numbers of the packages and the list of work items that need to be cleaned up.SELECT wi.r_object_id, act.object_name, wi.r_act_seqno, pack.r_object_id FROM dmi_workitem wi, dm_activity act, dmi_package pack WHERE wi.r_workflow_id=’4dxxxxxxx0002500‘ AND wi.r_act_def_id = act.r_object_id AND pack.r_workflow_id = wi.r_workflow_id AND pack.r_act_seqno = wi.r_act_seqno

  3. Query the packages that need to be cleaned up using the list of activity sequence numbers and the chronicle ID of the document retrieved above.SELECT pack.r_object_id FROM dmi_workitem wi, dm_activity act, dmi_package pack WHERE wi.r_workflow_id=’4dxxxxxxx0002500‘ AND wi.r_act_def_id = act.r_object_id AND pack.r_workflow_id = wi.r_workflow_id AND pack.r_act_seqno = wi.r_act_seqno AND wi.r_act_seqno IN (list of activity sequence numbers retrieved above) AND ANY pack.r_component_chron_id = ‘Chronicle ID retrieved above

The r_component_id and r_component_chronicle_id in the package play the following roles:

  • r_component_id is used by Documentum Webtop to list all the documents in the package
  • r_component_chron_id is used by the Documentum Webtop to group workflow comments displayed in the task manager

Both these attributes need to be updated to NULL for Documentum Webtop to process the workflow without any problems.

Execute the following SQL statements on the database:

  1. Update the package list retrieved aboveUPDATE dmi_package_r
    SET r_component_id = NULL, r_component_chron_id = NULL
    WHERE
    r_object_id IN (List of Package IDs retrieved above)
    AND r_component_chron_id = ‘Chronicle ID retrieved above
AddThis Social Bookmark Button

Installing multiple Apache Tomcat instances for WDK Applications

December 21st, 2007 Sarath Akkineni Posted in DCTM, ECM No Comments »

Let us assume that an Apache Tomcat instance (Tomcat1) is currently installed as a windows service on an application server that uses port 80. There is a need to launch another Apache Tomcat instance (Tomcat2) as a windows service that uses port 7001.   

The following steps need to be performed:

  1. Download the Tomcat deployment package and extract it onto the application server, say C:\jakarta-tomcat-5.0.28 (Tomcat2)
  2. Modify the server.xml (Tomcat2) changing the port numbers making sure they do not colliode with the port numbers specified in server.xml (Tomcat1)
  3. Create a environment variable CATALINA_HOME2=C:\jakarta-tomcat-5.0.28
  4. Modify the Tomcat startup/shutdown scripts to change the CATALINA_HOME to CATALINA_HOME2
  5. Install the windows service using the following command:

    Tomcat5.exe //IS//Tomcat51 –StartClass org.apache.catalina.startup.Bootstrap –StopClass org.apache.catalina.startup.Bootstrap –StartParams “-config;C:\jakarta-tomcat-5.0.28\conf\server.xml;start” –StopParams stop –StartMode jvm –StopMode jvm –Startup Manual –Description “Another Tomcat Instance” –DisplayName “Apache Tomcat51″ –JvmOptions “-Dcatalina.home=C:\jakarta-tomcat-5.0.28;-Djava.endorsed.dirs=C:\jakarta-tomcat-5.0.28\common\endorsed;-Djava.io.tmpdir=C:\jakarta-tomcat-5.0.28;-Djava.library.path=C:\Program Files\Documentum\shared” –LogPath “C:\jakarta-tomcat-5.0.28\logs” –LogPrefix “tomcat51_” –StdOutput “C:\jakarta-tomcat-5.0.28\logs\Tomcat51_out.log” –StdError “C:\jakarta-tomcat-5.0.28\logs\Tomcat51_err.log” –Jvm “C:\j2sdk1.4.2_05\jre\bin\server\jvm.dll” –JvmSs 256KB –JvmMx 128MB –JvmMs 256MB –JavaHome “C:\j2sdk1.4.2_05\jre” –Classpath “C:\jakarta-tomcat-5.0.28\bin\bootstrap.jar;C:\Documentum\config”

  6. Install the WDK applications
AddThis Social Bookmark Button

Deleting a user from the Documentum repository

September 28th, 2007 Sarath Akkineni Posted in DCTM 1 Comment »

  • Deleting a user from the repository is highly not recommended
  • Prior to deleting an user from the repository, the ownership of all the objects owned by the user needs to be changed
  • When a user is deleted from the repository, his memberships in groups and permission sets are not effected. The memberships need to be altered by using DQL and API
AddThis Social Bookmark Button

DQL to uninstall Workflows

September 12th, 2007 Sarath Akkineni Posted in DCTM, ECM No Comments »

  1. Retrieve the workflow that needs to be uninstalled

    SELECT r_object_id, object_name, r_definition_state FROM dm_process WHERE object_name = ‘<Name of Workflow>

  2. Change the definition of the workflow to DRAFT (0 = Draft)

    UPDATE dm_process OBJECT SET r_definition_state = 0 WHERE r_object_id = ‘<r_object_id retrieved in step 1>

  3. Change the definition of the activities corresponding the above workflow to DRAFT (0 = Draft)

    UPDATE dm_activity OBJECT SET r_definition_state = 0 WHERE r_object_id IN (SELECT r_object_id FROM dm_activity WHERE r_object_id IN (SELECT r_act_def_id FROM dm_process WHERE r_object_id = ‘<r_object_id retrieved in step 1>‘))

  4. Verify that all activities are in the DRAFT state

    SELECT object_name, r_definition_state FROM dm_activity WHERE r_object_id IN (SELECT r_act_def_id FROM dm_process WHERE r_object_id = ‘<r_object_id retieved in step 1>‘)

AddThis Social Bookmark Button