I have a form in Orbeon Form runner where I needed to add external validation before submitting with 'workflow-send'. Can we add capability to 'workflow-send' button in properties-local.xml for that?
For the record, I have also implemented a button which does the validation and does certain actions when the validation results come back. So alternatively, can we add 'workflow-send' capability to that button of mine? |
Hi,
you can configure which buttons are shown on which page, so perhaps you can add your functionality to the button that takes the user to the view page (workflow-review) and only show the workflow-send button on that page? Beyond that, I'd like to know how you made your button do those things! Groetjes, Koen Vanderkimpen Research/Recherche/Onderzoek Connect: "there are two hard things in computer science: cache invalidation, naming things, and off-by-one errors" (Phil Karlton et al) From: Dagvadorj <[hidden email]> To: [hidden email] Date: 05/11/2012 03:55 Subject: [ops-users] Adding pre-processing stage into send-workflow button in Orbeon XForms Form runner I have a form in Orbeon Form runner where I needed to add external validation before submitting with 'workflow-send'. Can we add capability to 'workflow-send' button in properties-local.xml for that? For the record, I have also implemented a button which does the validation and does certain actions when the validation results come back. So alternatively, can we add 'workflow-send' capability to that button of mine? -- View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Adding-pre-processing-stage-into-send-workflow-button-in-Orbeon-XForms-Form-runner-tp4655953.html Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] OW2 mailing lists service home page: http://www.ow2.org/wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Following is the submission code that my button calls:
<xforms:submission id="validation-submission" ref="instance('fr-form-instance')"
method="post" replace="instance" instance="validation-result">
<!-- Clear external errors just before doing external validation --> <xforms:delete ev:event="xforms-submit" nodeset="//@v:*" />
<xforms:action ev:event="xforms-submit-done"> <!-- Insert external validation results when done -->
<xforms:insert nodeset="." origin="instance('validation-result')/v:data/*" />
<!-- Show all errors on form --> <xforms:dispatch name="fr-visit-all" targetid="error-summary" />
<!-- Update error summary for incremental mode --> <xforms:refresh />
<xforms:dispatch name="fr-update" targetid="error-summary" /> <xforms:send submission="post-submission"
if="count(instance('validation-result')/v:global-errors/*) = 0" />
<!-- xforms:send if="count(instance('validation-result')/v:global-errors/*) = 0"
submission="fr-workflow-send-submission" / --> </xforms:action>
</xforms:submission> Basically, it sends model instance to a servlet and perform some actions based on its response: that is show errors if there are, call another action if not.
What I want to do is put this functionality before whatever workflow-send button does and invoke workflow-send if there are no errors returned. Alternatively of course, I can put that button in fr:buttons. But putting workflow-send actions to a custom button seems hard.
A way to do it maybe editing persistence-model.xml. However any change to it is not active. Can anyone help me? On 5 November 2012 18:40, <[hidden email]> wrote: Hi, Dagvadorj Galbadrakh -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |