TerminateWorkflow
void
public static function CBPDocument::TerminateWorkflow(
string workflowId,
array documentId,
array &arErrors
);
This method stops completion of a workflow.
Note: This method receives an array of configuration parameters and generates scripts, required to show file dialog. Static method.
Method parameters
Parameter | Description |
---|---|
workflowId | Workflow ID code |
documentId | Document ID code as an array(module, document_class, document_code_in_module) |
arErrors | Array of errors, if workflow stopped as follows
array( |
Examples
<?
$arState = CBPStateService::GetWorkflowState($stopWorkflowId);
if (count($arState) > 0)
{
CBPDocument::TerminateWorkflow(
$stopWorkflowId,
$arState["DOCUMENT_ID"],
$arErrorsTmp
);
if (count($arErrorsTmp) > 0)
{
foreach ($arErrorsTmp as $e)
$errorMessage .= $e["message"].". ";
}
}
?>
© «Bitrix24», 2001-2024