lib/event-list.js
function(control) {

      var i;
      for (i = 0; i < this._events.length; i++) {
         var evt = this._events[i];

         if (evt.eventType === "ChildWorkflowExecutionCompleted") {

            var initiatedEventId = evt.childWorkflowExecutionCompletedEventAttributes.initiatedEventId;
            var initiatedEvent = this.eventById(initiatedEventId);

            if (initiatedEvent.startChildWorkflowExecutionInitiatedEventAttributes.control === control) {

               var result = evt.childWorkflowExecutionCompletedEventAttributes.result;

               try {
                  result = JSON.parse(result);
               }
               catch(ex) {}

               return result;
            }
         }
      }

      return null;
   }
function(control) {

      var i;
      for (i = 0; i < this._events.length; i++) {
         var evt = this._events[i];

         if (evt.eventType === "ChildWorkflowExecutionCompleted") {

            var initiatedEventId = evt.childWorkflowExecutionCompletedEventAttributes.initiatedEventId;
            var initiatedEvent = this.eventById(initiatedEventId);

            if (initiatedEvent.startChildWorkflowExecutionInitiatedEventAttributes.control === control) {

               var result = evt.childWorkflowExecutionCompletedEventAttributes.result;

               try {
                  result = JSON.parse(result);
               }
               catch(ex) {}

               return result;
            }
         }
      }

      return null;
   }
function ( control ) { var i ; for ( i = 0 ; i < this . _events . length ; i ++ ) { var evt = this . _events [ i ] ; if ( evt . eventType === "ChildWorkflowExecutionCompleted" ) { var initiatedEventId = evt . childWorkflowExecutionCompletedEventAttributes . initiatedEventId ; var initiatedEvent = this . eventById ( initiatedEventId ) ; if ( initiatedEvent . startChildWorkflowExecutionInitiatedEventAttributes . control === control ) { var result = evt . childWorkflowExecutionCompletedEventAttributes . result ; try { result = JSON . parse ( result ) ; } catch ( ex ) { } return result ; } } } return null ; }
Get the results of a completed child workflow
@param {String} control
@returns {Mixed}
Get the results of a completed child workflow