3

I am using Tridion 2013 SP1.I have a Bundle X which has workflow associated with it.In one of the workflow steps i am setting the minimum approval status of the bundle and bundle items. The minimum approval status has been set for the publication target.I have added one page into this Bundle.This page has five CP on it. I have started the workflow on this bundle and i am trying to publish this page through code. It gives me an error saying

Item tcm:26-2152 does not meet the minimum approval status

This item is not in bundle . This is the component present on the page. So basically what happens is when i publish the page ,all CP on the page also tries to get published. But only page is in bundle so minimum approval status of page is set, minimum approval status is not set for CP on page. how to handle this situation. How can i set minimum approval status of all CP on page when only page is in Bundle.

The code using to publish is as below

        VirtualFolderData workFlowBundle = (VirtualFolderData)CoreServiceClient.Read(ActivityInstance.WorkItems[0].Subject.IdRef, new ReadOptions());

        PublishInstructionData publishInstruction = new PublishInstructionData
        {
            ResolveInstruction = new ResolveInstructionData()
            {
                IncludeChildPublications = false,
                IncludeWorkflow = true
            },
            RenderInstruction = new RenderInstructionData()
        };

        publishItem.Publish(CoreServiceClient, publishInstruction, new String[] { workFlowBundle.Id }, new String[] { previewTarget }, PublishPriority.High);


        ActivityFinishData finishData = new ActivityFinishData()
        {
            Message = "Email Notification Sent",

        };

When i add only component in bundle and start workflow it gets published nicely with code. As all component achieves minimum approval status in one of the workflow steps.

1 Answer 1

3

Read this first: What is the benefit of setting minmum approval status at publication target

So your component was in workflow and has some approval status, other than Unassigned. It means that approval status rules will be applied to it. Even without any workflow, you will not be able to publish it, unless the approval status rule is met, or you disable the check.

12
  • U didn't get my question. I am saying when i add only component in my Bundle and start workflow,it achieves minimum approval status and get published nicely. But once i add page into bundle, it fails as for page minimum approval status is set not for CP on the page.When i try to publish the page through code ,it tries to publish CP on page as well which doesn't have minimum approval set. May 12, 2014 at 8:56
  • In order to publish anything your item should have approval status higher than that of publication target or be unassigned (not unapproved). If you component has neither - you will not be able to publish it. May 12, 2014 at 9:28
  • when an item will get status unapproved? i don't know how half of my items have status unapproved. May 12, 2014 at 9:54
  • When item is created (without workflow) it has approval status unassigned - you can publish it. If it ever was in workflow it gets Unapproved, or approval status set by last activity instance in workflow - min approval status rule is applied May 12, 2014 at 10:20
  • 1
    You can't make it unassigned. You can create a dummy workflow with 1 activity which will set status to whatever you like, or disable this check altogether May 12, 2014 at 11:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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