1 Reply Latest reply on Jun 30, 2008 11:50 PM by aoatak

    Coercion error if comments in XML...

    Level 1
      Hello everyone!

      I have a form/workflow in LiveCycle which is giving me some errors.
      Here are the steps leading up to the error:
      - A PDF form is hosted on a corporate intranet website. A user opens
      the form and fills it out.
      - The user clicks on an email submit button in the form, which
      launches the user's mail application and attaches the form data as XML
      (just XML, not XDP).
      - The email is sent to a mailbox for which an email endpoint has been
      set up in LiveCycle.
      - The endpoint initiates a LiveCycle process and passes in the XML
      file as an input XML variable.
      - The first step in the workflow is a setValue step which copies the
      XML into the .../xdp/datasets/data node of an xfaForm variable.

      This all works fine if I am submitting from Acrobat. The next step in
      the process is to assign the form to a user for review. At this point
      the form is displayed to the reviewer and contains all of the data
      that was in the initial form.

      Unfortunately, I've run into a snag. If I submit from Reader, the XML
      gets attached the the email okay, but it has a large block of comments
      automatically embedded in the XML. If I keep these comments in the
      XML, my setValue step in the process stalls with the error seen
      below. If I remove the comments from the XML file before submitting,
      everything works fine. Does anyone have any idea how to prevent this
      error? It looks to me like it might possibly be a LiveCycle bug.

      Thanks!
      Justin

      ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException:
      Cannot coerce object: [#comment:
      ******************************************************************************

      If you filled in a form:

      This file contains data that was entered into a form.
      It is not the form itself.

      ******************************************************************************

      If you receive this data file:

      Please follow the directions below to process this data file using
      Adobe Acrobat Professional 7

      **To view the completed form:
      1) Save this data file to your computer.
      2) Open a blank copy of the original PDF form that the form filler
      completed in order to generate this data file.
      3) In Acrobat, choose Advanced > Forms > Import Data to Current
      Form
      and browse for this data file.
      4) You will see the form with the data in it.
      5) To save a copy of the form with the data in it, choose File >
      Save As
      and save the file.

      **To create a spreadsheet from one or more form data files you have
      received:
      1) Save the data files to a place on your computer, giving each
      file a
      unique name and making sure not to delete the '.xml' file
      extension.
      2) In Acrobat, choose File > Form Data > Create Spreadsheet from
      Data Files.
      3) Click the 'Add Files' button to chose the data files.
      4) After the data files are added, click the 'Create Spreadsheet'
      button
      to create a Spreadsheet that contains data from selected data
      files.

      ******************************************************************************]
      of type: org.apache.xerces.dom.DeferredCommentImpl to type: interface
      org.w3c.dom.Text
      at
      com.adobe.workflow.datatype.CoercionUtil.toType(CoercionUtil.java:878)
      at
      com.adobe.workflow.datatype.runtime.impl.xml.XMLDataTypeNode.getBoundValue(XMLDataTypeNod e.java:
      80)
      at
      com.adobe.workflow.datatype.runtime.impl.xml.XMLDataTypeNode.replaceContent(XMLDataTypeNo de.java:
      268)
      at
      com.adobe.workflow.dom.InstanceElement.replaceContent(InstanceElement.java:
      233)
      at
      com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataValue(PATExecutionCo ntextImpl.java:
      726)
      at
      com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataWithExpression(PATEx ecutionContextImpl.java:
      335)