lib/ruote/exp/fe_sequence.rb in ruote-2.1.11 vs lib/ruote/exp/fe_sequence.rb in ruote-2.2.0

- old
+ new

@@ -1,7 +1,7 @@ #-- -# Copyright (c) 2005-2010, John Mettraux, jmettraux@gmail.com +# Copyright (c) 2005-2011, John Mettraux, jmettraux@gmail.com # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell @@ -41,14 +41,13 @@ def apply reply(h.applied_workitem) end - def reply (workitem) + def reply(workitem) position = workitem['fei'] == h.fei ? - 0 : - Ruote::FlowExpressionId.new(workitem['fei']).child_id + 1 + 0 : Ruote::FlowExpressionId.new(workitem['fei']).child_id + 1 if position < tree_children.size apply_child(position, workitem) else reply_to_parent(workitem)