Issue:
Remove code scanner review for ProcessMaker plugins
Cause:
Nuevo requerimiento de validacion
Solution:
Se a incluido la validacion para los "Enterprise Edition Plugin"; donde se evita que el "Code Scanner" revise estos plugins
0017474: El email FROM no respeta la configuración "Email configuration"(adicionar una nueva opcion en el plugin "actions by email")
Conflicts:
workflow/engine/classes/model/ListInbox.php
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
- plugin camelcase names are supported now
- fix for bug when a requests like
GET /plugin-erik/hello/world
GET /plugin-nonExistsPlugin/hello/world
was resolving and dispatching the same resource
- Another thing to consider, the right enabling/disabling feature must be placed as following:
-----
class erikPlugin extends PMPlugin
{
...
public function enable()
{
$this->enableRestService(true);
}
public function disable()
{
$this->enableRestService(false);
}
}
Issue:
Admin > Users > Authentication Sources > New: Se muestra la opcion del plugin
ldapAdvanced aun cuando este esta en estado "Disable" en el workspace
Cause:
No se verifica si el plugin esta enabled/disabled
Solution:
Se verifica si el plugin esta enabled/disabled
1. Enable rest api registering feature on main plugin file
i.e, if I have a plugin named "erik", so we have a file named workflow/engine/plugins/erik.php
and a folder workflow/engine/plugins/erik/
- inside of setup method of plugin main class set: $this->enableRestService(true);
---- file: erik.php ----
class erikPlugin extends PMPlugin
{
...
public function setup()
{
$this->registerMenu("processmaker", "menuerik.php");
...
$this->enableRestService(true); // <- this line enable Rest Service dispatching feature
}
...
2. Create a folder: workflow/engine/plugins/erik/src/Services/Api/
$ mkdir -p workflow/engine/plugins/erik/src/Services/Api/
3. Create a Restler class inside the folder created above
i.e. creating a Hello class.
---- file: workflow/engine/plugins/erik/src/Services/Api/Hello.php -----
<?php
namespace Services\Api;
use Luracast\Restler\RestException;
use ProcessMaker\Services\Api;
use \ProcessMaker\Util;
/**
* @protected
*/
class Hello extends Api
{
/**
* @url GET /world
*/
public function world()
{
try {
$hello = array(
'message' => 'Hello world'
);
return $hello;
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}
}
}
---------- end file ---------
4. Disable and enable the plugin named "erik" on ProcessMaker Admin Interface
5. Use the Rest Api defined inside the plugin
you can access from a url something like that:
format: http://<SERVER-ADDR>/api/1.0/<WORKSPACE>/plugin-<THE-PLUGIN-NAME>/hello/world
i.e.
http://processmaker/api/1.0/workflow/plugin-erik/hello/world
Note.- to access this url that has the protected attribute into the class
you need provide the access token into request header.
1. Enable rest api registering feature on main plugin file
i.e, if I have a plugin named "erik", so we have a file named workflow/engine/plugins/erik.php
and a folder workflow/engine/plugins/erik/
- inside of setup method of plugin main class set: $this->enableRestService(true);
---- file: erik.php ----
class erikPlugin extends PMPlugin
{
...
public function setup()
{
$this->registerMenu("processmaker", "menuerik.php");
...
$this->enableRestService(true); // <- this line enable Rest Service dispatching feature
}
...
2. Create a folder: workflow/engine/plugins/erik/src/Services/Api/
$ mkdir -p workflow/engine/plugins/erik/src/Services/Api/
3. Create a Restler class inside the folder created above
i.e. creating a Hello class.
---- file: workflow/engine/plugins/erik/src/Services/Api/Hello.php -----
<?php
namespace Services\Api;
use Luracast\Restler\RestException;
use ProcessMaker\Services\Api;
use \ProcessMaker\Util;
/**
* @protected
*/
class Hello extends Api
{
/**
* @url GET /world
*/
public function world()
{
try {
$hello = array(
'message' => 'Hello world'
);
return $hello;
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}
}
}
---------- end file ---------
4. Disable and enable the plugin named "erik" on ProcessMaker Admin Interface
5. Use the Rest Api defined inside the plugin
you can access from a url something like that:
format: http://<SERVER-ADDR>/api/1.0/<WORKSPACE>/plugin-<THE-PLUGIN-NAME>/hello/world
i.e.
http://processmaker/api/1.0/workflow/plugin-erik/hello/world
Note.- to access this url that has the protected attribute into the class
you need provide the access token into request header.
Issue:
- PM-1066: Al actualizar PM 2.5.2.3 a 2.8 no se puede crear dashlets del advanced dashboard
- PM-998: Review Batch routing en Enterprise Trial
Cause:
Este problema es a causa de que cada plugin enterprise requiere
que este cargado la clase "enterprisePlugin"
Solution:
Se ha agregado un "require_once" para cargar clase "enterprisePlugin"
Issue:
Al modificar los atributos de un plugin, este cambio no se refleja en el archivo "plugin.singleton" de cada workspace
Cause:
ProcessMaker no detecta cuando el archivo principal de un plugin es editado
Solution:
Se ha añdo un nuevo comando, el mismo actualiza el archivo "plugin.singleton" en cada workspace, segun los
atributos del plugin, el comando es el siguiente:
$ ./gulliver update-plugin-attributes pluginName
- 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