PM-3193 "Prepare integration of new Valeo simplified designer in process list" SOLVED
Issue:
Prepare integration of new Valeo simplified designer in process list
Cause:
Nuevo requerimiento de funciones
Solution:
> Se a implementado "DESIGNER: New options in menu" para los plugins; para lo cual se define
en el archivo principal del plugin, lo siguiente (ejemplo):
public function setup()
{ ...
$this->registerDesignerMenu(PATH_PLUGINS . "DemoDesignerMenu/classes/DesignerMenuDemoDesignerMenu.php");
...
}
El archivo "DesignerMenuDemoDesignerMenu.php" es una clase donde se define las nuevas opciones
para el "Menu New" y "Context Menu"
> Se a implementado "DESIGNER: Edit process" para los plugins; en el listado de procesos (esto en DESIGNER)
al hacer doble-click en un proceso, se inicia el modulo para la edicion del proceso, esto tambien
puede ser customizado en el plugin, para lo cual se debera realizar lo siguiente:
- Cambiar en la Base de Datos el valor del campo PROCESS.PRO_TYPE por un nuevo tipo:
* Ejemplo: PRO_TYPE = 'CPF_STANDARD_TPL'
- Registrar un archivo JavaScript para el plugin, esto se define en el archivo principal del
plugin (ejemplo):
public function setup()
{ ...
$this->registerJavascript("processes/main", "DemoDesignerMenu/MyJavaScript.js");
...
}
- En el archivo "MyJavaScript.js" se debe definir la siguiente funcion:
function CPF_STANDARD_TPLDesignerGridRowDblClick(...)
{ ...
}
- Ejemplos de "PROCESS.PRO_TYPE" y la funcion "DesignerGridRowDblClick":
* Ejemplo: PRO_TYPE = 'CPF-STANDARD-TPL' => function CPF_STANDARD_TPLDesignerGridRowDblClick(...)
* Ejemplo: PRO_TYPE = 'CPF STANDARD TPL' => function CPF_STANDARD_TPLDesignerGridRowDblClick(...)
> Se adjunta el plugin "DemoDesignerMenu-1.tar" como ejmplo
This commit is contained in:
@@ -379,16 +379,22 @@ class PMPlugin
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->enableRestService($this->sNamespace, $enable);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* With this function we can register new options to designer menu
|
||||
* param string $menuOptionsFile
|
||||
* Register designer menu file
|
||||
*
|
||||
* @param string $file Designer menu file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function registerDesignerNewOption($menuOptionsFile)
|
||||
public function registerDesignerMenu($file)
|
||||
{
|
||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||
$oPluginRegistry->registerDesignerNewOption($this->sNamespace, $menuOptionsFile);
|
||||
try {
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginRegistry->registerDesignerMenu($this->sNamespace, $file);
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -730,20 +736,3 @@ class cronFile
|
||||
}
|
||||
}
|
||||
|
||||
class menuOptionFile
|
||||
{
|
||||
public $namespace;
|
||||
public $menuOptionFile;
|
||||
|
||||
/**
|
||||
* This function is the constructor of the cronFile class
|
||||
* param string $namespace
|
||||
* param string $menuOptionFile
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($namespace, $menuOptionFile)
|
||||
{
|
||||
$this->namespace = $namespace;
|
||||
$this->menuOptionFile = $menuOptionFile;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user