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>
This does work:
<Query> <Where> <Eq> <FieldRef Name='Item' /> <Value Type='Integer'>163</Value> </Eq> </Where> </Query>
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?