• Модуль: rpa
  • Путь к файлу: ~/bitrix/modules/rpa/lib/integration/bizproc/automation/engine/templatesscheme.php
  • Класс: BitrixRpaIntegrationBizprocAutomationEngineTemplatesScheme
  • Вызов: TemplatesScheme::build
public function build(): void
{
	$typesIterator = TypeTable::getList([]);

	/** @var Type $type */
	while ($type = $typesIterator->fetchObject())
	{
		$documentType = Item::makeComplexType($type->getId());

		foreach($type->getStages() as $stage)
		{
			$scope = new TemplateScope($documentType, null, $stage->getId());
			$scope->setNames(null, $stage->getName());
			$scope->setStatusColor($stage->getColor());

			$this->addTemplate($scope);
		}
	}
}