--- /dev/null
+#!/usr/bin/php4 -qC
+<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80 foldmethod=marker:
+-------------------------------------------------------------------------------
+ Ministerio de Economía
+ YATTA!
+-------------------------------------------------------------------------------
+This file is part of YATTA!.
+
+YATTA! is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option)
+any later version.
+
+YATTA! is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License; if not,
+write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+Boston, MA 02111-1307 USA
+-------------------------------------------------------------------------------
+Creado: jue abr 15 13:04:35 ART 2004
+Autor: Martin Marrese <mmarre@mecon.gov.ar>
+-------------------------------------------------------------------------------
+$Id$
+-------------------------------------------------------------------------------
+Descripción:
+Prueba de alta y ejecución de un script verdadero.
+-----------------------------------------------------------------------------*/
+
+//{{{Require Once
+require_once 'YATTA/Controlador.php';
+require_once 'DB.php';
+require_once 'PEAR.php';
+//}}}
+
+//{{{Creo una conexion mysql al servidor
+//$db =& DB::connect('mysql://yatta:75f22dcd27c9b24e7@unix(/var/run/mysqld/mysqld.sock)/yatta', true);
+$db =& DB::connect('mysql://intranet:intranet@unix(/var/run/mysqld/mysqld.sock)/yatta', true);
+if (DB::isError($db)) {
+ trigger_error($db->getMessage(), E_USER_ERROR);
+}
+//}}}
+
+//{{{Identificador del sistema al cual pertenecen los procesos.
+$id_sistema = 74; //Identificador de YATTA
+//}}}
+
+//{{{Proceso con array de datos obligatorios solamente.
+$datos = array (
+ 'script' =>
+ '/home/mmarrese/public_html/yatta/test/casos/caso_2_alta_proceso/clase.php',
+ 'id_sistema' => $id_sistema,
+ 'descripcion' => 'Pruebas de los forks, etc.',
+ 'owner' => 'mmarre@mecon',
+ );
+$controlador =& new YATTA_Controlador;
+$res = $controlador->agregarProceso($db, $datos);
+if (PEAR::isError($res)) {
+ trigger_error('Error: ' . $res->getMessage() . "\n", E_USER_ERROR);
+}
+//}}}
+
+var_dump($res);
+?>
--- /dev/null
+<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80 foldmethod=marker:
+-------------------------------------------------------------------------------
+ Ministerio de Economía
+ YATTA!
+-------------------------------------------------------------------------------
+This file is part of YATTA!.
+
+YATTA! is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option)
+any later version.
+
+YATTA! is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License; if not,
+write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+Boston, MA 02111-1307 USA
+-------------------------------------------------------------------------------
+Creado: jue abr 15 13:04:35 ART 2004
+Autor: Martin Marrese <mmarre@mecon.gov.ar>
+-------------------------------------------------------------------------------
+$Id$
+-------------------------------------------------------------------------------
+Descripción:
+Prueba de alta y ejecución de un script verdadero.
+-----------------------------------------------------------------------------*/
+
+//{{{Require Once
+require_once 'YATTA/Proceso.php';
+//}}}
+
+//{{{Funcion create_process
+function create_process() {
+ return new Caso_02;
+}
+//}}}
+
+//{{{Clase Caso_02
+class Caso_02 extends YATTA_Proceso {
+
+ //Ejecucion del script.
+ function run() {
+ system('touch /tmp/Caso_02');
+ sleep(40);
+ $this->error = null;
+ }
+}
+//}}}
+
+?>