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
- PM-317 Analizar como, que y donde mover los files/code del enterprise.
- PM-318 Enterprise Traducible.
- PM-320 Hacer funcionar el administrador de plugins.
Rest Service on plugins
-----------------------
1. enable service
add the following line in plugin __constructor main class
$this->enableRestService(true);
2. Create the sources directory structure by example:
if you plugin is named myPlugin
myPlugin
|--src
|--Services
|--Api
|--MyPlugin
|--Test.php
Where Test.php is a Restler class
from a plugin a rest class can be registered now:
on setup method add the following:
---
$this->registerRestService('Sample', [optional string: $path]);
--
and create the folder PATH_PLUGIN . /your_plugin/classes/rest
next add a class with the flowing characteristics:
<?php
class Plugin_Services_Rest_Sample
{
public function get()
{
return 'hello world';
}
}
A class prefixed with Plugin_Services_Rest_
and add the corresponding methods for a Restler api
(http://luracast.com/products/restler/)
Finally on process maker will be exposed as:
via GET: http://127.0.0.1/rest/workflow/sample