0

I've just performed a 2010 > 2013 upgrade.

A customisation in the original solution is querying the hidden 'Workflow History' list. There seems to be an issue with the field 'WorkflowInstance' in that it will not accept any CAML queries against it.

This does not work in 2013 - the value is correct. It does work in 2010 before migration:

<Query>
   <Where>
      <Contains>
         <FieldRef Name='WorkflowInstance' />
         <Value Type='Text'>d26df617-a3e5-46c4-b2aa-68c27fa3beb9</Value>
      </Contains>
   </Where>
</Query>

no results

This does work:

<Query>
   <Where>
      <Eq>
         <FieldRef Name='Item' />
         <Value Type='Integer'>163</Value>
      </Eq>
   </Where>
</Query>

results

Any attempt to query on the 'WorkflowInstance' just returns nothing, no errors and No ULS entry. A query on any other field works fine (e.g. tried other fields of same type such as WorkflowAssociation and WorkflowTemplate).

I have noted in the results U2U caml builder is returning - there is a another field called WorkflowInstanceID, the values of which are null.

Has anyone encountered similar issues?

0

This has been resolved – the issue is caused when migrating from 2010 to 2013. Microsoft’s upgrade process seems to have missed an update required to the Workflow History list, and the following powershell fixes it, with the key being the .SystemUpdate($false) on each item in the workflow history list:

    $url = 'http://mysite/myweb' #todo: update powershell to loop through all sites
    $site = new-object microsoft.sharepoint.spsite($url);
    Write-Host $site.allwebs.count
    $web=$site.OpenWeb();

    $spListColl = $web.Lists

    foreach($list in $spListColl)
    { 
            if($list.Title -eq "Workflow History")
            {
                    foreach ($listItem in $list.Items)
                   {
                           $listItem.SystemUpdate($false)
                           Write-Host "Updating Items Done"
                    } 
            }
    } 

Credit goes to the very hard to find post here: http://exploresharepointfeatures.wordpress.com/2014/05/06/sharepoint-missing-workflow-history-after-migrationresolved/

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.