Skip to content

Instantly share code, notes, and snippets.

@ehq
Created June 3, 2011 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ehq/06eb260c015ec528e741 to your computer and use it in GitHub Desktop.
Save ehq/06eb260c015ec528e741 to your computer and use it in GitHub Desktop.
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