Search This Blog

Showing posts with label migration. Show all posts
Showing posts with label migration. Show all posts

Monday, March 26, 2012

Migrate In-Process Workflows from MOSS 2007 to SPS 2010 (Part 2 of 2)

Part 1 of this Article is Located - Here

Okay, now that we have a deeper understanding of the workflow process, and we have inspected our MOSS 2007 workflows to ensure they are ready to migrate, we are now ready to start the step-by-step methodology to migrate our in-process workflow:

(Two quick notes, the steps that follow are not all the steps involved in a SharePoint migration, and these steps assume the use of the Database Attach Upgrade Method).

Steps on the MOSS 2007 Server:

1. Run: stsadm -o preUpgradeCheck, Correct any Errors

2. Stop All Workflow Auto Cleanup Timer Jobs

  • Central Administration > Operations > Timer Job Definitions > Edit Timer Job > Workflow Auto Cleanup - Disable

3. Quiesce the Farm

  • Central Administration > Operations > Quiesce Farm - Start Quiescing - 5 minutes (more for production)
  • Allow Quiesce to complete

4. Provide Sufficient Time for In-Memory/In-Process Workflows to Dehydrate (Usually No More Than 2 Hours)

5. Set the Content Database to Read Only

  • SQL Server Management Studio > Databases > WSS_Content_MyCDB > Properties > Options > State > Database Read Only > True

6. Run PowerShell Command

  • Start > All Programs >Accessories > Windows PowerShell > Windows PowerShell ISE
  • Test-SPContentDatabase -Name WSS_Content_cdbTestIPWF -WebApplication http://shrpnt2007:8000/

7. Backup the Database

  • SQL Server Management Studio > Management > Backup > Accept Defaults > OK
  • C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\ 

Steps on the SPS 2010 Server:

1. Copy Workflow Solution Package to the SPS 2010 Server

  • C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN

2. Deploy Custom Workflow WSP to Solution Management Store
  • stsadm -o addsolution -filename
  • stsadm -o deploysolution -name -immediate -allowGacDeployment

3. Copy Restore Database to...
  • C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup

4. Stop All Workflow Auto Cleanup Timer Jobs

  • Central Administration > Monitoring > Timer Jobs > Job Definitions > Workflow Auto Cleanup for > Disable

5. Remove CDB Database from
  • Central Administration > Application Management > Databases > Manage Content Databases > > Remove Content Database > OK

6. Reset IIS - IISReset

7. Set the Content Database to Read Only

  • SQL Server Management Studio > Databases > WSS_Content_MyCDB > Properties > Options > State > Database Read Only > True

8. Restore Database to SQL Server
  • SQl Server Management Studio > Databases > Restore Database >
  • General
    • To Database (SPS 2010 CDB)
    • From Device (MOSS 2007 Backup Copy)
    • Check Restore
  • Options
    • Overwrite the Existing Database

9. Set Read Only Back to False

  • SQL Server Management Studio > Databases > WSS_Content_MyCDB > Properties > Options > State > Database Read Only > False

10. Mount/Migrate the Database
  • stsadm -o addcontentdb -url http://sp2010srv:8000 -databasename WSS_Content_cdbTestIPWF

11. Attach the Database to the Web Application

  • CA > Application Management > Databases > Manage Content Databases > Add a Content Database > Database Name

12. Restart All Workflow Auto Cleanup Timer Jobs

  • Central Administration > Monitoring > Timer Jobs > Job Definitions > Workflow Auto Cleanup for > Enable

Go to the SPS 2010 Sites, Lists and Libraries and test your migrated in-process workflows!


I hope that helps!

Tom












Migrate In-Process Workflows from MOSS 2007 to SPS 2010 (Part 1 of 2)

Part 2 of this Article is Located - Here

Recently I had the opportunity to develop a methodology for migrating in-process SharePoint workflows from MOSS 2007 to SPS 2010.  As you may be aware, in-process workflows are those workflows which have been started but which are not yet completed.  In this two part article I will provide a step-by-step methodology for migrating in-process workflows and thereby avoiding the gotcha's that are out there waiting for you. 

Understanding In-Process Workflow Migration

Before I dive into my methodology I wanted to provide a little background understanding of workflow processing:

