DOCUMENT ID for XFORM in form runner

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

DOCUMENT ID for XFORM in form runner

Gaurav Shah
Hi,

I need to get the document id for each form that gets submitted via form runner. I need to get it at the time the "form save" happiness. How do I do this? Where is the ID generated ? Is there any event mechanism where my code gets executed with EVENT object and I can get the document ID?
Any help on this will be appreciated.
Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: DOCUMENT ID for XFORM in form runner

Erik Bruchez
Administrator
Although this might change in the future, the document id is available as:

  xxforms:instance('fr-parameters-instance')/document

Now as to an event occurring when the Save button is called, there
isn't really such a thing at the moment.

What are you looking to do when that happens?

And must that occur before or after saving?

-Erik

On Thu, Jun 3, 2010 at 1:44 PM, Gaurav Shah <[hidden email]> wrote:

>
> Hi,
>
> I need to get the document id for each form that gets submitted via form
> runner. I need to get it at the time the "form save" happiness. How do I do
> this? Where is the ID generated ? Is there any event mechanism where my code
> gets executed with EVENT object and I can get the document ID?
> Any help on this will be appreciated.
> Thanks.
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/DOCUMENT-ID-for-XFORM-in-form-runner-tp2242339p2242339.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: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> 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
Reply | Threaded
Open this post in threaded view
|

Re: DOCUMENT ID for XFORM in form runner

Gaurav Shah
I need to integrate Orbeon forms with another application. for that, any time a form instance is created I need to store the document-Id in the other app's DB.
I started looking into different options, and I think I need to write my custom processor which can take document-id as input and update the other-db. Here is where I got stuck.
 
Gaurav


 
On Thu, Jun 3, 2010 at 10:31 PM, Erik Bruchez [via Orbeon Forms (ops-users)] <[hidden email]> wrote:
Although this might change in the future, the document id is available as:

  xxforms:instance('fr-parameters-instance')/document

Now as to an event occurring when the Save button is called, there
isn't really such a thing at the moment.

What are you looking to do when that happens?

And must that occur before or after saving?

-Erik

On Thu, Jun 3, 2010 at 1:44 PM, Gaurav Shah <[hidden email]> wrote:

>
> Hi,
>
> I need to get the document id for each form that gets submitted via form
> runner. I need to get it at the time the "form save" happiness. How do I do
> this? Where is the ID generated ? Is there any event mechanism where my code
> gets executed with EVENT object and I can get the document ID?
> Any help on this will be appreciated.
> Thanks.
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/DOCUMENT-ID-for-XFORM-in-form-runner-tp2242339p2242339.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: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> 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







--
Gaurav Shah
Born to make the Difference
http://khantu.spaces.msn.com
---------------------------------------------
The weak can never forgive. Forgiveness is the attribute of the strong.
''Mahatma Gandhi''
Reply | Threaded
Open this post in threaded view
|

Re: Re: DOCUMENT ID for XFORM in form runner

bsteuhl
Why wouldn't you just include that documentID in your instance and after model construct done call a submission to SQL Processor and insert/update the DB?  If you need this insert/update done on a save button or something else, why not just create your own trigger or call that submission on that xforms-submit-done?  Several options depending on when you want to send the data to the DB.
 

Brian Steuhl
website: http://BTMSoftwareSolutions.com
business email: [hidden email]
cell: 908-421-0742

home office: 732-961-3187
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: Gaurav Shah <[hidden email]>
To: [hidden email]
Sent: Fri, June 4, 2010 1:33:24 AM
Subject: [ops-users] Re: DOCUMENT ID for XFORM in form runner

I need to integrate Orbeon forms with another application. for that, any time a form instance is created I need to store the document-Id in the other app's DB.
I started looking into different options, and I think I need to write my custom processor which can take document-id as input and update the other-db. Here is where I got stuck.
 
Gaurav


 
On Thu, Jun 3, 2010 at 10:31 PM, Erik Bruchez [via Orbeon Forms (ops-users)] <[hidden email]> wrote:
Although this might change in the future, the document id is available as:

  xxforms:instance('fr-parameters-instance')/document

Now as to an event occurring when the Save button is called, there
isn't really such a thing at the moment.

What are you looking to do when that happens?

And must that occur before or after saving?

-Erik

On Thu, Jun 3, 2010 at 1:44 PM, Gaurav Shah <[hidden email]> wrote:

>
> Hi,
>
> I need to get the document id for each form that gets submitted via form
> runner. I need to get it at the time the "form save" happiness. How do I do
> this? Where is the ID generated ? Is there any event mechanism where my code
> gets executed with EVENT object and I can get the document ID?
> Any help on this will be appreciated.
> Thanks.
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/DOCUMENT-ID-for-XFORM-in-form-runner-tp2242339p2242339.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: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> 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







--
Gaurav Shah
Born to make the Difference
http://khantu.spaces.msn.com
---------------------------------------------
The weak can never forgive. Forgiveness is the attribute of the strong.
''Mahatma Gandhi''


View this message in context: Re: DOCUMENT ID for XFORM in form runner
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: 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: DOCUMENT ID for XFORM in form runner

Gaurav Shah
You are right. There are probably plenty of options to acheive this. I am a newbie to Orbeon customization and trying to find a best way.
Few things to keep in mind -
1. The user who is creating/designing the form is not going to add anything extra just for sake of this integration to work.
2. I want to update the "other-db" on save only.
Now keeping above two points in mind,
1. Can I still do what you suggested ? "Why wouldn't you just include that documentID in your instance and after model construct done call a submission to SQL Processor and insert/update the DB? "
2. Do you think custom processor is a better approach ?
Thanks All for your help.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: DOCUMENT ID for XFORM in form runner

Erik Bruchez
Administrator
If you use your own persistence layer, or modify an existing one, the
document id is present in all URLs. So you could just use that.

Basically what I am saying is that Form Runner already passes the
document id when loading, saving, and deleting documents, so maybe you
can use that information.

-Erik

On Mon, Jun 7, 2010 at 2:37 PM, Gaurav Shah <[hidden email]> wrote:

> You are right. There are probably plenty of options to acheive this. I am a
> newbie to Orbeon customization and trying to find a best way.
> Few things to keep in mind -
> 1. The user who is creating/designing the form is not going to add anything
> extra just for sake of this integration to work.
> 2. I want to update the "other-db" on save only.
> Now keeping above two points in mind,
> 1. Can I still do what you suggested ? "Why wouldn't you just include that
> documentID in your instance and after model construct done call a submission
> to SQL Processor and insert/update the DB? "
> 2. Do you think custom processor is a better approach ?
> Thanks All for your help.
> ________________________________
> View this message in context: Re: Re: DOCUMENT ID for XFORM in form runner
> 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: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> 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