Load: Bitrix method

      
<?php 
//  Load()
//  /dist/bitrix/modules/bizproc/classes/general/activity.php:1004

    
public static function Load($stream)
    {
        if (
strlen($stream) <= 0)
            throw new 
Exception("stream");

        
$pos strpos($stream";");
        
$strUsedActivities substr($stream0$pos);
        
$stream substr($stream$pos 1);

        
$runtime CBPRuntime::GetRuntime();
        
$arUsedActivities explode(","$strUsedActivities);

        foreach (
$arUsedActivities as $activityCode)
        {
            
$runtime->IncludeActivityFile($activityCode);
        }

        return 
unserialize($stream);
    }