How to do Unit Of Work pattern on top of Sitecore&

2019-08-05 05:30发布

I'm wondering if anyone has ever needed to implement a Unit Of Work pattern on top of Sitecore's publishing workflows? We have a requirement to workflow an 'article' that has multiple linked 'sub-articles', all of which are edited in a block and need to be workflowed through contribution, review and signoff states. Any ideas?

Update 24.10.2012 based on Kevin Obee comment:

Yes, this look like very interesting approach! Based on it we came up to some similar idea. Instead of creating a temporary workflow for every content item, why not create a temporary “Bundle item” – content item which holds references to all items which has to be in the “change set.” So we move this “Bundle item” through “change sett workflow” and when this move through states will update the states of the included content items in their “content items workflow”. Example: 1. Create/Edit new content item -> it create a new version and show custom windows to assign it to “Bundle item” (the window will have functionality to create new “Bundle item” and then assign the content item to it) 2. One “Bundle item” can hold references to many content items which define our “change set”. 3. The “Bundle item” is automatically set into “Bundle workflow” 4. Moving “Bundle item” through “Bundle workflow” can update the workflow states of the content item 5. “Bundle item” goes to final state of “Bundle workflow” and all references content items change the states for final.

2条回答
forever°为你锁心
2楼-- · 2019-08-05 05:42

I would start with the workflow pipeline on every item save event. Find the item that has been updated, if it belongs to certain workflow, pull it's sub-articles and attach them to the same workflow (if not already). And when the item is approved, you may want to push it to a queue (another database) until all its dependent items are approved. Run a batch job to finally publish all items from your queue once the criteria is met.

查看更多
做个烂人
3楼-- · 2019-08-05 06:04

Alex Shyba presented a workflow bundle solution back in October 2011 to the Sitecore Virtual User Group.

His presentation was Latest cool prototypes from Sitecore US lab and you'll find the workflow bundle explanation at the 50:35 mark in the video.

Update:

As of 23 Oct 2012 the workflow bundle is reported as still existing only as a prototype. Maybe Alex can be persuaded that there's a need for what looks like a great idea.

Project Items Shared Source Module Released

John Penfold has released his Project Items module within the Sitecore marketplace. This module manages multiple content and media items as a single project, ensuring that they get published atomically when the project is released. I saw John demonstrate the module at the Sitecore User Group in London last week and it looks to meet your requirements pretty well.

查看更多
登录 后发表回答