def apply
h.participant_name = (attribute(:ref) || attribute_text).to_s
raise ArgumentError.new(
'no participant name specified'
) if h.participant_name == ''
h.participant ||=
@context.plist.lookup_info(h.participant_name, h.applied_workitem)
raise(ArgumentError.new(
"no participant named #{h.participant_name.inspect}")
) if h.participant.nil?
trigger_callback(:on_apply, h.applied_workitem)
h.applied_workitem['participant_name'] = h.participant_name
h.applied_workitem['fields']['params'] = compile_atts
h.applied_workitem['fields'].delete('t')
h.applied_workitem['fields'].delete('__result__')
h.applied_workitem['re_dispatch_count'] = 0
if tree.last.any?
h.applied_workitem['fields']['params']['__children__'] = dsub(tree.last)
end
consider_participant_timers(h.participant)
persist_or_raise
@context.storage.put_msg(
'dispatch',
'fei' => h.fei,
'participant_name' => h.participant_name,
'participant' => h.participant,
'workitem' => h.applied_workitem)
end