lib/openwfe/expressions/fe_losfor.rb in openwferu-0.9.15 vs lib/openwfe/expressions/fe_losfor.rb in openwferu-0.9.16

- old
+ new

@@ -50,28 +50,40 @@ # # <lose> # <participant ref="toto" /> # </lose> # - # Useful only some special process cases. + # Useful only some special process cases (like a concurrence + # expecting only a certain number of replies). # + # The brother expressions is 'forget', but 'forget' triggers its child + # and immediately replies, whereas 'lose' doesn't reply. + # class LoseExpression < FlowExpression names :lose def apply (workitem) + get_expression_pool.apply(children[0], workitem) \ if (@children and @children.length > 0) end def reply (workitem) + get_expression_pool.remove(self) end end # # This expression triggers its child (in its own thread) and then # forgets about it. It immediately replies to its parent expression. + # + # The brother expression 'lose' triggers its child but never replies to its + # parent expression. + # + # The 'forget' expression is useful for triggering process segments + # that are, well, dead ends. # class ForgetExpression < FlowExpression names :forget