Class: OpenWFE::DefineExpression
- Inherits:
-
SequenceExpression
- Object
- ObjectWithMeta
- FlowExpression
- SequenceExpression
- OpenWFE::DefineExpression
- Defined in:
- lib/openwfe/expressions/fe_define.rb
Overview
The <process-definition> expression.
Instance Attribute Summary collapse
-
#body_fei ⇒ Object
A pointer to the body expression of this process definition.
Attributes inherited from FlowExpression
#apply_time, #attributes, #children, #environment_id, #fei, #parent_id, #raw_representation
Attributes included from Contextual
Instance Method Summary collapse
-
#reply_to_parent(workitem) ⇒ Object
Called at the end of the ‘evaluation’, the ‘apply’ operation on the body of the definition is done here.
-
#set_variable(name, fei) ⇒ Object
Overrides the set_variable in FlowExpression to make sure to intercept requests for binding subprocesses at the engine level and to store a copy of the raw expression, not only the flow expression id.
Methods inherited from SequenceExpression
Methods inherited from FlowExpression
#apply, #cancel, #clean_children, #delete_variable, #dup_environment, #fetch_environment, #fetch_text_content, #get_binding, #get_environment, #get_parent, #get_root_environment, #has_attribute, #initialize, is_definition, is_definition?, #lookup_attribute, #lookup_attributes, #lookup_boolean_attribute, #lookup_comma_list_attribute, #lookup_downcase_attribute, #lookup_ref, #lookup_string_attribute, #lookup_sym_attribute, #lookup_value, #lookup_variable, #lookup_vf_attribute, names, #new_environment, new_exp, #owns_its_environment?, #paused?, #remove_child, #reply, #store_itself, #synchronize, #to_s, #to_yaml_properties
Methods included from Contextual
#get_work_directory, #init_service, #lookup
Methods included from Logging
#ldebug, #ldebug_callstack, #lerror, #lfatal, #linfo, #llog, #lunknown, #lwarn
Methods included from OwfeServiceLocator
#get_engine, #get_error_journal, #get_expool, #get_expression_map, #get_expression_pool, #get_expression_storage, #get_expression_storages, #get_journal, #get_participant_map, #get_scheduler, #get_wfid_generator
Methods inherited from ObjectWithMeta
#class_def, meta_def, meta_eval, metaclass
Constructor Details
This class inherits a constructor from OpenWFE::FlowExpression
Instance Attribute Details
#body_fei ⇒ Object
A pointer to the body expression of this process definition.
58 59 60 |
# File 'lib/openwfe/expressions/fe_define.rb', line 58 def body_fei @body_fei end |
Instance Method Details
#reply_to_parent(workitem) ⇒ Object
Called at the end of the ‘evaluation’, the ‘apply’ operation on the body of the definition is done here.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/openwfe/expressions/fe_define.rb', line 75 def reply_to_parent (workitem) #return if @eval_only #puts "/// \n bf #{@body_fei} \n wi.fei #{workitem.fei}" return super(workitem) \ if @body_fei == nil or @body_fei == workitem.fei #unless @body_fei #_fei = @body_fei #@body_fei = nil #store_itself #get_expression_pool.apply _fei, workitem get_expression_pool.apply @body_fei, workitem end |
#set_variable(name, fei) ⇒ Object
Overrides the set_variable in FlowExpression to make sure to intercept requests for binding subprocesses at the engine level and to store a copy of the raw expression, not only the flow expression id.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/openwfe/expressions/fe_define.rb', line 99 def set_variable (name, fei) if name[0, 2] == "//" raw_exp = get_expression_pool.fetch_expression(fei).dup raw_exp.parent_id = nil raw_exp.fei = raw_exp.fei.dup fei = raw_exp.fei fei.wfid = get_wfid_generator.generate raw_exp.store_itself end super name, fei end |