Created
March 26, 2012 17:36
-
-
Save netinlet/2207156 to your computer and use it in GitHub Desktop.
ruote history
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
module Ruote | |
class StorageHistory | |
def steps_by_process(wfid) | |
# which ones were 'executed' - filters out items like setting up sequence and concurrence steps | |
all_expressions = self.by_process(wfid) | |
dispatched_expressions = all_expressions.select{|flow_expr| 'dispatched' == flow_expr["action"]} | |
# for all the flow_expressions, get the name and order by sorting by the original timestamp | |
dispatched_expressions.map do |flow_expr| | |
[flow_expr['participant_name'], flow_expr["original_put_at"]] | |
end.sort{|a,b| a.last <=> b.last}.map{|exp| exp.first} | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment