6

I have a scenario where I am publishing lots of items using Tridion Core Service. I want to publish ten items and wait till these items get published and then publish the next items. Is there a way to determine if there are pending items to be published in the queue. IsPublished works only for individual items and beside this it will only give true for published item and will not pass any information for the itmes which have failed.

7

You need to get list of publish transactions:

            var filter = new PublishTransactionsFilterData();
            var publishTransactions = Client.GetSystemWideListXml(filter);

You can set filter.PublishTransactionState to filter on a certain publish transaction state as well as ForRepository to narrow it down to a certain publication. Consider also setting PublicationTarget and PublishedBy. If you will configure this filter properly you will get only your publish transactions. You can then further analyse it if there are failed transactions and if all of them are complete.

I'm not sure bout 2011 GA, but on 2011 SP1 you should be able to use GetSystemWideList method that will return you objects instead of XML. You will then be able to Linq it instead of fiddling with XML :)

| improve this answer | |

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.