This question about Using an extension: Answered but needs rewriting

Workflow plugin variable $state is not being expanded in SEARCH results

I am using the following SEARCH command to report all my documents which are controlled by the WorkflowPlugin.

%SEARCH{ type="query" "preferences[name='WORKFLOW' AND value='ESPDocApprovalWorkflow']" excludetopic="%TOPIC%" nonoise="on" format="| $topic |$state| $username |"}%

The search results look line
FuncSpecExample1 $state philip

Why is $state not expanded as defined in the plugin documentation? The plugin perl indicates that it is implemented and topic and username are working.


I've never used WorkflowPlugin, but it seems that $state token is only understood by the macros provided with that plugin, not the core SEARCH macro.

You might be able to use a delayed VarQUERY macro to do the same thing, however. I'm not sure I fully understand how META:WORKFLOW is used (assumption is that its name attribute is the $state value), something like (untested):
%SEARCH{
  "preferences[name='WORKFLOW' AND value='ESPDocApprovalWorkflow']"
  type="query" 
  excludetopic="%TOPIC%"
  nonoise="on"
  format="| $topic | $percntQUERY{'$web.$topic'/META:WORKFLOW.name}$percnt | $username |"
}%

-- PaulHarvey - 18 Aug 2011

QuestionForm edit

Subject Using an extension
Extension WorkflowPlugin
Version Foswiki 1.1.3
Status Answered but needs rewriting
Related Topics
Topic revision: r2 - 18 Aug 2011, PaulHarvey - This page was cached on 10 Jan 2018 - 05:55.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License