- Модуль: bizproc
- Путь к файлу: ~/bitrix/modules/bizproc/classes/general/document.php
- Класс: CBPDocument
- Вызов: CBPDocument::startDebugWorkflow
static function startDebugWorkflow($workflowTemplateId, $documentId, $parameters, &$errors): ?string
{
$errors = [];
$runtime = CBPRuntime::GetRuntime(true);
$parameters = static::prepareWorkflowParameters($parameters);
try
{
$workflow = $runtime->createDebugWorkflow($workflowTemplateId, $documentId, $parameters);
$workflow->Start();
return $workflow->getInstanceId();
}
catch (Exception $e)
{
$errors[] = array(
"code" => $e->getCode(),
"message" => $e->getMessage(),
"file" => $e->getFile()." [".$e->getLine()."]"
);
}
return null;
}