lib/openwfe/expressions/fe_participant.rb in openwferu-0.9.16 vs lib/openwfe/expressions/fe_participant.rb in openwferu-0.9.17
- old
+ new
@@ -1,8 +1,8 @@
#
#--
-# Copyright (c) 2006-2007, John Mettraux, OpenWFE.org
+# Copyright (c) 2006-2008, John Mettraux, OpenWFE.org
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
@@ -126,16 +126,17 @@
attr_accessor :applied_workitem
def apply (workitem)
- conditional = eval_condition(:if, workitem, :unless)
+ conditional = eval_condition :if, workitem, :unless
- if conditional == false
- super_reply_to_parent workitem
- return
- end
+ return super_reply_to_parent(workitem) \
+ if conditional == false
+ #
+ # skip expression
+ # <participant ref="x" if="y" /> (where y evals to false)
@participant_name = lookup_ref workitem
@participant_name = fetch_text_content workitem \
unless @participant_name
@@ -208,10 +209,10 @@
unschedule_timeout
cancel_participant
- nil
+ @applied_workitem
end
#
# Upon timeout, the ParticipantExpression will cancel itself and
# the flow will resume.