CBPRuntime::getWorkflow

  1. Bitrix24 API (v. 23.675.0)
  2. bizproc
  3. CBPRuntime
  4. getWorkflow
  • Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/runtime.php
  • Класс: CBPRuntime
  • Вызов: CBPRuntime::getWorkflow
public function getWorkflow($workflowId, $silent = false)
{
	if ($workflowId == '')
		throw new Exception("workflowId");

	if (!$this->isStarted)
		$this->StartRuntime();

	if (array_key_exists($workflowId, $this->workflows))
		return $this->workflows[$workflowId];

	$workflow = $this->getWorkflowInstance($workflowId);
	$rootActivity = $workflow->getPersister()->LoadWorkflow($workflowId, $silent);

	if ($rootActivity == null)
	{
		throw new Exception("Empty root activity");
	}

	$workflow->reload($rootActivity);

	$this->workflows[$workflowId] = $workflow;
	return $workflow;
}

Добавить комментарий