понедельник, 26 июля 2010 г.

Сохранение рабочего процесса...

Озадачился тем как сохранить рабочий процесс из SharePoint Designer на случай непредвиденного повреждения/удаления.
Задал вопрос на форуме, пока ничего... http://www.gotdotnet.ru/forums/5/131116/616305/#post616305

UPDATE на самом деле, рабочий процесс сохранить можно только вместе с содержимым, к которому он собственнно привязан - списку, библиотеке. Ну а учитывая, что сам рабочий процесс это тоже элемент библиотеки рабочих процессов - то и сохранять надо весь узел.
Как я понял, SharePoint 2007 предлагает 3 основных способа сохранить/восстановить содержимое узла, условно назовем их:
1. Site/List Template (из меню "Параметры", сохранить как шаблон с включением содержимого, создаётся stp файл)
2. export/import (с помощью командной строки stsadm или SharePoint Designerа, создается cmp файл)
3. backup/restore

Второй способ - заведомо не подходит, microsoft пишет: "If I understood well the question, I could already tell you that exporting sites where we have workflows then using them again will not work.
The reason is that when using export/import, the lists/elements identifiers are generated again and the workflows are not able to identify what is the specific object he needs to work with." Т.е. мы конечно можем сохранить/восстановить контент, но РП придется заново переделывать, перепривязать все поля к нашим активностям заново.

Третий способ - http://technet.microsoft.com/en-us/library/dd819893(office.12).aspx - Microsoft Press: Backup and restore. Ещё предстоит попробовать, пока вот что написал инженер MS: "I could also ad that backup/restore operation do keep the element identities, and the workflow might work in the restored sites.
However, you cannot use a restored site in the same farm, because you might have a conflict of IDs."

Наконец, первый способ, который протестирован мною, и вроде бы пока работает:
"Now, if we get back to the limitation, there is a way to change it, by changing the max-template-document-size property for the site.
Please check the following resources:
- http://msdn.microsoft.com/en-us/library/bb802960(office.12).aspx - Site Template
- http://support.microsoft.com/kb/960969 - Error message when you try to save a site as a template in SharePoint Server 2007: "Failure decompressing data from a cabinet file"
Первая ссылка описывает изменение параметра в строке stsadm, который позволяет увеличить размер шаблона. А во второй - упомянута проблема, с которой мы можем столкнуться при попытке использования первой. Там же можно встретить фразу "Templates are not best practice for site level backup/restore operations"... Что ж, это понятно, но пока - это единственный приемлемый способ сохранить рабочий процесс в MOSS2007...


PS на самом деле у каждого из способов своя область применения, свои особенности, если ещё решения сторонних разработчиков - подробней есть в документации и например вот тут в статье Нелли Сатретдиновой "Инструменты миграции SharePoint на все случаи жизни": http://doc.elcat.kg/Misc/SOMag/content/2008/samag_04_65/samag4(65)-27-33.pdf

PPS Here is a summary of the case:

ACTION/RESULT
You were interested on how a site can be saved as template then use it along with the workflows created on it.
You were also concerned about the limitation on the size of the files saved by SharePoint when saving as template.

CAUSE
Advisory case

RESOLUTION
Provided answers:
- Exporting sites where we have workflows then using them again will not work.
The reason is that when using export/import, the lists/elements identifiers are generated again and the workflows are not able to identify what is the specific object he needs to work with.
- About the limitation, there is a way to change it, by changing the max-template-document-size property for the site
Additional resources:
- http://msdn.microsoft.com/en-us/library/bb802960(office.12).aspx - Site Template
- http://technet.microsoft.com/en-us/library/dd819893(office.12).aspx - Microsoft Press: Backup and restore
- http://support.microsoft.com/kb/960969 - Error message when you try to save a site as a template in SharePoint Server 2007: "Failure decompressing data from a cabinet file"

More info:
I could also ad that backup/restore operation do keep the element identities, and the workflow might work in the restored sites.
However, you cannot use a restored site in the same farm, because you might have a conflict of IDs.

हेल्लो World

см. сабж
Странно, что блог сразу же переводит некоторые слова на хинди. По дефолту новый юзер - индус лол?