CBPWorkflow::closeActivity

  1. Bitrix24 API (v. 23.675.0)
  2. bizproc
  3. CBPWorkflow
  4. closeActivity
  • Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/workflow.php
  • Класс: CBPWorkflow
  • Вызов: CBPWorkflow::closeActivity
public function closeActivity(CBPActivity $activity, $arEventParameters = array())
{
	switch ($activity->executionStatus)
	{
		case CBPActivityExecutionStatus::Executing:
			$activity->MarkCompleted($arEventParameters);
			return;

		case CBPActivityExecutionStatus::Canceling:
			$activity->MarkCanceled($arEventParameters);
			return;

		case CBPActivityExecutionStatus::Closed:
			return;

		case CBPActivityExecutionStatus::Faulting:
			$activity->MarkFaulted($arEventParameters);
			return;
	}

	throw new Exception("InvalidClosingState");
}

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