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.