cancel
Showing results for 
Search instead for 
Did you mean: 

Webform data queries

deas0815
Star Contributor
Star Contributor
Hallo everybody,

Assume you have lots of xml content-instances generated using webforms - lets say press-releases.
Now what if you need to show these based on a query ?

Lets say you want all with the word "ad-hoc" in the title ordered by date ?

In Vignette, you would use a query component, and I guess you would also use a component in SURF.

But what is the suggested approach to query the data ?

Would you create an XML Database (like exist) with your form data and run the query against this database ?

Am I missing something ?

best regards
Andreas
5 REPLIES 5

pancham_singh
Champ in-the-making
Champ in-the-making
Did you find answer to your query? I have exact same need.

Thx.

tommorris
Champ in-the-making
Champ in-the-making
Do you need to perform this search query for editorial purposes (before site deployment) or for post site-publication?
Either way, you could use an alfresco webscript (http://wiki.alfresco.com/wiki/Web_Scripts) to search using a lucene query, but if it's needed as a 'live' site service (post publication) then you'll need to deploy your site using the alfresco ASR (http://wiki.alfresco.com/wiki/ASR) to a remote alfresco instance.

The lucene query may look something like:
+ASPECT:"{http://www.alfresco.org/model/wcmappmodel/1.0}forminstancedata" +wca\Smiley Tonguearentformname:"press-release" +@cm\:name:"ad-hoc"

If you don't want to publish to another alfresco instance (or use the 'internal' editorial environment as your 'live' environment..!) then publishing out your files using the FSR (http://wiki.alfresco.com/wiki/FSR) to a remote server with a listening search engine ready to perfrom a re-index, is a workable way to go.

Tom
http://www.ixxus.com

deas0815
Star Contributor
Star Contributor
Hi Tom,

thanks for pointing out some approaches.

I would prefer to avoid the SURF app using http to talk to an alfresco repo for stability reasons. Its not that I don't trust
the repo, but reading data from the filesystem (on the live site) is definitely the more stable approach in general. Smiley Wink

As webforms generate xml, xml based technology seemed like the natural choice to me. Hence, I was considering a
XML database.

Looks like "query based components" is a field where alfresco needs a little improvement.

regards
Andreas

tommorris
Champ in-the-making
Champ in-the-making
Fair enough.
If you want your live web environment to be completely de-coupled from alfresco, using the FSR might be a good way to go…
Remember, you can add a 'post-deploy' trigger on the FSR so that a waiting task can execute once the files have been delivered.
This could be used to perform a re-index on the XML database.

deas0815
Star Contributor
Star Contributor
Hi Tom,

I'm not complaining ! Smiley Happy

Just trying to figure out where to hook in/how to extend.

Besides, thanks for  mentioning the post-deploy trigger mechanism. I have not yet looked very close at the receivers, but
I felt like I might need something like that to invalidate caches. Smiley Happy

thanks
Andreas