With LiveCycle ES Update 1 the FormAugmenterService service operation Lookup and "Insert Workflow XFO DataLookup and Insert Workflow XFO Data" may fail if you attempt to inject the workflow code into the XML of a form that has not been properly initialized.
Prior to using the FormAugmenterService service ensure that the form XML has been properly initialized with the xfa:data structure so that inserting the work-flow data will not interfere with any population of data that may occur later in your render process.
In the design of your render process, prior to the execution of the FormAugmenterService service, the XML variable used to populate the data of the PDF should be initialized somewhat like the following:
<xfa:data xmlns:xfa='http://www.xfa.org/schema/xfa-data/1.0/'><FSFIELDS_><AWS_TASKID/><AWS_ASSIGNED_ID/> <AWS_ACTION/><AWS_CHOICE/><AWS_MAILTO/><AWS_STATUS/><AWS_PROCESSTYPE/><Name/><Address/><City/><State/><ZipCode/><Country/><Initiator/><Assigned/></FSFIELDS_></xfa:data>
This will provide the the service with the struture it needs to insert the work-flow data as well as any fields that you need to populate as part of your render process.
If you need to populate additional data in the form prior to the FormsService you will need to respect the same structure when updating form fields. For example, if you are updating a field named "Initiator" on your form then you would update the field using this xPath expression: "/process_data/formXML/xfa:data/FSFIELDS_/Initiator" with the string value of the initator (assuming in this case that the XML variable is named formXML).
Even if you use a schema within the document you will still need to populate fields using this method. Accessing the variables of the schema will "undo" the values of the FormAugmenterService service creating a new XML document and breaking your offline Workspace forms capability. Users will be able to save offline but won't have the correct email endpoint values or other details embedded in the form to succesfully return the forms back to the LiveCycle process.
See the attached sample for further details and a running example (created for LC ES 8.2.1.2).
+