简体   繁体   中英

sitecore workflow with multiple publishing targets

I want to implement something simple like /System/Workflows/Sample Workflow with the small addition of having multiple publishing targets (staging web and production web environment), so instead of the Approved state with the final checkbox set, i want to modify it to two states;

  • Approved for Staging
  • Approved for Delivery

only the Approved for Delivery should be final. I want to set a PublishAction for each of them but i don't know how to set the publishing target?

This is a very common issue that ultimately ties to how Sitecore works. Your question seems to indicate that you understand that only one state in workflow should be final -- that's great that you see that. There are ways to do this, but I would say some of them are not best practice. Also, as divamatrix mentioned, there are other custom approaches.

  1. Deviate from best practice and mark Approved for Staging as Final and Approved for Delivery as Final. I do not recommend this . I'm mentioning this is a solution so you can see the full circle of what you can do. The issue with this is that if you log in as an admin, you can potentially publish to any target as well as other things. Generally, this is just not a good idea.

  2. As divamatrix mentioned, there's a custom publishing provider by Alex Shyba on the topic. The article linked is the older approach. There's actually an update to that solution which seems to be the next best thing. That solution includes a custom workflow provider and some updates to the targets in Sitecore .

  3. Another option is to de-couple workflow from publishing, which might sound drastic, but in theory makes sense. Basically, force content to go through all of worflow, then have a publish-only role that is the only one that can publish the content. From there, they can publish to the staging site and get stakeholder approval before publishing live.

UPDATE : As of Sitecore 7.2, there is a built-in mechanism to publish to a pre-production target.

Here's a link to everything you need to know: Alex Shyba's blog entry on custom publishing targets . I can verify that it all works because I've currently got a site in production that uses exactly what Alex outlines. Let me know if you have questions.

UPDATE: As Mark points out, this link is indeed an older solution. It will work, but Alex's part 2 link as posted by Mark is a better solution.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM