public static function construct(BusinessProcess $bp, Session $session)
 {
     $key = 'changes.' . $bp->getName();
     $changes = new ProcessChanges();
     $changes->sessionKey = $key;
     if ($actions = $session->get($key)) {
         foreach ($actions as $string) {
             $changes->push(NodeAction::unserialize($string));
         }
     }
     $changes->session = $session;
     return $changes;
 }
 /**
  */
 public function storeProcess(BusinessProcess $process)
 {
     $filename = $this->getFilename($process->getName());
     $content = $process->toLegacyConfigString();
     file_put_contents($filename, $content);
 }
 public function __construct(BusinessProcess $bp, SessionNamespace $session)
 {
     $this->bp = $bp;
     $this->session = $session;
     $this->key = 'simulations.' . $bp->getName();
 }