6

I want to publish several components from a core service client application at the same time within a single publish transaction. I thought this post might tell me the answer, but while it gives some options (using custom resolvers/templating code) these are not applicable in my case, as the logic to choose which components to publish lies in the application code, and cannot be put in a resolver/template.

I noticed that if I use:

SessionAwareCoreServiceClient.Publish(string[] ids, 
       PublishInstructionData publishInstruction, string[] targets, 
       PublishPriority? priority, ReadOptions readOptions)

A separate transaction is created for each item and target combination. Is it possible to have all the items in one transaction per target?

6

Currently adding multiple items into a single transaction can be accomplished in some scenarios.

  • In tridion 2013 you can group them in a bundle and publish the bundle, it will generate a single transaction.
  • Publish a Structure Group, it will generate a single transaction for all the organizational items within the Structure Group.

Unfortunately the source code you used as a sample will always create multiple transactions.

I hope this helps.

| improve this answer | |
  • Thanks Eric. Will IncludeChildPublications really create a single transaction? I thought that different publications always had different transactions (as they could go to totally different deployers) – Will Price Jun 26 '13 at 14:39
  • Hi Will, My understanding is that the same publication target should be configured in parents and children publications, so the item will eventually be published to the same target (same destinations) in a single transaction. – Eric Huiza Jun 26 '13 at 14:43
  • 2
    No - you always get a different transaction per publishing context. – Nuno Linhares Jun 26 '13 at 14:44
  • 1
    Thanks Nuno, it seems right, IncludeChildPublications will generate one transaction per publication context. – Eric Huiza Jun 26 '13 at 14:53

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.