CBPAllStateService :: SetStateParameters: Bitrix method

      
<?php 
//  CBPAllStateService :: SetStateParameters()
//  /dist/bitrix/modules/bizproc/classes/general/stateservice.php:558

    
public function SetStateParameters($workflowId$arStateParameters = array())
    {
        global 
$DB;

        
$workflowId trim($workflowId);
        if (
strlen($workflowId) <= 0)
            throw new 
Exception("workflowId");

        
$stateParameters "";
        if (
count($arStateParameters) > 0)
            
$stateParameters serialize($arStateParameters);

        
$DB->Query(
            
"UPDATE b_bp_workflow_state SET ".
            
"    STATE_PARAMETERS = ".(strlen($stateParameters) > "'".$DB->ForSql($stateParameters)."'" "NULL").", ".
            
"    MODIFIED = ".$DB->CurrentTimeFunction()." ".
            
"WHERE ID = '".$DB->ForSql($workflowId)."' "
        
);
    }