NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item11746 for general documentation changes for release 1.1.6. Use Item9693 for docu changes for release 1.2 and 2.0.
You are here: Foswiki>Tasks Web>Extension? >WorkflowPlugin>Item11489 (31 Jan 2012, PaulHarvey) Edit this topic text (e) Attach an image or document to this topic; manage existing attachments (a) View sequential topic history View without formatting (v) Create new topic Printable version of this topic (p) More: delete or rename this topic; set parent topic; view and compare revisions (m)

Item11489: SEARCH using META:WORKFLOWHISTORY is not working

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Extension WorkflowPlugin  
The following query should return the set of topics that have at least one rev where it was APPROVED, but it returns nothing.

%SEARCH{"form.name ~ '*ProcedureForm' AND META:WORKFLOWHISTORY[state = 'APROVADO']"
   order="date" nonoise="on" type="query"
   header="| *Título* |"
   format="| [[$topic][$formfield(Titulo)]] |"
}%

WORKFLOWHISTORY is a multi-valued meta key, so it's not parsed without a call to registerMeta.

-- GilmarSantosJr - 31 Jan 2012

Hi Gilmar,

I've never used this plugin, but I just thought I'd point out - it helps enormously to register the full schema with registerMETA(), if at all possible, for the sake of alternate/caching backends like SolrPlugin, DBIStoreContrib & MongoDBPlugin.

I know things like RevCommentPlugin are doomed (it is not possible to enumerate all the possible key names, because they keep incrementing ad infinitum), but if it is possible to register all possible keys which are expected be stored in a particular META:TYPE, it makes the job of DB backends much easier.

I'd recommend using the registerMETA('FOO', many => 1, allow => [qw(bar cat)]) rather than require, so that changes to the schema as the plugin evolves can be more graceful (the failure mode with requires opt is rather ugly IMHO).

-- PaulHarvey - 31 Jan 2012

And, you may already be aware, but if not: you could do alias => 'workflowhistories' so the search could be written %SEARCH{"form.name ~ '*ProcedureForm' AND workflowhistories[state = 'APROVADO']" - but there are benefits to avoiding that (Eg. querying on the alias won't work if the plugin that registers that type is disabled).

-- PaulHarvey - 31 Jan 2012
 

ItemTemplate edit

Summary SEARCH using META:WORKFLOWHISTORY is not working
ReportedBy GilmarSantosJr
Codebase trunk
SVN Range
AppliesTo Extension
Component WorkflowPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins Foswikirev:13889
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches? trunk
trunkCheckins Foswikirev:13889
Release01x01Checkins?
Topic revision: 31 Jan 2012, PaulHarvey
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads