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
- 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
- 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:
- Retrieve the Chronicle ID of the document deleted.SELECT DISTINCT r_component_chron_id FROM dmi_package WHERE ANY r_component_id = ‘09xxxxxxx000b3a9‘
- 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
- 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:
- 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‘