lib/openwfe/expool/fs_expstorage.rb
#
# Finds expressions matching the given criteria (returns a list
# of expressions).
#
# This methods is called by the expression pool, it's thus not
# very "public" (not used directly by integrators, who should
# just focus on the methods provided by the Engine).
#
# :wfid ::
#   will list only one process,
#   <tt>:wfid => '20071208-gipijiwozo'</tt>
# :parent_wfid ::
#   will list only one process, and its subprocesses,
#   <tt>:parent_wfid => '20071208-gipijiwozo'</tt>
# :consider_subprocesses ::
#   if true, "process-definition" expressions
#   of subprocesses will be returned as well.
# :wfid_prefix ::
#   allows your to query for specific workflow instance
#   id prefixes. for example :
#   <tt>:wfid_prefix => "200712"</tt>
#   for the processes started in December.
# :include_classes ::
#   excepts a class or an array of classes, only instances of these
#   classes will be returned. Parent classes or mixins can be
#   given.
#   <tt>:includes_classes => OpenWFE::SequenceExpression</tt>
# :exclude_classes ::
#   works as expected.
# :wfname ::
#   will return only the expressions who belongs to the given
#   workflow [name].
# :wfrevision ::
#   usued in conjuction with :wfname, returns only the expressions
#   with a given workflow revision.
# :applied ::
#   if this option is set to true, will only return the expressions
#   that have been applied (exp.apply_time != nil).
#
Finds expressions matching the given criteria (returns a list
of expressions).

This methods is called by the expression pool, it's thus not
very "public" (not used directly by integrators, who should
just focus on the methods provided by the Engine).


Finds expressions matching the given criteria ( returns a list of expressions ) . This methods is called by the expression pool it ' s thus not very " public " ( not used directly by integrators who should just focus on the methods provided by the Engine ) .
def find_expressions (options={})
      dir = if wfid = options[:wfid]
        dir_for(wfid)
      else
        "#{@basepath}/**" 
      end
      Dir["#{dir}/*.#{@suffix}"].inject([]) do |a, path|
        fexp = load_fexp(path)
        a << fexp if fexp and does_match?(options, fexp)
        a
      end
    end
def find_expressions ( options = { } ) dir = if wfid = options [ :wfid ] dir_for ( wfid ) else "#{@basepath}/**" end Dir [ "#{dir}/*.#{@suffix}" ] . inject ( [ ] ) do | a , path | fexp = load_fexp ( path ) a << fexp if fexp and does_match? ( options , fexp ) a end end
Finds expressions matching the given criteria (returns a list
of expressions).
Finds expressions matching the given criteria ( returns a list of expressions ) .
# brute force
options
<not_specific>