Problem to send an ID by send to service in a save-draft button

12 views
Skip to first unread message

falba

unread,
Jun 25, 2021, 6:27:58 AM6/25/21
to Orbeon Forms

Hello,

We are trying to save a form without validating its content (so far without problems with the save-draft), but we also need to obtain the ID of the form, to redirect the user in the JavaAPI, when the form is resumed by the user.

This is where we get a strange error, it's like it only accepts https, but we have other button processes that send to http in the sandbox.

I paste the local properties and the error code

Greetings and thanks,
Patxi


<property as="xs:string" name="oxf.fr.detail.buttons.Proves.esborrany">
        save-draft
        save-final
    </property>

    <property
        as="xs:string"
        name="oxf.fr.resource.*.*.en.buttons.save-draft"
        value="Esborrany"/>

    <property as="xs:string" name="oxf.fr.detail.process.save-draft.Proves.esborrany">
        <!-- then send(
            uri        = "http://localhost:8080/formularis/ServletEnviaId",
            method     = "POST",
            content    = "metadata"
        ) -->
        recover navigate("http://localhost:8080/formularis/GuardatIncorrecte.html")
    </property>


2021-06-25 11:04:05,280 INFO  lifecycle  - event: {"request": "17", "session": "24FEC5A7DCD9A53C27D0BE3B3A755C1C", "source": "fr", "message": "start: process", "uuid": "b7b74f04451e00c5e5c56d005352e5d09fb0b677", "scope": "oxf.fr.detail.process", "name": "save-draft"}
2021-06-25 11:04:05,284 ERROR XFormsServer  -
+----------------------------------------------------------------------------------------------------------------------+
|An Error has Occurred                                                                                                 |
|----------------------------------------------------------------------------------------------------------------------|
|Invalid source:                                                                                                       |
|Invalid input 's', expected ' ', '\n', '\r', '\t', '\f', Combinator or EOI (line 1, pos 6):                           |
|then send(                                                                                                            |
|"http://localhost:8080/formularis/ServletEnviaId/")                                                                   |
|     ^                                                                                                                |
|----------------------------------------------------------------------------------------------------------------------|
|Application Call Stack                                                                                                |
|----------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------|
|Exception: org.parboiled.errors.ParsingException                                                                      |
|----------------------------------------------------------------------------------------------------------------------|
|org.orbeon.oxf.fr.process.ProcessParser$           |parse                         |ProcessParser.scala           | 121|
|n.oxf.fr.process.ProcessInterpreter$ProcessRuntime$|$anonfun$runSubProcess$16     |ProcessInterpreter.scala      | 196|
|org.orbeon.oxf.util.CoreUtils$BooleanOps$          |option$extension              |CoreUtils.scala               |  34|
|n.oxf.fr.process.ProcessInterpreter$ProcessRuntime$|parseProcess$1                |ProcessInterpreter.scala      | 196|
|n.oxf.fr.process.ProcessInterpreter$ProcessRuntime$|runSubProcess                 |ProcessInterpreter.scala      | 198|
|org.orbeon.oxf.fr.process.ProcessInterpreter       |$anonfun$runProcess$6         |ProcessInterpreter.scala      | 231|
|scala.util.control.Breaks$$anon$1                  |catchBreak                    |Breaks.scala                  |  67|
|org.orbeon.oxf.fr.process.ProcessInterpreter       |$anonfun$runProcess$5         |ProcessInterpreter.scala      | 233|
|scala.util.Success                                 |flatMap                       |Try.scala                     | 251|
|org.orbeon.oxf.fr.process.ProcessInterpreter       |$anonfun$runProcess$4         |ProcessInterpreter.scala      | 229|
|org.orbeon.oxf.util.DynamicVariable                |withValue                     |DynamicVariable.scala         |  42|
|n.oxf.fr.process.ProcessInterpreter$ProcessRuntime$|withEmptyStack                |ProcessInterpreter.scala      |  92|
|org.orbeon.oxf.fr.process.ProcessInterpreter       |$anonfun$runProcess$3         |ProcessInterpreter.scala      | 237|
|org.orbeon.oxf.util.Logging                        |withDebug                     |Logging.scala                 |  50|
|org.orbeon.oxf.util.Logging                        |withDebug$                    |Logging.scala                 |  45|
|org.orbeon.oxf.fr.process.SimpleProcess$           |withDebug                     |SimpleProcess.scala           |  41|
|org.orbeon.oxf.fr.process.ProcessInterpreter       |runProcess                    |ProcessInterpreter.scala      | 225|
|org.orbeon.oxf.fr.process.ProcessInterpreter       |runProcess$                   |ProcessInterpreter.scala      | 224|
|org.orbeon.oxf.fr.process.SimpleProcess$           |runProcess                    |SimpleProcess.scala           |  41|
|org.orbeon.oxf.fr.process.ProcessInterpreter       |$anonfun$runProcessByName$1   |ProcessInterpreter.scala      | 219|
|org.orbeon.oxf.logging.LifecycleLogger$            |withEvent                     |LifecycleLogger.scala         | 126|
|org.orbeon.oxf.logging.LifecycleLogger$            |withEventAssumingRequest      |LifecycleLogger.scala         | 119|
|org.orbeon.oxf.fr.process.ProcessInterpreter       |runProcessByName              |ProcessInterpreter.scala      | 219|
|org.orbeon.oxf.fr.process.ProcessInterpreter       |runProcessByName$             |ProcessInterpreter.scala      | 217|
|org.orbeon.oxf.fr.process.SimpleProcess$           |runProcessByName              |SimpleProcess.scala           |  41|
|f.fr.library.FormRunnerFunctions$FRRunProcessByName|evaluateItem                  |FormRunnerFunctionLibrary.scal| 224|
|f.fr.library.FormRunnerFunctions$FRRunProcessByName|evaluateItem                  |FormRunnerFunctionLibrary.scal| 222|
|org.orbeon.saxon.expr.LazyExpression               |evaluateItem                  |LazyExpression.java           |  86|
|org.orbeon.saxon.value.SingletonClosure            |asItem                        |SingletonClosure.java         |  75|
|org.orbeon.saxon.value.SingletonClosure            |iterate                       |SingletonClosure.java         |  51|
|org.orbeon.saxon.value.Value                       |getIterator                   |Value.java                    | 202|
|org.orbeon.saxon.expr.VariableReference            |iterate                       |VariableReference.java        | 434|
|org.orbeon.saxon.expr.SlashExpression              |map                           |SlashExpression.java          | 461|
|org.orbeon.saxon.expr.ContextMappingIterator       |next                          |ContextMappingIterator.java   |  53|
|org.orbeon.scaxon.Implicits$$anon$2                |<init>                        |Implicits.scala               |  75|
|org.orbeon.scaxon.Implicits$                       |asScalaIterator               |Implicits.scala               |  73|
|org.orbeon.oxf.util.PooledXPathExpression          |$anonfun$evaluateKeepItems$1  |PooledXPathExpression.scala   |  96|
|org.orbeon.oxf.util.DynamicVariable                |withValue                     |DynamicVariable.scala         |  42|
|org.orbeon.oxf.util.XPath$                         |withFunctionContext           |XPath.scala                   |  62|
|org.orbeon.oxf.util.PooledXPathExpression          |evaluateKeepItems             |PooledXPathExpression.scala   |  96|
|---8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<---|
|org.orbeon.oxf.webapp.ProcessorService$            |withProcessorService          |ProcessorService.scala        | 146|
|org.orbeon.oxf.servlet.OrbeonServlet               |service                       |OrbeonServlet.scala           |  76|
|javax.servlet.http.HttpServlet                     |service                       |HttpServlet.java              | 741|
|org.apache.catalina.core.ApplicationFilterChain    |internalDoFilter              |ApplicationFilterChain.java   | 231|
|org.apache.catalina.core.ApplicationFilterChain    |doFilter                      |ApplicationFilterChain.java   | 166|
|org.apache.tomcat.websocket.server.WsFilter        |doFilter                      |WsFilter.java                 |  53|
|org.apache.catalina.core.ApplicationFilterChain    |internalDoFilter              |ApplicationFilterChain.java   | 193|
|org.apache.catalina.core.ApplicationFilterChain    |doFilter                      |ApplicationFilterChain.java   | 166|
|org.orbeon.oxf.servlet.FormRunnerAuthFilter        |doFilter                      |FormRunnerAuthFilter.scala    |  51|
|org.apache.catalina.core.ApplicationFilterChain    |internalDoFilter              |ApplicationFilterChain.java   | 193|
|org.apache.catalina.core.ApplicationFilterChain    |doFilter                      |ApplicationFilterChain.java   | 166|
|org.orbeon.oxf.servlet.LimiterFilter               |$anonfun$doFilter$3           |LimiterFilter.scala           |  85|
|scala.runtime.java8.JFunction0$mcV$sp              |apply                         |JFunction0$mcV$sp.java        |  23|
|org.orbeon.oxf.logging.LifecycleLogger$            |withEvent                     |LifecycleLogger.scala         | 126|
|org.orbeon.oxf.servlet.LimiterFilter               |$anonfun$doFilter$2           |LimiterFilter.scala           |  85|
|scala.runtime.java8.JFunction0$mcV$sp              |apply                         |JFunction0$mcV$sp.java        |  23|
|org.orbeon.oxf.logging.LifecycleLogger$            |withEvent                     |LifecycleLogger.scala         | 126|
|org.orbeon.oxf.servlet.LimiterFilter               |$anonfun$doFilter$1           |LimiterFilter.scala           |  78|
|org.orbeon.oxf.servlet.LimiterFilter               |$anonfun$doFilter$1$adapted   |LimiterFilter.scala           |  72|
|scala.Option                                       |foreach                       |Option.scala                  | 407|
|org.orbeon.oxf.servlet.LimiterFilter               |doFilter                      |LimiterFilter.scala           |  72|
|org.apache.catalina.core.ApplicationFilterChain    |internalDoFilter              |ApplicationFilterChain.java   | 193|
|org.apache.catalina.core.ApplicationFilterChain    |doFilter                      |ApplicationFilterChain.java   | 166|
|org.apache.catalina.core.StandardWrapperValve      |invoke                        |StandardWrapperValve.java     | 202|
|org.apache.catalina.core.StandardContextValve      |invoke                        |StandardContextValve.java     |  96|
|org.apache.catalina.authenticator.AuthenticatorBase|invoke                        |AuthenticatorBase.java        | 541|
|org.apache.catalina.core.StandardHostValve         |invoke                        |StandardHostValve.java        | 139|
|org.apache.catalina.valves.ErrorReportValve        |invoke                        |ErrorReportValve.java         |  92|
|org.apache.catalina.valves.AbstractAccessLogValve  |invoke                        |AbstractAccessLogValve.java   | 688|
|org.apache.catalina.core.StandardEngineValve       |invoke                        |StandardEngineValve.java      |  74|
|org.apache.catalina.connector.CoyoteAdapter        |service                       |CoyoteAdapter.java            | 343|
|org.apache.coyote.http11.Http11Processor           |service                       |Http11Processor.java          | 373|
|org.apache.coyote.AbstractProcessorLight           |process                       |AbstractProcessorLight.java   |  65|
|rg.apache.coyote.AbstractProtocol$ConnectionHandler|process                       |AbstractProtocol.java         | 868|
|.apache.tomcat.util.net.NioEndpoint$SocketProcessor|doRun                         |NioEndpoint.java              |1594|
|org.apache.tomcat.util.net.SocketProcessorBase     |run                           |SocketProcessorBase.java      |  49|
|java.util.concurrent.ThreadPoolExecutor            |runWorker                     |ThreadPoolExecutor.java       |1149|
|java.util.concurrent.ThreadPoolExecutor$Worker     |run                           |ThreadPoolExecutor.java       | 624|
|che.tomcat.util.threads.TaskThread$WrappingRunnable|run                           |TaskThread.java               |  61|
|java.lang.Thread                                   |run                           |Thread.java                   | 748|
+----------------------------------------------------------------------------------------------------------------------+

Jarosław Kowalewski

unread,
Jun 25, 2021, 6:57:29 AM6/25/21
to orb...@googlegroups.com
Hi, remove an extra 'then' and it should work. 

//Jarek

 <property as="xs:string" name="oxf.fr.detail.process.save-draft.Proves.esborrany">
        <!-- then send(
            uri        = "http://localhost:8080/formularis/ServletEnviaId",
            method     = "POST",
            content    = "metadata"
        ) -->
        recover navigate("http://localhost:8080/formularis/GuardatIncorrecte.html")
    </property>

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orbeon+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/65c40b24-6501-483c-9f0d-6fe3ab5dca00n%40googlegroups.com.

Patxi Alba

unread,
Jun 29, 2021, 12:53:20 PM6/29/21
to Orbeon Forms
Thank you very much, what a silly mistake: P
Reply all
Reply to author
Forward
0 new messages