Created
July 3, 2009 10:04
-
-
Save andrewtimberlake/140039 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
process_definition :name => 'Trace Confirmation', :revision => '1' do | |
sequence do | |
iterator :on_value => (0..5).to_a.join(','), :to_variable => 'i' do | |
sequence do | |
_break :if => "${i} is 5" | |
debug | |
#This could happen from a received phone call while | |
# we are waiting to call back | |
_if :test => "${f:complete} == true" do | |
_break | |
#else | |
sequence do | |
#Used to schedule a call, such as when a received call | |
# gets a call me back | |
_if :test => "${f:next_call}" do | |
_sleep :until => "${f:next_call}" | |
end | |
phone_call | |
_break :if => "${f:complete} is true" | |
_if :test => "${f:complete == true" do | |
_break | |
#else | |
_if :test => "${f:result} == 'No Answer'" do | |
sequence do | |
calculate_next_call | |
_sleep :until => "${f:next_call}" | |
set :field => 'next_call', :value => nil | |
end | |
#else | |
_if :test => "${f:result} is 'Call Back'" do | |
sequence do | |
_sleep :until => "${f:next_call}" | |
set :field => 'next_call', :value => nil | |
end | |
#else | |
_if :test => "${f:result} is 'Left Message'" do | |
sequence do | |
_sleep :until => "${f:next_call}" | |
set :field => 'next_call', :value => nil | |
end | |
#else | |
_if :test => "${f:result} is 'Number Invalid'" do | |
_if :test => "${f:has_number} is false" do | |
escalate_to_supervisor :reason => 'Have no further numbers to call' | |
end | |
#else | |
escalate_to_supervisor :remarks => "${f:remarks}" | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
end | |
_if :test => "${f:complete} == true}" do | |
close :reason => 'Complete' | |
#else | |
escalate_to_supervisor :remarks => 'Too many phone call attempts' | |
end | |
end_process | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment