lib/openwfe/omixins.rb in openwferu-0.9.16 vs lib/openwfe/omixins.rb in openwferu-0.9.17
- old
+ new
@@ -78,16 +78,18 @@
end
#
# A small method for ensuring we have a workflow instance id.
#
- def to_wfid (fei_or_wfid)
- wfid = fei_or_wfid
- wfid = wfid.parent_wfid if wfid.kind_of?(FlowExpressionId)
- wfid.to_s
- end
+ def extract_wfid (o, parent=false)
- alias :extract_wfid :to_wfid
+ case o
+ #when String then o
+ when FlowExpressionId then o.wfid(parent)
+ when FlowExpression then o.fei.wfid(parent)
+ else o.to_s
+ end
+ end
end
end