How to update a Workspace in Server side deliver advisor
![]()
Hi,
In a server side Deliver Advisor I wish to change the default flow target of the source workspace. I have code as follows:
IWorkspace workingWorkspace = (IWorkspace)workspace.getWorkingCopy();
CurrentFlows flows = ((Workspace) workingWorkspace).getCurrentFlows();
flows.setDefaultAcceptFlow(shipUUID);
flows.setDefaultDeliverFlow(shipUUID);
((Workspace) workingWorkspace).setCurrentFlows(flows);
However, the update seems not to persist, I tried calling IRepositoryItemService.saveItem, but that results in an Access Violation.
How do I save the working copy of the workspace? I'm sure there must be a method somewhere, but I can't spot it.
Regards..
|
One answer
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
As Chris mentions, any changes must be done in a Participant plugin. Note that the original transaction has been committed before the participant is called. The participant could cause another transaction, but cannot modify the original