Starting: Workflows can be Started in a Number of Different Ways
  • Manually
  • When an Item is Created
  • When an Item is Changed
  • Programmatically Through the API
  • Programmatically Through the Web Service

 Hosting: Workflows can be Hosted by a Number of Different Processes
  • W3wp.exe – When Started from the SharePoint Interface
  • Owstimer.exe – When the Workflow is Delayed
  • The Programmatic Process that Executes the Workflow Code

Delayed: When the Workflow Action needs to be Delayed the Workflow Dehydration Process Occurs
  • The Windows Workflow Foundation Calls the SQL Workflow Persistence Service
  • The SQL Workflow Persistence Service
    • Assigns Correlation Token to Task
    • Serializes Workflow Object – Turns Into Binary String
    • Saves with a Unique ID in the Content Database

Reactivated: When the Workflow Action Needs to be Carried Out the Workflow Rehydration Process Occurs
  • The Windows Workflow Foundation Calls the SQL Workflow Persistence Service
  • The SQL Workflow Persistence Service
    • Finds the Workflow task Using the Unique ID
    • Deserializes Workflow Object – Turns Binary String Back Into an Object in Memory
    • Performs Many Checks to Ensure the Right Workflow Object is Returned

 In-Process and In-Memory Workflows: Workflows can be In-Process and In-Memory (Not Dehydrated)
  • Any Workflows that are In-Process and In-Memory will be Lost in Migration
  • Custom Workflow Code can Prevent Workflows from Dehydrating – Therefore They Persist in Memory

DelayActivity – UnloadOnIdle: In-Process Workflows can be persisted in memory programmatically
  • If Custom Workflow Code Uses a Delay Activity and UnloadOnIdle Property is Set to False the Workflow Object will Persist in Memory
  • Custom Code Must be Reviewed and if Necessary Modified to Prevent UnloadOnIdle from Persisting Workflow Objects – Set Property to True

External Applications: If External Application Activate Workflows Within SharePoint then Those Workflows Could be In-Progress and In-Memory When Migration Occurs!


Preparing for In-Process Workflow Migration

Okay, now armed with this greater understanding we are ready to prepare for our workflow migration.  To start the process we must inspect the workflows on the MOSS 2007 Server Farm with concern for the following:

Ensure Workflows are Functioning Properly: Before attempting to perform a migration of In-Process Workflows you must first be sure the workflows are functioning properly
  • Review ULS and Event Logs For Any Signs of Issues Related to Workflows
  • Correct Issues Before Attempting Migration

Ensure DelayActivity – UnloadOnIdle is Set to True: You must also inspect any custom code to ensure it does not prevent the Workflow Dehydration Process
  • Review Custom Workflow Code – Ensure UnloadOnIdle is Set to True
  • Correct Any Code that Sets UnloadOnIdle to False

Run PreUpgrade Checker and Review Results: Run the preupgradecheck command on the Content Database(s) that is being migrated – inspect for additional key issues
  • Issue ID: 956447 - The Declarative Workflow Actions File has been Modified
  • Issue ID: 956448 - The Custom .ACTIONS Files Exist in the Farm
  • Issue ID: 956449 - The Web.Config File Contains Modified Authorized Types for Workflows

If your Moss 2007 workflows meet all this criteria then they are ready for migration!

In part 2 of this article (coming soon!) I will provide the step-by-step process I use for migrating in-process workflows.

Many thanks to the great blog I found on the 14 folder.


I hope that helps!

Tom



Monday, August 1, 2011

MOSS 2007 to SharePoint 2010 Migration - Lessons Learned

I recently completed a migration from MOSS 2007 to Sharepoint 2010 and I encountered many application migration issues that I had to find a way to resolve.  As a result I learned a lot of lessons that I wanted to share with others who may be facing the same challenge - I hope this may save you some time and effort.

1. Search:

a. Issue: Search center web parts fail to load; search bar is missing

b. Fix: Reconfigure and redeploy search master page

c. Reference:




a. Issue: Advanced Search page broken

b. Fix: Reconfigure and redeploy search master page and results page

c. Reference:




a. Issue: Cannot search scopes

b. Fix: Ensure that the default search results page is the search center results.aspx page. Apply custom search master page and configure results.aspx with web parts. Remove scopes that do not exist by modifying the Scopes list on the Search Center site.

