Class: OpenWFE::WaitExpression

Inherits:
WaitingExpression show all
Defined in:
lib/openwfe/expressions/fe_wait.rb

Overview

The ‘wait’ expression simply blocks/waits until the given condition evaluates to true. This expression accepts a timeout (else it will block ad eternam).

sequence do
    wait :until => "${done} == true"
    participant :toto
end

Participant ‘toto’ will receive a workitem after the variable ‘done’ is set to true (somewhere else in the process definition).

sequence do
    wait :runtil => "Time.new.to_i % 7 == 0"
    participant :toto
end

Participant ‘toto’ will receive a workitem after a certain condition expressed directly in Ruby evaluates to true.

‘wait’ is different than ‘when’ : when it times out (if a timeout is set, the wait ceases and the flow resumes. On a timeout, ‘when’ will not execute its nested ‘consequence’ child.

Constant Summary

Constants inherited from WaitingExpression

OpenWFE::WaitingExpression::DEFAULT_FREQUENCY, OpenWFE::WaitingExpression::MIN_FREQUENCY

Instance Attribute Summary

Attributes inherited from WaitingExpression

#frequency

Attributes included from TimeoutMixin

#timeout_at, #timeout_job_id

Attributes inherited from TimeExpression

#applied_workitem, #scheduler_job_id, #scheduler_tags

Attributes inherited from FlowExpression

#apply_time, #attributes, #children, #environment_id, #fei, #parent_id, #raw_representation

Attributes included from Contextual

#application_context

Method Summary

Methods inherited from WaitingExpression

#apply, #cancel, conditions, #reply, #reply_to_parent, #reschedule, #trigger

Methods included from TimeoutMixin

#determine_timeout, #remove_timedout_flag, #reschedule, #schedule_timeout, #set_timedout_flag

Methods included from ConditionMixin

#determine_condition_attribute, #eval_condition

Methods inherited from TimeExpression

#cancel, #unschedule

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, #reply_to_parent, #set_variable, #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