Issue:
PM-444: 0013316: Be able to assign users to different time zone
PM-3493: Agregar soporte multiple timezone a los endpoints usando formato fecha ISO 8601
Cause:
New feature
Solution:
Added functionality for time zone
- 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
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:
The REST API is not handling versions
Cause:
No se esta verificando la version del API
Solution:
Se agrego metodo para obtener y validar la version del API
Issue:
The REST API is not handling versions
Cause:
No se esta verificando la version del API
Solution:
Se agrego metodo para obtener y validar la version del API
Issue:
16829 Si el workspace esta mal escrito al llamar a un endpoint, el estado HTTP es 503
Cause:
No se esta creando un mensaje valido de respuesta (mensaje Restler) de error
Solution:
Se a definido un objeto Restler para generar el error
- PHP Notice en pm3.
- Problema resuelto, se mejora la validacion existente donde se producia el error en el metodo "route" del
archivo "WebApplication.php".
Disponible para la version 2.8 de ProcessMaker.
- problem with rest classes cache was found
just because, now we have two url patterns
1. /api/1.0/<workspace>/xxxxxxxx
2. /<workspace>/oauth2/xxxxxxxx
restler was generating two different cache class maps, for both patterns,
so the first one request was overwriting to other.
** IT IS FIXED NOW