Is it possible to update the structure group which has associated workflow without Workflow Management rights?

It's working fine while creating the Structure Group using the below code. But Same StructureGroup once I tried updating is taking very long time and never gets saved.

          EventSystem.Subscribe<StructureGroup, SaveEventArgs>(SetWorkflowToSG, EventPhases.TransactionCommitted);

        private void SetWorkflowToSG(StructureGroup sg, SaveEventArgs args, EventPhases phase)
            Session newSession = new Session("adminstrator");
            StructureGroup newSg = (StructureGroup)newSession.GetObject(sg.Id);
            if (!(newSg.PageBundleProcess !=null))
                ProcessDefinition pd = (ProcessDefinition)newSession.GetObject("tcmId");
                newSg.PageBundleProcess = pd;                   
  • Have you tried to remove the associated workflow to test your hypothesis? And also to test with/without Workflow Mangement rights? Jan 11 '17 at 13:00
  • On a side note: use a using() statement to ensure the Session gets disposed in case of an exception. Jan 11 '17 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.