requirement failed: action 'pdf' is not supported

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

requirement failed: action 'pdf' is not supported

javaudvikling
HI,

I'm using Orbeon v. 4.3.1.

can anyone tell me why this config is not working, when i press the Send button:

<property as="xs:string"  name="oxf.fr.detail.buttons.*.*" value="pdf save send"/>       

<property as="xs:boolean" name="oxf.fr.detail.send.email.*.*" value="true"/>

<property as="xs:string"  name="oxf.fr.email.smtp.host.*.*" value="smtp.gmail.com"/>
<property as="xs:string"  name="oxf.fr.email.smtp.port.*.*" value="587"/>
<property as="xs:string"  name="oxf.fr.email.smtp.username.*.*" value="dummyprojectmail@gmail.com"/>
<property as="xs:string"  name="oxf.fr.email.smtp.credentials.*.*" value="******"/>
<property as="xs:string"  name="oxf.fr.email.smtp.encryption.*.*" value="tls"/>
<property as="xs:string" name="oxf.fr.email.to.*.*" value="dummyprojectmail@gmail.com"/>

<property as="xs:boolean" name="oxf.fr.email.attach-pdf.*.*" value="true"/>
<property as="xs:boolean" name="oxf.fr.email.attach-xml.*.*" value="true"/>


<property
  as="xs:string"
  name="oxf.fr.detail.process.send.*.*"
  value='require-valid
         then pdf
         then email
         then send("http://localhost:8080/examples/jsp/jsp2/tagfiles/hello.jsp")
         then navigate("http://localhost:8080/examples/jsp/jsp2/tagfiles/ok.jsp")
         recover navigate("http://localhost:8080/examples/jsp/jsp2/tagfiles/test.jsp")'/>


I get the following error:

+----------------------------------------------------------------------------------------------------------------------+
|An Error has Occurred                                                                                                 |
|----------------------------------------------------------------------------------------------------------------------|
|requirement failed: action 'pdf' is not supported, must be one of: validate-all, orbeon-home, failure, expand-all, ref|
|----------------------------------------------------------------------------------------------------------------------|
|Application Call Stack                                                                                                |
|----------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------|
|Exception: java.lang.IllegalArgumentException                    
Reply | Threaded
Open this post in threaded view
|

Re: requirement failed: action 'pdf' is not supported

Alessandro  Vernet
Administrator
This is because there is no pdf action. I think you can just use the email action, and if the property oxf.fr.email.attach-xml.*.* is set, it will generate and attach the PDF to the email as part of that action. You'll let us know if this works for you.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: requirement failed: action 'pdf' is not supported

javaudvikling
Hi Alex,

I got the email setting to work, but rightnow i need the pdf setting to work. When i Call the URL the XML and pdf need to eb sent to my service.
What do you mean by that there is no action. Do i have to define it?
Can you help me with the correct setting to get pdf action to work.


Regards
Balatharan
 
Reply | Threaded
Open this post in threaded view
|

Re: requirement failed: action 'pdf' is not supported

Alessandro  Vernet
Administrator
Hi Balatharan,

I was referring to the note "NOTE: As of Orbeon Forms 4.2, the clear and pdf buttons are not implemented as processes but handled directly by Form Runner.", from:

https://github.com/orbeon/orbeon-forms/wiki/Form-Runner:-Buttons-and-Processes#associating-a-process-with-a-button

You don't need to have a pdf action, and you can just remove it. Telling Orbeon to send an email is now enough, and it will attach the PDF for you. The email process is now defined as:

<property as="xs:string"  name="oxf.fr.detail.process.email.*.*" value='require-uploads then validate-all then email then success-message("email-success")'/>

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet