def on_terminate=(target)

      msg = {
        'action' => 'launch',
        'tree' => target.is_a?(String) ?
          [ 'define', {}, [ [ target, {}, [] ] ] ] : target,
        'workitem' => 'replace' }

      @context.tracker.add_tracker(
        nil,             # do not track a specific wfid
        'terminated',    # react on 'error_intercepted' msgs
        'on_terminate',  # the identifier
        nil,             # no specific condition
        msg)             # the message that gets triggered
    end
def on_terminate=(target)

      msg = {
        'action' => 'launch',
        'tree' => target.is_a?(String) ?
          [ 'define', {}, [ [ target, {}, [] ] ] ] : target,
        'workitem' => 'replace' }

      @context.tracker.add_tracker(
        nil,             # do not track a specific wfid
        'terminated',    # react on 'error_intercepted' msgs
        'on_terminate',  # the identifier
        nil,             # no specific condition
        msg)             # the message that gets triggered
    end
Sets a participant or a subprocess that is to be launched/called whenever
 a regular process terminates.

   dashboard.on_terminate = participant_name

   dashboard.on_terminate = subprocess_name

   dashboard.on_terminate = Ruote.define do
     alpha
     bravo
   end

 Note that a termination process doesn't raise a termination process when
 it terminates itself.

 on_terminate processes are not triggered for on_error processes.
 on_error processes are triggered for on_terminate processes as well.