/** * Get a (jailed) memory pool matching this workflow execution * * @param WorkflowInterface $workflow * @param string $execution_id * @return MemoryPoolInterface */ protected function getMemoryPoolForWorkflow(WorkflowInterface $workflow, $execution_id) { return $workflow->getJailMemoryPool() ? JailedMemoryPool::jail($this->getMemoryPool(), ':' . $execution_id) : $this->getMemoryPool(); }