def do_misc(action, wi_or_fei_or_wfid, opts)
opts = Ruote.keys_to_s(opts)
target = Ruote.extract_id(wi_or_fei_or_wfid)
if action == 'resume' && opts['anyway']
exps = ps(target).expressions.select { |fexp| fexp.state == 'paused' }
feis = exps.collect { |fexp| fexp.fei }
roots = exps.inject([]) { |a, fexp|
a << fexp.fei.h unless feis.include?(fexp.parent_id)
a
}
roots.each { |fei| @context.storage.put_msg('resume', 'fei' => fei) }
elsif target.is_a?(String)
@context.storage.put_msg(
"#{action}_process", opts.merge('wfid' => target))
else
@context.storage.put_msg(
action, opts.merge('fei' => target))
end
end