src/Execution.php
protected function childExecutionTerminated(Execution $execution, $triggerExecution = true)
    {
        $removed = false;
        $scope = $execution->isScope() || !$execution->isConcurrent();
        
        foreach ($this->childExecutions as $index => $exec) {
            if ($exec === $execution) {
                unset($this->childExecutions[$index]);
                $removed = true;
                
                break;
            }
        }
        
        if (empty($this->childExecutions) && $scope && $removed && $triggerExecution) {
            if ($this->isWaiting()) {
                $this->signal(null, [], [
                    'executionId' => $execution->getId()
                ]);
            } else {
                $this->takeAll(null, [
                    $this
                ]);
            }
        }
    }
protected function childExecutionTerminated(Execution $execution, $triggerExecution = true)
    {
        $removed = false;
        $scope = $execution->isScope() || !$execution->isConcurrent();
        
        foreach ($this->childExecutions as $index => $exec) {
            if ($exec === $execution) {
                unset($this->childExecutions[$index]);
                $removed = true;
                
                break;
            }
        }
        
        if (empty($this->childExecutions) && $scope && $removed && $triggerExecution) {
            if ($this->isWaiting()) {
                $this->signal(null, [], [
                    'executionId' => $execution->getId()
                ]);
            } else {
                $this->takeAll(null, [
                    $this
                ]);
            }
        }
    }
Is being used to notify a parent execution whenever a child execution has been terminated.

@param Execution $execution
@param boolean $triggerExecution Trigger / signal this execution?