I have a form that is going to be housed on a corporate intranet. I want to be able to submit the form from stand alone reader and have it initiate a long lived process passing in the submitted form data. The process has as required input an xfaForm variable. I've tried doing this by simply writing a servlet that uses the Invocation API to invoke the service passing in a Document object that contains the submitted form. When I do this I get the following error:<br /><br />2007-09-19 07:49:07,437 INFO [STDOUT] ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: <document state="active" senderVersion="3" persistent="false" senderPersistent="true" passivated="false" senderPassivated="true" deserialized="true" senderHostId="127.0.0.1/192.168.43.1/192.168.164.1/192.168.1.123/" callbackId="0" senderCallbackId="84725" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="1309" contentType="null" length="-1"><cacheId/><localBackendId/><globalBackendId/><senderLocalBackendId/><senderGlobalBackendId/><inline><?xml version="1.0" encoding="UTF-8"?><br /><?xfa generator="XFA2_4" APIVersion="2.6.7116.0"?><br /><xdp:xdp x...</inline><senderPullServantJndiName>adobe/idp/DocumentPullServant/adobejb_server1</senderPullServantJndiName><attributes/></document> of type: com.adobe.idp.Document to type: class com.adobe.idp.taskmanager.form.impl.xfa.XFARepositoryFormInstance<br /><br />So it looks like I need to get my form into an XFARepositoryFormInstance variable. Is there an easy way to do this?! Or am I going about this all wrong?<br /><br />Any help would be appreciated.<br />Bryan
Jasmin - Thanks for the suggestion, however I really want the input variable to be an xfaForm. I feel like I'm trying to the same thing that Workspace does when I start a process from the "Start Process" tab.
I am currently submitting back an XDP, I need to know how to pass this XDP to my process into an XFA Form variable. Is this possible?
- The submit button on the form should submit in XML format
- Your input variable in the workflow should be of type XML
- Your servlet should extract the forms data (as a string), and convert this to a org.w3c.Document, before passing it as the input to your Workflow.
- In your workflow, the first step should be a SetValue QPAC. This should assign the XML data from the input XML variable to the ../data/ node in the xfaForm variable.
You can't coerce directly from your XDP data to a Form variable, because a Form variable is a complex object that contains both the XML data, and a reference to the form. You have to copy over just the XML data into the correct location within an existing xfaForm variable. I think 🙂