a few, well defined states • Tempted to setup hundreds of states, with complex transitions • State machines help manage the results of real life processes, not the processes
Send all requests in one go, and continue the process once we've received at least 4 quotes • Also, quote process may not take longer than 7 days to complete
loop do concurrence :timeout => '7d', :count => 4 do institution_1 :activity => 'Mortgage Quote' # ... end joe :activity => 'Review quotes' _break :if => “${f:joe_happy}” email :activity => “Getting new quotes”, :to => “${f:client.email}” end end end
request process running until Joe is happy, or cancels the process • Client notified everytime the quote request process starts all over again • First glimpse of workitems • Mortgage is still “pending”
• They're JSON friendly Ruby hashes • Participants can modify workitems • Processes can be launched with an initial payload, client details in this case, which is accessed through the workitems • Workitem attributes accessed in process definitions through the “dollar notation”
– Better conditional tests • Automated response processing, streamlines the feedback loop and decision making • Harass institutions that don't respond within 2 days of process timeout • Joe improves his handicap
are cancelled, run sub- processes for “cleanup” tasks • Replay failed steps • Redo steps based on conditions • Jump to any point in the workflow using cursors
bundled with ruote • Added support for daemonizing ruote-rest • In talks on refactoring ruote-rest to become preferred “Rails-friendly” implementation of ruote
are “steps in the workflow” • Participants perform explicit function during workflow • Workitems used as “internal messaging” mechanism between expressions/participants • The best complement to any state machine implementation • Simplifies complex business process implementations • You have full control over the entire process