lib/openwfe/workitem.rb in openwferu-0.9.2 vs lib/openwfe/workitem.rb in openwferu-0.9.3

- old
+ new

@@ -114,10 +114,14 @@ return @attributes[methodname[0..-2]] = args[0] end super(m, args) end + + def dup + return OpenWFE::fulldup(self) + end end # # The common parent class for InFlowWorkItem and CancelItem. # @@ -134,11 +138,12 @@ end # # Just a handy alias for flow_expression_id # - alias fei flow_expression_id + alias :fei :flow_expression_id + alias :fei= :flow_expression_id= end # # When the term 'workitem' is used it's generally referring to instances # of this InFlowWorkItem class. @@ -151,14 +156,10 @@ attr_accessor :store # # special : added by the ruby lib, not given by the worklist - def dup - return OpenWFE::dup(self) - end - # # Outputting the workitem in a human readable format # def to_s s = "" @@ -181,10 +182,15 @@ # emits a CancelItem towards it. # It's especially important for participants to react correctly upon # receiving a cancel item. # class CancelItem < InFlowItem + + def initialize (workitem) + super() + @flow_expression_id = workitem.fei.dup + end end # # LaunchItem instances are used to instantiate and launch processes. # They contain attributes that are used as the initial payload of the @@ -232,10 +238,10 @@ :wfd_revision, \ :wf_instance_id, \ :expression_id def dup - return OpenWFE::dup(self) + return OpenWFE::fulldup(self) end end #