a. Reference:




a. Issue: The initial page opens in the test environment, but the subsequent pages open in the production environment

b. Fix: Change results page absolute URL to relative path URL



a. Issue: Results by Relevance option does not display and Time to complete does not display

b. Fix: Reconfigure results page in SPS 2010 (Results Relevance are handled differently in SPS 2010 - see below article in Reference).



a. Issue: Receive error/blank page when trying to access Search Center

b. Fix: Reconfigure the site to use the new default and custom master page



a. Issue: Pages are broken when trying to search in ‘All Sites’ and ‘People’

b. Fix: Change searched settings to show and default to contextual scope so people/all sites could be searched. Ensure that the default search results page is the search center results.aspx page. Apply custom search master page and configure results.aspx with web parts. Remove scopes that do not exist by modifying the Scopes list on the Search Center site.

c. Reference:




2. Ribbon:

a. Issue: Ribbon is not displayed

b. Fix: Check out page, edit it, check in page

c. Reference: N/A


a. Issue: Navigate Up in the Ribbon does not display breadcrumb trail; ‘Browse’ and ‘Page’ tabs are missing

b. Fix: Edit the page-check in-refresh browser and remove this line from SharePoint Designer:



3. Content Types:

a. Issue: Content Types do not work for uploading new items to a library

b. Fix: Apply a new custom form in SPS 2010



4. Trusted File Locations:

a. Issue: Excel documents won’t open

b. Fix: Recreate/create a new Trusted File location



5. Database connections:

a. Issue: Cannot launch reports that tie to a database connection

b. Fix: Update WFE Web.config to allow code blocks



6. Navigation:

a. Issue: The site did not correctly inherit its Quick Launch Navigation structure; the site did not correctly inherit its Global Navigation

b. Fix: Configure new default and custom master pages

c. Reference:




a. Issue: Second level navigation from the dropdown in Global Navigation is missing

b. Fix: Reconfigure the master page



a. Issue: Duplicate tabs in the Global Navigation

b. Fix: Delete the extra link through the Navigation configuration; deploy publishing feature



a. Issue: The visual upgrade caused all links in the Quick Launch to go away

b. Fix: The Quick Launch is based on a custom master page, master page must be redone for SPS 2010 post-migration. Design a new custom master page for this site. Reconfigure this site to use audiences to control visibility of the navigation links.

c. Reference:




7. Views/Custom Views:

a. Issue: Error when accessing views from the Library Settings Panel

b. Fix: Recreate the Content Type and Library



a. Issue: Calculated columns using Content Types as metadata are not working

b. Fix: Reconfigure the calculated columns to not use Content Types as metadata


a. Issue: Trying to change to datasheet view produces this error: ‘The query cannot be completed because the number of lookup columns it contains exceeds the lookup column threshold enforced by the administrator.’

b. Fix: In CA set the list view lookup threshold to 10,000. After some research, it appears that the threshold for the List View Lookup will need to be modified.

Your SharePoint administrator needs to change the Resource Throttling settings under Central Administration > Application Management > Manage Web Application > Your Web Application > General Settings > Resource Throttling. Set the List View Lookup Threshold value to a number larger than the number of lookup and workflow status column in the library and view

c. References:






8. Web Parts:

a. Issue: Clicking on an item in a web part does not lead to the item

b. Fix: Recreate web part



a. Issue: Web Parts do not display

b. Fix: Recreate the web parts



a. Issue: Custom Filter Web Part errors out and page hangs

b. Fix: Modify the Ajax Options to Enable Asynchronous Update



a. Description: “This list does not exist” error, cannot toggle between months in Calendar

b. Fix: Recreate the web part



9. Hiding Content

a. Issue: ‘All Site Content’ and the ‘Recycle Bin’ should be hidden

b. Fix: Reconfigure the site to use custom master page; this will have different security to hide ‘All Site Content’ and the ‘Recycle Bin’



10. Site Usage Reports:

a. Issue: Site Usage report will not display

b. Fix: Recreate link to point to OOTB SharePoint Web Analytics



11. Appearance:

a. Issue: Site does not have the 2010 master page applied

