Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Cannot coerce object:

Avatar

Level 7
I have setup an Email Endpoint to invoke the process. Once the email document is received, I have set it to "Assign a Task".



The process in invoked, with the above error. The variable's input parameter in the Endpoint is "*.pdf" and the variable type is xfaForm.



Thank you in advance for helping.
15 Replies

Avatar

Level 10
You can't put a PDF in a xfaForm variable. The xfaForm variable can only contain the form data but not the entire PDF.



If you want to use the PDF, you need to use a Document Form variable.



So you should use a 'document' input variable to get the document from the email, then use a SetValue and put that document into the Document Form/object/document property of a 'Document Form' variable. Finally use the Document Form variable in the Assign Task service



Jasmin

Avatar

Level 7
It worked !



I want to use the data from the form for prepopulating in the task intructions, using the email address to reply or retreving data, how can I use XPATH to map the data ?



Usually, when I use Form, DocumentForm or xfaForm variables I can use the XSD from the form as an XPATH map to manipulate data.



Thank you for helping Jasmin.

Avatar

Level 7
Do you suggest any alternate way of rendering the form in Workspace ?



How can it be achieved ?

Avatar

Level 10
You could extract the data from the PDF using Export Data (Form Data Integration service under Common) and put that in an xml variable. Then use xPath to get the value you need.



Jasmin

Avatar

Level 7
I tried to export the data from a PDF and assign it to an XML variable (with xsd). When I view the form in Workspace I get a "xml parser error: Tag mishmatch" error.



I thought it might be an xsd issue. SO I tried with another form and it didn't work either. However, if I use a literal (Actual XML file) it seems to be prepopulating just fine in Workspace.



Is there another way to receive the PDF, change it to a workspace enabled form and also be able to prepopulate ?

Avatar

Level 10
You receive the PDF, then extract the data, change any data element you want then re-import the data in the PDF.



The user step always has to either use a xfaForm or Document Form. xfaForm will only work with XDP. Document Form will work with PDF and XDP.



Jasmin

Avatar

Level 7
I am trying to do 2 things to the PDF document received by email



1) Make it workspace enabled so that the user can approve or decline it



2) Use data from the PDF for further functionality.



By assigning the document variable to the DocumentForm type, I can view the PDF in Workspace, but unable to submit, approve or decline it.

Avatar

Level 10
Do you have a submit button on you PDF? You need that to be able to submit.



Are you adding the form bridge to the PDF to enable the communication between the submit button on the form and the Workspace interface (FormAugmenterService from Inject Form Bridge service under Process Managment)?



Jasmin

Avatar

Level 7
I have added the Process fields in the form, which included the submit button.



I have also used the Form Augmenter Service in Workbench.



The strange part is when the PDF(DocumentForm variable) is viewed in Workspace, the complete/approve/decline buttons appear but I cannot proceed ahead.



For arguments, I used a PDF form, in Workspace, which validates mandatory fields before submission. The same validation kicks off when I click the complete/approve/decline button but it doesn't proceed to the next stage.



I have added an execute script module (as a place holder) in the next step to complete the workflow.

Avatar

Level 10
Ok. You need to set the Submit URL of the submit button to http://
:/workspace-server/submit.



The problem right now is it doesn't know where to submit to since you didn't render the PDF using LC Forms.



Jasmin

Avatar

Level 7
I get an error message "http:// ... /workspace/submit is not available"



I don't think adding the Submit URL was the answer. I fail to understand how that same form (without adding the Submit URL) works fine when it is a part of a workflow using it as an xfaForm variable. When assigned to DocumentForm or Document, it just doesn't work.



All I am trying to make workspace do, by clicking approve,decline or complete, is to finish the workflow. It seems to be harder than it looks.



It is something very basic, I am missing. Can you have a look at my workflow ? or suggest me an alternative. I need to get this done and I am really stuck.



Thanks for the help provided so far.



Aditya

Avatar

Level 7
Sorry I had a typo in the SubmitURL. Upon correcting the typo, I got an exception.



What I would like to know is do I need to add an independent button or include as a part of the process fields button and where do I include the Submit URL ?



The exception error I got was



"type Exception report



message



description The server encountered an internal error () that prevented it from fulfilling this request.



exception



flex.messaging.MessageException: ALC-WKS-005-092: A problem occurred when calling the submit service to perform a server-side calculate. The task id could not be found.

com.adobe.workspace.AssemblerUtility.createMessageException(AssemblerUtility.java:369)

com.adobe.workspace.tasks.DocumentSubmitServlet.doPost(DocumentSubmitServlet.java:177)

javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

com.adobe.workspace.events.RemoteEventClientLifeCycle.doFilter(RemoteEventClientLifeCycle.java:138)

org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)



"

Avatar

Level 7
Got it to work !!



I am able to click Approve/Decline to complete the process.



However, I am having trouble with embedding Digital Signatures. For this, I have created another topic.



Thank you very much for helping. You're an ace !!



Aditya

Avatar

Former Community Member
I am getting the same error:

flex.messaging.MessageException: ALC-WKS-005-092: A problem occurred when calling the submit service to perform a server-side calculate. The task id could not be found.

when I click "Complete" on a workspace enabled pdf form.

Submit button submits PDF, not xdp.



Aditya, what you did to make it work?!

Avatar

Level 7
Have you used the submit URL http://
:/workspace-server/submit ?



The above URL is what I used to submit the PDF in Workspace. It worked for me.