MarkCanceled: Bitrix method

      
<?php 
//  MarkCanceled()
//  /dist/bitrix/modules/bizproc/classes/general/activity.php:1173

    
public function MarkCanceled($arEventParameters = array())
    {
        if (
$this->executionStatus != CBPActivityExecutionStatus::Closed)
        {
            if (
$this->executionStatus != CBPActivityExecutionStatus::Canceling)
                throw new 
Exception("InvalidCancelActivityState");

            
$this->executionResult CBPActivityExecutionResult::Canceled;
            
$this->MarkClosed($arEventParameters);
        }
    }