Recently I migrated from DFC 6.5.0.118SP1 to 21.4.0000.0147, and without changing my code, when I try to do this:
IDfQueueItem oQueueItem = getQueueItem(workflow.getAttachment().getObjectId());
oQueueItem.getWorkitem().lock();
if(!Active.equals(workflow.getAttachment().getStatus())) {
oQueueItem.getWorkitem().acquire();
}
if (oQueueItem.getSupervisorName().equalsIgnoreCase(oQueueItem.getName())) {
IDfWorkflow daWorkflow = (IDfWorkflow) documentumService.getSession().getObject(new DfId(workflow.getId()));
daWorkflow.updateSupervisorName(loginTo);
}
oQueueItem.getWorkitem().delegateTask(loginTo); // problem happening here
oQueueItem.getWorkitem().acquire();
oQueueItem.getWorkitem().save();
I received this when my code executes the delegateTask method:
[DM_WORKFLOW_E_WORKITEM_TRANSITION]error: 'Workitem (4a12bc7d801a4d01) fails to make the state transition.'
[DM_WORKFLOW_E_INVALID_USER]error: 'The specified user '}�' is not a valid user.'
I am not passing the user as the error reported.
When I run the same code in another application using DFC 6.5.0.118SP1, the problem doesn't happen.