Class | OpenWFE::FieldWfidGenerator |
In: |
lib/openwfe/expool/wfidgen.rb
|
Parent: | KotobaWfidGenerator |
This wfid generator returns as wfid the value found in a given field of the launchitem (if any).
If there is no launchitem or no field, a Kotoba wfid is returned.
This generator is useful for engines that have to use workflow instance ids generated by other systems.
# File lib/openwfe/expool/wfidgen.rb, line 265 265: def initialize (service_name, application_context, field_name) 266: 267: super service_name, application_context 268: 269: @field_name = field_name 270: end
# File lib/openwfe/expool/wfidgen.rb, line 272 272: def generate (launchitem=nil) 273: 274: return super unless launchitem 275: 276: wfid = launchitem.attributes[@field_name] 277: 278: return wfid.to_s if wfid 279: 280: super 281: # 282: # if the field is not present in the launchitem, will 283: # return a Kotoba wfid 284: end