Adding pre-processing stage into send-workflow button in Orbeon XForms Form runner

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

Adding pre-processing stage into send-workflow button in Orbeon XForms Form runner

Dagvadorj
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?
Reply | Threaded
Open this post in threaded view
|

Re: Adding pre-processing stage into send-workflow button in Orbeon XForms Form runner

koenvdk
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: Twitter

"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








Overeenkomstig de bepalingen inzake de vertegenwoordiging van de vzw in haar statuten, kan enkel de gedelegeerde bestuurder, de algemeen directeur of zijn uitdrukkelijke lasthebber verbintenissen aangaan namens Smals.
Indien dit bericht niet voor u bestemd is, verzoeken wij u dit onmiddellijk aan ons te melden en het bericht te vernietigen.

Conformément aux dispositions relatives à la représentation de l'asbl dans ses statuts, seul l'administrateur délégué, le directeur général ou son mandataire exprès est habilité à souscrire des engagements au nom de Smals.
Si ce message ne vous est pas destiné, nous vous prions de nous le signaler immédiatement et de détruire le message.

According to the provisions regarding representation of the non profit association in its bylaws, only the chief executive officer, the general manager or his explicit agent can enter into engagements on behalf of Smals.
If you are not the addressee of this message, we kindly ask you to signal this to us immediately and to delete the message.





--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Adding pre-processing stage into send-workflow button in Orbeon XForms Form runner

Dagvadorj
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,

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: Twitter

"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








Overeenkomstig de bepalingen inzake de vertegenwoordiging van de vzw in haar statuten, kan enkel de gedelegeerde bestuurder, de algemeen directeur of zijn uitdrukkelijke lasthebber verbintenissen aangaan namens Smals.
Indien dit bericht niet voor u bestemd is, verzoeken wij u dit onmiddellijk aan ons te melden en het bericht te vernietigen.

Conformément aux dispositions relatives à la représentation de l'asbl dans ses statuts, seul l'administrateur délégué, le directeur général ou son mandataire exprès est habilité à souscrire des engagements au nom de Smals.
Si ce message ne vous est pas destiné, nous vous prions de nous le signaler immédiatement et de détruire le message.

According to the provisions regarding representation of the non profit association in its bylaws, only the chief executive officer, the general manager or his explicit agent can enter into engagements on behalf of Smals.
If you are not the addressee of this message, we kindly ask you to signal this to us immediately and to delete the message.






--
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