CBPWorkflow :: CancelActivity: Bitrix method

      
<?php 
//  CBPWorkflow :: CancelActivity()
//  /dist/bitrix/modules/bizproc/classes/general/workflow.php:393

    
public function CancelActivity(CBPActivity $activity$arEventParameters = array())
    {
        if (
$activity == null)
            throw new 
Exception("activity");

        if (
$activity->executionStatus != CBPActivityExecutionStatus::Executing)
            throw new 
Exception("InvalidCancelingState");

        
$activity->SetStatus(CBPActivityExecutionStatus::Canceling$arEventParameters);
        
$this->AddItemToQueue(array($activityCBPActivityExecutorOperationType::Cancel));
    }