b. Fix: Deploy custom master page


a. Issue: The blue bar at the top doesn’t extend the entire way

b. Fix: Reconfigure the site to use the new and default custom Master Page

c. Reference:




a. Issue: Cannot open meeting dates links-various errors

b. Fix: This is a master page issue



a. Issue: Page opens in 2007

b. Fix: Update Navigation to use absolute URLs

c. Reference:



a. Issue: Logo (that is a link) in the top bar that has the title of the page points to the wrong page

b. Fix: Redeploy master pages



a. Issue: The Visual Upgrade was not applied

b. Fix: The SPS 2010 default and custom master pages will need to be applied

c. Reference:




Thanks to Rachel for all her help with this Blog!

I hope that helps!

Tom Molskow

Tuesday, August 31, 2010

Yes Virginia, There is an Easy Way to Migrate SharePoint Designer Workflows

No doubt by now, if you have spent anytime with SharePoint Designer (SPD) 2007, you will have heard (or experienced) that it's difficult to migrate SharePoint Designer workflows.  The horror stories tell you that if you do migrate them, you will have to do all kinds of direct modifications to the XOML files, find and replace GUIDs, recompile, check every detail over and over again, etc. 

What if I told you that, not only is there an easy way to migrate SPD workflows, but the tools needed to do that are in SPD?!?  Even more so, that with these tools you can migrate SPD workflows across site collections and across Server farms!?! Skeptical?  I don't blame you, but read on...

1. Prepare Development Site

a. Verify that all workflows are working properly and without error

b. Remove all unneeded development lists

c. Remove unneeded Security Groups

d. Reset the Master Page to the Default Master Page

2. Create a Template From the Development Server

a. From SharePoint Designer choose File, Export, SharePoint Site Template

b. From the Save Site as Template Page:

i. Enter the File Name – ContactUs.stp

ii. Enter the Template Name: – Contact Us

iii. Enter the Template Description – The site template for the Contact Us application

iv. Choose to Include Content

v. Click OK

c. From the Operation Completed Successfully page click on the Site Template Gallery link

d. From the Site Template Gallery click on the new template name

e. From the Download File dialog box choose save, select a local save location and then click Save

f. From the Download Complete dialog box choose Close

3. Post the Site Template to the Production Server

a. From the Production Site choose Site Actions, Site Settings, Galleries, Site Templates

b. From the Site Templates list choose Upload, Upload Document

c. From the Upload Document Page choose Browse and Browse to the Site Template you created in SharePoint Designer, then Click OK

d. From the Site Template Gallery Edit Item page make any necessary edits to the template metadata, then Click OK

e. The new Site Template will be added and available from the production site

4. Create a New Site on the Production Server

a. From the Top Site of the Production Site Collection

i. Choose Site Actions, Create Site

ii. Provide a Title for the new site

iii. Provide a Description for the new site

iv. Provide a URL name for the new site

v. Click on the Custom tab

vi. Choose the new site template you created

vii. Choose Use Unique Permissions

viii. Choose Use the Top Link Bar from the Parent Site – Yes or No

ix. Click on Create

x. The new Site will be Created

b. If required, change the Master Page to the same site master as the site collection

c. If required, add SharePoint security groups and user accounts

5. Perform Post Restoration Checks and Configurations

a. Review the Site Appearance

i. Master Page

ii. Navigation

b. Review the Following Site Configurations

i. Document Libraries

1. Metadata

2. Permissions

3. Views

4. Versioning

5. Library Workflow Associations

ii. Lists

1. Metadata

2. Permissions

3. Views

4. Versioning

5. Lists Workflow Associations

iii. Web Parts

1. Web Parts Added to Web Part Zones

2. Web Part Customizations

iv. Security Groups

1. Group Permissions

2. Group Accounts

v. Validate that the Workflows are configured properly by clicking through each GUI design screen

vi. Run any Additional Workflow Tests

vii. Correct all Findings


And there you have it - an easy way to migrate SPD workflows from one location to another!  Be forewarned, if you create the site template from within SharePoint itself (not starting from SharePoint Designer) you will not get the same results.  For some strange reason probably only known to Bill Gates himself, this only works when you start from SharePoint Designer, but hey the good news is - it works!!!

And that's all there is to it!