lib/openwfe/expool/yamlexpstorage.rb in openwferu-0.9.13 vs lib/openwfe/expool/yamlexpstorage.rb in openwferu-0.9.14

- old
+ new

@@ -73,19 +73,21 @@ # def each_of_kind (kind, &block) return unless block - exp_names = get_expression_map.get_expression_names(kind) - each_object_path do |path| #ldebug { "each_of_kind() path is #{path}" } - next unless matches(path, exp_names) + #next unless matches(path, kind) + # was not OK in case of <bob activity="clean office" /> expression = load_object(path) + + next unless expression.is_a?(kind) + expression.application_context = @application_context block.call expression end end @@ -177,22 +179,23 @@ fei.workflow_instance_id + "__" + fei.expression_id + "_" + fei.expression_name + ".yaml" end - # + #-- # Returns true if the path points to a file containing an - # expression whose name is in exp_names. + # expression whose name is in the list of expression names + # corresponding to the given kind (class) of expressions. # - def matches (path, exp_names) - - exp_names.each do |exp_name| - return true \ - if OpenWFE::ends_with(path, "_#{exp_name}.yaml") - end - - false - end + #def matches (path, kind) + # exp_names = get_expression_map.get_expression_names(kind) + # exp_names.each do |exp_name| + # return true \ + # if OpenWFE::ends_with(path, "_#{exp_name}.yaml") + # end + # false + #end + #++ end # # With this extension of YmalFileExpressionStorage, persistence occurs # in a separate thread, for a snappier response.