lib/openwfe/expressions/fe_losfor.rb in openwferu-0.9.13 vs lib/openwfe/expressions/fe_losfor.rb in openwferu-0.9.14
- old
+ new
@@ -28,12 +28,10 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#++
#
-# $Id: definitions.rb 2725 2006-06-02 13:26:32Z jmettraux $
-#
#
# "made in Japan"
#
# John Mettraux at openwfe.org
@@ -45,12 +43,19 @@
module OpenWFE
#
# Triggers the first (and supposedly unique child of this expression)
# but never wait for its reply (lose it).
+ #
# A 'lose' expression never replies to its parent expression.
#
+ # <lose>
+ # <participant ref="toto" />
+ # </lose>
+ #
+ # Useful only some special process cases.
+ #
class LoseExpression < FlowExpression
names :lose
def apply (workitem)
@@ -75,26 +80,26 @@
if (@children and @children.length > 0)
wi = workitem.dup
- Thread.new do
- begin
+ #Thread.new do
+ #begin
- child = @children[0]
- get_expression_pool.forget(self, child)
- get_expression_pool.apply(child, wi)
+ child = @children[0]
+ get_expression_pool.forget(self, child)
+ get_expression_pool.apply(child, wi)
- rescue Exception => e
- lwarn do
- "apply() failed to apply child to forget "+
- OpenWFE::exception_to_s(e)
- end
- end
- end
+ #rescue Exception => e
+ # lwarn do
+ # "apply() failed to apply child to forget "+
+ # OpenWFE::exception_to_s(e)
+ # end
+ #end
+ #end
end
- reply_to_parent(workitem)
+ reply_to_parent workitem
end
def reply (workitem)
# never gets called
end