anchor.diff:      gen_fsm:send_event(FlowPid, inputs_done).
   
   %% @doc Collects flow output. This function will block
  -%%      until the flow completes or exceeds the timeout.
  +%%      until the flow completes or exceeds the flow_timeout.
   %% @spec collect_output(any(), integer()) -> [any()] | {error, any()}
   collect_output(FlowId, Timeout) ->
       collect_output(FlowId, Timeout, []).
  
positive.code: 
  init([Client, FlowId, FlowDesc, Timeout]) ->
      process_flag(trap_exit, true),
      case start_phases(FlowDesc, Timeout) of
          {ok, FSMs} ->
              {ok, executing, #state{fsms=FSMs, flow_id=FlowId, timeout=Timeout, client=Client}, Timeout};
          Error ->
              {stop, Error}
      end.
  
  executing({inputs, Inputs}, #state{fsms=[H|_], timeout=Timeout}=State) ->
      luke_phases:send_inputs(H, Inputs),
      {next_state, executing, State, Timeout};
  executing(inputs_done, #state{fsms=[H|_], timeout=Timeout}=State) ->
      luke_phases:send_inputs_done(H),
      {next_state, executing, State, Timeout};
  executing(timeout, #state{client=Client, flow_id=FlowId}=State) ->
      Client ! {flow_results, FlowId, done},
      {stop, normal, State};
  executing({results, done}, #state{client=Client, flow_id=FlowId}=State) ->
      Client ! {flow_results, FlowId, done},
      {stop, normal, State};
  executing({results, Result}, #state{client=Client, flow_id=FlowId, timeout=Timeout}=State) ->
      Client ! {flow_results, FlowId, Result},
      {next_state, executing, State, Timeout}.
  
  executing(get_phases, _From, #state{fsms=FSMs}=State) ->
      {reply, FSMs, executing, State}.
  
negative.code: handle_sync_event(_Event, _From, StateName, State) ->
      {reply, ignored, StateName, State}.
  
  handle_info(flow_timeout, _StateName, State) ->
      {stop, flow_timeout, State};
  handle_info({'EXIT', _Pid, normal}, StateName, State) ->
      {next_state, StateName, State};
  handle_info({'EXIT', _Pid, Reason}, _StateName, #state{flow_id=FlowId, client=Client}=State) ->
  