diff --git a/twe/sammo/Scenario.php b/twe/sammo/Scenario.php index a93bf5aa..af30c0fa 100644 --- a/twe/sammo/Scenario.php +++ b/twe/sammo/Scenario.php @@ -329,6 +329,13 @@ class Scenario{ $event->tryRunEvent($env); } + $events = array_map(function($rawEvent){ + return [ + 'cond'=>Json::encode($rawEvent['cond']), + 'action'=>Json::encode($rawEvent['action']) + ]; + }, $this->events); + $db->insert('event', $this->events); }