On Wed, May 14, 2008 at 6:41 PM, Diego Moreno <[EMAIL PROTECTED]> wrote: > > @worklist = Worklist.new(session[:user]) > string_query = "what?" > workitems_by_type_and_space = @worklist.search(string_query)
Hello Diego, this search feature is very primitive, the piece of code you have here will return all the workitems whose participants matches what? plus all workitems that contain a field with the string what? in its name or in its value. http://github.com/jmettraux/ruote/tree/master/lib/openwfe/extras/participants/activeparticipants.rb#L375-402 http://github.com/jmettraux/ruote/tree/master/lib/openwfe/extras/participants/activeparticipants.rb#L522-533 You might probably want to write a custom [ActiveRecord based] function for searching by type and namespace like OpenWFE::Extras::Field.find_by_fkey_and_svalue("type", my_type) or write a custom SQL query or load all workitems in a store and programatically extract the ones that match your criteria or have a composite field "#{type}_#{spacename}" and lookup for things like "fruit_spaceout" or "vegetable_spaceshuttle" or store your data in traditional table with a reference to a workitem id (if in a process), query the data and then lookup the referenced workitems. It all depends on your use case. Best regards, I hope this helps, -- John Mettraux - http://jmettraux.wordpress.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "OpenWFEru users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/openwferu-users?hl=en -~----------~----~----~----~------~----~------~--~---
