lib/openwfe/expressions/fe_raw.rb in openwferu-0.9.5 vs lib/openwfe/expressions/fe_raw.rb in openwferu-0.9.6

- old
+ new

@@ -53,21 +53,20 @@ # into real expressions. # The first and classical extension of this class is XmlRawExpression. # class RawExpression < FlowExpression - #attr_accessor \ - # :raw_representation - def initialize \ (fei, parent_id, env_id, application_context, raw_representation) super(fei, parent_id, env_id, application_context, nil) @raw_representation = raw_representation - new_environment() if not @environment_id + #new_environment() if not @environment_id + # + # now done in the launch methods of the expression pool end def instantiate_real_expression \ (workitem, exp_class=nil, attributes=nil) @@ -137,10 +136,12 @@ # the classical case... expression = instantiate_real_expression( workitem, exp_class, attributes) + expression.apply_time = OpenWFE::now() + expression.apply(workitem) end #def reply (workitem) # no implementation necessary @@ -170,23 +171,38 @@ #require 'pp' #pp attributes #pp lookup_attributes(workitem, attributes) + # TODO : do not use extract_children() !!!!!!!! + #self.children = extract_children() + #params = lookup_attributes(workitem) + #text = OpenWFE::fetch_text_content(self, workitem, false) + #params["0"] = text if text + + params = lookup_attributes(workitem) + + extract_text_children.each_with_index do |value, index| + params[index.to_s] = value + end + get_expression_pool().launch_template( self, 0, template, workitem, - lookup_attributes(workitem)) + params) end - #def extract_attributes () - # raise "abstract method : not implemented here" - #end - #def extract_children () - # raise "abstract method : not implemented here" - #end + def extract_attributes () + raise NotImplementedError.new("'abstract method' sorry") + end + def extract_children () + raise NotImplementedError.new("'abstract method' sorry") + end + def extract_text_children () + raise NotImplementedError.new("'abstract method' sorry") + end end end