code: function (activityId) {
        var i;
        for (i = 0; i < this._events.length; i++) {
           var evt = this._events[i];
  
           if (evt.eventType === "ActivityTaskCompleted") {
              if (this.activityIdFor(evt.activityTaskCompletedEventAttributes.scheduledEventId) === activityId) {
  
                 var result = evt.activityTaskCompletedEventAttributes.result;
  
                 try {
                    var d = JSON.parse(result);
                    return d;
                 } catch (ex) {
                    return result;
                 }
  
              }
           }
        }
  
        return null;
     }
docs: Get the results for the given activityId
  @param {String} activityId
  @returns {Mixed}