def respark(msg)

      wfid = msg['wfid']
      opts = msg['respark']

      ps = ProcessStatus.fetch(@context, [ wfid ], {}).first

      error_feis = ps.errors.collect(&:fei)
      errors_too = !! opts['errors_too']

      ps.leaves.each do |fexp|

        next if errors_too == false && error_feis.include?(fexp.fei)

        @context.storage.put_msg(
          'cancel', 'fei' => fexp.fei.to_h, 're_apply' => {})
      end
    end
def respark(msg)

      wfid = msg['wfid']
      opts = msg['respark']

      ps = ProcessStatus.fetch(@context, [ wfid ], {}).first

      error_feis = ps.errors.collect(&:fei)
      errors_too = !! opts['errors_too']

      ps.leaves.each do |fexp|

        next if errors_too == false && error_feis.include?(fexp.fei)

        @context.storage.put_msg(
          'cancel', 'fei' => fexp.fei.to_h, 're_apply' => {})
      end
    end
This action resparks a stalled workflow instance. It's usually
 triggered via Dashboard#respark

 It's been made into a msg (worker action) in order to facilitate
 migration tooling (ruote-swf for example).