How to get the instance data xml from a form - Please help

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

How to get the instance data xml from a form - Please help

Vedha
We are new to Orbeon forms and facing lots of issues because of our knowledge. We need your help for resolving one of our problem.

We just have a xForm constraints file, (similar to one available in the xform-espresso sample file). When i opened that in browser using

http://localhost:8080/orbeon/xforms-espresso/

then i change some of the dropdown values, it sends some Ajax request and updates some other values,

I know Orbeon will maintain this form status internally using a uid. I need to extract this instance data from Orbeon using a GET request. Please help.
Reply | Threaded
Open this post in threaded view
|

Re: How to get the instance data xml from a form - Please help

Alessandro  Vernet
Administrator
Hi Vedha,

If you knew the UUID sent to the user when she loaded a form, you
could, in theory, get the state of her instances from the server. But
in general, this isn't how things are done; instead, it is some logic
in the form that sends the data (POST) to a service. This is done with
an xf:submission in XForms, e.g. when the user clicks on a submit
button, the data is POSTed to a service you provide. Is this something
that could work for you?

Also, is this for a new form you're creating? Because if it is, maybe
you can use Form Builder to create the form, instead of doing it "by
hand". Would that be a possibility?

Alex

On Wed, Apr 22, 2015 at 11:21 AM, Vedha <[hidden email]> wrote:

> We are new to Orbeon forms and facing lots of issues because of our
> knowledge. We need your help for resolving one of our problem.
>
> We just have a xForm constraints file, (similar to one available in the
> xform-espresso sample file). When i opened that in browser using
>
> http://localhost:8080/orbeon/xforms-espresso/
>
> then i change some of the dropdown values, it sends some Ajax request and
> updates some other values,
>
> I know Orbeon will maintain this form status internally using a uid. I need
> to extract this instance data from Orbeon using a GET request. Please help.
>
>
> --
> View this message in context: http://discuss.orbeon.com/How-to-get-the-instance-data-xml-from-a-form-Please-help-tp4659831.html
> Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.
>
> --
> 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 [hidden email].
> To post to this group, send email to [hidden email].

--
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 [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: How to get the instance data xml from a form - Please help

Vedha
Thanks for your reply Alessandro Vernet. Yes the form is completely a new Form designed by separate
group of people, so i am not in a position to use FormBuilder now. I am asking something like this,

Example:
Application: xforms-espresso - one which is available inside Orbeon

xFrom file: espresso-order.xhtml

Instance data:
            <xf:instance id="order">
                <order xmlns="">
                    <item>
                        <name>Special Club 2009 - Singatoba</name>
                        <image src="img/00748.gif"/>
                        <price>0.62</price>
                        <quantity/>
                    </item>
                    <item>
                        <name>Dulsão do Brasil</name>
                        <image src="img/02463.jpg"/>
                        <price>0.62</price>
                        <quantity/>
                    </item>
                     .......
                    </xf:instance>

Scenario: When i load this form from url - http://localhost:8080/orbeon/xforms-espresso/

And change any drop down value, it sends a Ajax request to do some modification to my form instance data. I read in Orbeon forum that, current Form instance data will be available inside Orbeon server anytime by default.

At this point, is it possible to access the instance data in Orbean server? Will Orbeon save the instance data in Exist db all the time?

The reason i need to access instance data is, some of the actions in my Form will trigger an update into instance data which will not be part of UI, and i need to access them to manipulate further.

Please help. Banging around this for more than two days.

Reply | Threaded
Open this post in threaded view
|

Re: How to get the instance data xml from a form - Please help

Alessandro  Vernet
Administrator
Hi Vedha,

The data is on the server, but not in eXist. (It is in memory, and if
the form has not been accessed for a while, can be migrated to disk,
through Ehcache.) The question is: what are the actions that users
perform on the form that require updates in the instance? Would you
have an example of such actions?

Alex

On Wed, Apr 22, 2015 at 11:55 AM, Vedha <[hidden email]> wrote:

> Thanks for your reply Alessandro Vernet. Yes the form is completely a new
> Form designed by separate
> group of people, so i am not in a position to use FormBuilder now. I am
> asking something like this,
>
> Example:
> Application: xforms-espresso - one which is available inside Orbeon
>
> xFrom file: espresso-order.xhtml
>
> Instance data:
>             <xf:instance id="order">
>                 <order xmlns="">
>                     <item>
>                         <name>Special Club 2009 - Singatoba</name>
>                         <image src="img/00748.gif"/>
>                         <price>0.62</price>
>                         <quantity/>
>                     </item>
>                     <item>
>                         <name>Dulsão do Brasil</name>
>                         <image src="img/02463.jpg"/>
>                         <price>0.62</price>
>                         <quantity/>
>                     </item>
>                      .......
>                     </xf:instance>
>
> Scenario: When i load this form from url -
> http://localhost:8080/orbeon/xforms-espresso/
>
> And change any drop down value, it sends a Ajax request to do some
> modification to my form instance data. I read in Orbeon forum that, current
> Form instance data will be available inside Orbeon server anytime by
> default.
>
> At this point, is it possible to access the instance data in Orbean server?
> Will Orbeon save the instance data in Exist db all the time?
>
> The reason i need to access instance data is, some of the actions in my Form
> will trigger an update into instance data which will not be part of UI, and
> i need to access them to manipulate further.
>
> Please help. Banging around this for more than two days.
>
>
>
> --
> View this message in context: http://discuss.orbeon.com/How-to-get-the-instance-data-xml-from-a-form-Please-help-tp4659831p4659833.html
> Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.
>
> --
> 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 [hidden email].
> To post to this group, send email to [hidden email].

--
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 [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: How to get the instance data xml from a form - Please help

Vedha
Yeah, finally understood how Orbeon works. Thanks for explaining.. :)

Our scenario is like below, if user USER sets a Form field A to some value, i need to create a new value B in the instance. Yeah quite rare scenario.
Reply | Threaded
Open this post in threaded view
|

Re: How to get the instance data xml from a form - Please help

Alessandro  Vernet
Administrator
Hi Vedha,

OK, that helps, but could you make that example even more specific:
Why doesn't B exist right away when the form is loaded? Does the value
in B depends on A, or on something in backend; i.e. how is the value
in B calculated?

(Depending on your answers to those questions, you might not even need
to call a service, and might be able to do everything in the form with
XForms.)

Alex

On Thu, Apr 23, 2015 at 11:59 AM, Vedha <[hidden email]> wrote:

> Yeah, finally understood how Orbeon works. Thanks for explaining.. :)
>
> Our scenario is like below, if user USER sets a Form field A to some value,
> i need to create a new value B in the instance. Yeah quite rare scenario.
>
> --
> View this message in context: http://discuss.orbeon.com/How-to-get-the-instance-data-xml-from-a-form-Please-help-tp4659831p4659840.html
> Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.
>
> --
> 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 [hidden email].
> To post to this group, send email to [hidden email].

--
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 [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet