anchor.diff:      TraceId = get_trace_id(get_passed_state(Msg)),
       ?TRACE("send error for trace id ~p: ~p calling on_handler_done~n", [TraceId, _ShepherdMsg]),
       gen_component:post_op(State, {on_handler_done, TraceId});
  +
  +on({register_callback, CallbackFun, TraceId, Client}, State) ->
  +    case lists:keyfind(TraceId, 1, State) of
  +        false ->
  +            comm:send(Client, {register_callback_reply, failed}),
  +            State;
  +        {TraceId, TraceEntry} ->
  +            comm:send(Client, {register_callback_reply, ok}),
  +            NewEntry = TraceEntry#state{callback_on_deliver = CallbackFun},
  +            lists:keyreplace(TraceId, 1, State, {TraceId, NewEntry})
  +    end;
   
   on({get_infos, Client, TraceId}, State) ->
       case lists:keyfind(TraceId, 1, State) of
  
positive.code: -export([start/0, start/1, start/2, stop/0]).
  -export([start_deliver/0, start_deliver/1]).
  -export([get_infos/0, get_infos/1]).
  -export([cleanup/0, cleanup/1]).
  
  %% report messages from other modules
  
negative.code:          passed_state            = ?required(state, passed_state)
                                         :: none | passed_state(),
           num_possible_executions = ?required(state, passed_state)
                                         :: pos_integer(),
           callback_on_deliver     = ?required(state, callback_on_deliver)
                                         :: callback_on_deliver()
          }).
  
  -type state_t() :: #state{}.
  
  -spec start() -> ok.
  start() -> start(default).
  
  