We are having an issue with using Experience Manager with items in workflow. Basically we can create, edit and publish things fine in Experience Manager (on a staging site) right up until the point they enter workflow. At this point it is still editable (if the task is assigned to you and the task has been started) which again is what we want and what we would expect. It shows the user the information they would expect to see (via session preview) and also saves and updates the Component correctly.

The issue however is that when Finish Activity is clicked it republishes the last major version of the edited Component rather than the users minor version. This happens even though the Component has has reached the minimum approval status for the Publication.

I have tried adding a step in the workflow to publish to the staging website which works, but this is then overwritten by the last major version as soon as the item has been edited and Finish Editing has been clicked.

So the question is really can you get Experience Manager to publish minor revisions when Finish Editing is clicked? (Obviously provided it meets minimum approval status)

  • Hi Matt, perhaps Eric's solution can help you: tridion.stackexchange.com/questions/2553/… – Kunal Jan 29 '15 at 16:08
  • Hi Kunal, Thanks for your response. Unfortunately not as I said I can get the minor version to publish using workflow. But it is overwritten by experience manager when the user clicks finish editing. That's where my issue lies. – Matt Hill Jan 30 '15 at 9:33

You could hook the publish event using an event system (note: this untested code!):

public MyConstructor()
    EventSystem.Subscribe<IdentifiableObject, PublishEventArgs>(SetInWorkflowPublishFlag, EventPhases.Initiated);

private void SetInWorkflowPublishFlag (IdentifiableObject subject, PublishEventArgs args, EventPhases phase)
    args.PublishInstruction.ResolveInstruction.IncludeWorkflow = true;
  • Thanks Bjorn! Tried this and it works brilliantly. Bit of a shame there wasn't an out of the box setting that I had missed but saying that, this is a perfectly reasonable way to get to the same end result.Cheers! – Matt Hill Feb 10 '15 at 17:02

I'm using very similar code, with a slight alteration (to limit as much as possible to XPM publish requests only)

private void SetInWorkflowPublishFlag(IdentifiableObject subject, PublishEventArgs args, EventPhases phase)
   //TODO: Review if can determine if initiated by XPM vs. Person more accurately
   if (args.Targets.Count() == 1 && args.Targets.First().Title.ToLower().Contains("staging"))
      if(subject is Component)
         args.PublishInstruction.ResolveInstruction.IncludeWorkflow = true;

Is this question Is Publish Triggered by Experience Manager I am looking to find a more reliable approach

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.