I also have run across this same problem. I had a Sharepoint workflow based on a Sharepoint list and everything was working just fine. A new column was added to the Sharepoint list that also needed to be added to the Metadata. If I create a new Workflow Process on the Sharepoint list, the new field automatically gets an XML Metadata field created for this new column; however, the existing workflow does not automatically create an item. I added the field manually but it does not properly populate with the list's value when run.
I was searching for someway to refresh the XML fields when I came across this post. I will have to try your solution out.
It is in fact a very involved process to add a field to the meta detail. Still if you are working with a workflow process which you've spent > 30 minutes to create it will be more efficient to create the Field Manually. Heres how I made it work, value and all.
1. Goto: object explorer > process/activity data > xml fields > [workflow object] > rightclick(SharePoint_item) and select "edit..."
2. Add your field definition to the xml schema on BOTH "initial value" & "metadata" tabs. Its rather mundane and simple, just copy an element from another field def and rename ALL the old names to the new filed you added to the sharepoint list. Make sure you add the new element in the same place in both tab xml definitions (just in case the ordering matters). Click OK.
3. You now have the node added, right click the node in the object explorer (you may need to refresh the root xml fileds within the object explorer). Add "Title" and "Name" under your new node just as all the other nodes have. These map to the redundant attributes you added in step 2. The are all strings regardless of the data type of the Sharepoint List Column.
4. Return to Meta Data Mapping and Folio. You will always see the sharepoint column on the left as it's pulled from sharepoint in real time. Double Click on the column added and then the elipses in the supply value popup. Browse to your Sharepoint_Item and select the new node you just added.
In my case I added a new column of Manager(people or group type). I was able to both add the new node within the schema AND get the newly added value to work as a key value of the workflow. That of dynamically populating the destination rule of the Manager Approval Activity within the process.
This post is from years gone by and maybe this issue no longer exists for soem but today i experienced it and this solution did not work and I was about to throw in my towel.
Until I thought I would try one more thing.
The workflow is opened in K2 Studio and the process was joined to a SP list by way of a SharePoint Workflow Integration. Well, the list was altered after this was done so the SharePoint_Item xml field had incorrect schema.
The fix, reopen the SharePoint Workflow Integration by editing the Start Activity and going to the last item along the left of the wizard.
Working through the wizard, I see the newly created field/column and the xml field, SharePoint_Item has the correct schema once the wizard was saved.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.