Skip to content

Instantly share code, notes, and snippets.

@ehq

ehq/gist:06eb260c015ec528e741 Secret

Created Jun 3, 2011
Embed
What would you like to do?
Processes.define process_name do
define 'assigning' do
cursor do
assigning_producer :task => 'assign'
filmmaker :task => 'accept', :timeout => '${filmmaker_accept_timeout}', :on_timeout => 'assigning'
rewind :unless => '${accepted}'
end
end
define 'filming' do
filmmaker :task => 'make video', :timeout => '${filmmaker_make_video_timeout}', :on_timeout => 'assigning'
jump :to => 'assigning', :ref => 'main', :if => '${review} == reassign'
end
define 'reviewing' do
cursor do
# TODO: upgrade 'Processes::Task.from_pdef' so it can parse dynamic participant names
video_state_checker
revisions_coordinator :task => 'coordinate review'
jump :to => 'assigning', :ref => 'main', :if => '${review} == reassign'
jump :to => 'publishing', :ref => 'main', :if => '${review} == approve'
jump :to => 'revising', :ref => 'main', :if => '${review} == reject'
end
end
cursor :tag => 'main' do
assigning
filming
reviewing
end
#...etc
end
Description of the problem:
"a project was initially assigned, and the filmmaker let it expire, so it properly went back to the assign stage. But, when it was reassigned and the filmmaker did the "Accept" action, it went straight to "Coordinate review", where it should have gone to make video"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.