     _.each nodes, (node) ->
       addSampleDataAttr(node)
 
-    @codapPhone.call
+    return {
       action: 'create',
       resource: 'collection[Samples].attribute',
       values: sampleDataAttrs
+    }
 
   _timeStamp: ->
     new Date().getTime()
 
   _shouldSend: ->
+    @_openNewCase() unless @caseOpened?
     return false unless @currentCaseID
     currentTime = @_timeStamp()
     elapsedTime = currentTime - @lastTimeSent

    @lastTimeSent = @_timeStamp()
    @sendThrottleMs = 300

    # Create a new case in these instances:
    SimulationStore.actions.resetSimulation.listen    @_openNewCase.bind(@)
    SimulationStore.actions.createExperiment.listen   @_openNewCase.bind(@)

    SimulationStore.actions.recordingFramesCreated.listen  @_addData.bind(@)

    caseData = {}
    caseData[tr '~CODAP.SIMULATION.EXPERIMENT'] = SimulationStore.store.settings.experimentNumber
    @currentCaseID = null
    collectionAction = @_createCollection()

    @codapPhone.call([
      collectionAction,
      {
        action: 'create'
        resource: 'collection[Simulation].case',
        values: { values: caseData }
      }
    ]
    , (result) =>
      if result?
        [collectionResponse, caseResponse] = result

        if caseResponse.success
          @caseOpened = true
          @currentCaseID = caseResponse.values[0].id
          @_flushQueue()
          if not @standaloneMode
            @createTable()
        else
          log.info "CODAP returned an error on 'openCase'"
    )

  _createCollection: ->
    nodes = @graphStore.getNodes()
