Advanced Workflow Problem Frist Step "Edit"

Mohamad Ramadan asked on October 10, 2021 13:57

Hi

We currently using advanced workflow for editing articles the first step Editor step has multiple option that user should choose one

The problem is that Edit step "first workflow step" doesn't allow multiple option

i've try to move the document automatically from code on After_Update event using "e.Document.WorkflowManager.MoveToNextStep(e.Document, null, WorkflowTransitionTypeEnum.Automatic);" but I got error " Given node is exclusively checked out by another user."

I've try as well Checkout_After event and same result

my question is how to move the document when first created to editor step, we are using Checkin and Checkout,

or at least to overcome the given error "Given node is exclusively checked out by another user."

Sample Code

var currentStep = e.Document.WorkflowStepName; if (currentStep.Equals("Edit")) { e.Document.WorkflowManager.MoveToNextStep(e.Document, null, WorkflowTransitionTypeEnum.Automatic);}

Recent Answers


Juraj Ondrus answered on October 11, 2021 08:23

The edit step is system step and is simply for editing. Why don't you introduce one more step after the edit, once the editor saves the page and pushes it further and then do the logic in that step? Or, maybe you just need to save and page.CheckIn() as per the API examples before moving to the next step.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.