After running into a few issues or errors while building workflows, I wanted to start documenting my resolution to those errors. Almost all were errors that I caused. The trick was determining what I did. I will try to add to this list as they come up, but here is the first one.
Error publishing workflow. Workflow XAML failed validation due to the following errors: Object reference not set to an instance of an object. HTTP headers received from the server - ActivityId: a41a30d5-c786-4546-bdde-e03903af1796. NodeId: . Scope: . Client ActivityId : ede2f19c-7043-1000-b4b2-37a9eab76b50. The remote server returned an error: (400) Bad Request.
This error occurred when I was publishing a workflow. The background to this workflow is that I exported it from one site and attempted to import it to another site. I thought I had the field names exactly the same from the source list to the destination list, but I didn't. One field was Employee Id in the source list and EmployeeID in the destination list. So when I imported the workflow that had a reference to this field and hit publish, I received the above error.
A few things to note and how I found the solution. I did review the column names again, but I still overlooked the small discrepancy. The error message did not mention a specific action that I can understand as it printed out the GUID within the xoml file. (I submitted a UserVoice to see if this can be changed and print out the action title or type within the error message. Please vote if you think this may be helpful Error Handling – Customer Feedback for Nintex ). I was able to publish right away, so the validation did not find any missing values for the required fields. At a glance, everything in all actions were filled out and the yellow warning icon was not apparent on any actions. The culprit was found in an email action that referenced the Employee ID in the subject line. Instead of seeing {Current Item:EmployeeId} I saw {Unknown:Unknown}. I deleted this reference, put back the corrected item property reference, republished and it was successful.