PM 940 "ProcessMaker-MA "Email Server (endpoints)"" SOLVED
> ProcessMaker-MA "Email Server (endpoints)"
- Se han implementado los siguientes Endpoints:
GET /api/1.0/{workspace}/email/paged?filter={filter}&start={start}&limit={limit}
GET /api/1.0/{workspace}/emails?filter={filter}&start={start}&limit={limit}
GET /api/1.0/{workspace}/email/{mess_uid}
POST /api/1.0/{workspace}/email
POST /api/1.0/{workspace}/email/test-connection
PUT /api/1.0/{workspace}/email/{mess_uid}
DELETE /api/1.0/{workspace}/email/{mess_uid}
- Se esta creando un 1er registro en la tabla EMAIL_SERVER, esto al ejecutar el comando "./processmaker upgrade".
- El metodo "System::getEmailConfiguration()" recupera el EMAIL_SERVER por default, caso contrario trabajara como lo
hacia anteriormente.
Merge branch 'master' of bitbucket.org:colosa/processmaker into PM-940
Conflicts:
workflow/engine/config/schema.xml
workflow/engine/data/mysql/schema.sql
This commit is contained in:
@@ -602,15 +602,15 @@ class DynaForm
|
||||
$dynGrdDescriptionCopyImport = $row["CON_VALUE"];
|
||||
|
||||
//Create Grid
|
||||
$dynaFormGrid = new \Dynaform();
|
||||
|
||||
$arrayDataAux = array(
|
||||
"PRO_UID" => $processUid,
|
||||
"DYN_TITLE" => $dynGrdTitleCopyImport,
|
||||
"DYN_TITLE" => $dynGrdTitleCopyImport . (($this->existsTitle($processUid, $dynGrdTitleCopyImport))? " (" . $arrayData["DYN_TITLE"] . ")" : ""),
|
||||
"DYN_DESCRIPTION" => $dynGrdDescriptionCopyImport,
|
||||
"DYN_TYPE" => "grid"
|
||||
);
|
||||
|
||||
$dynaFormGrid = new \Dynaform();
|
||||
|
||||
$dynaFormGridUid = $dynaFormGrid->create($arrayDataAux);
|
||||
|
||||
//Copy files of the DynaForm Grid
|
||||
@@ -1124,6 +1124,5 @@ class DynaForm
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
415
workflow/engine/src/ProcessMaker/BusinessModel/Message.php
Normal file
415
workflow/engine/src/ProcessMaker/BusinessModel/Message.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
namespace ProcessMaker\Services\Api\Project;
|
||||
|
||||
use \ProcessMaker\Services\Api;
|
||||
use \Luracast\Restler\RestException;
|
||||
/**
|
||||
* Project\Message Api Controller
|
||||
*
|
||||
* @protected
|
||||
*/
|
||||
class Message extends Api
|
||||
{
|
||||
/**
|
||||
* @url GET /:prj_uid/messages
|
||||
*
|
||||
* @param string $prj_uid {@min 32}{@max 32}
|
||||
*/
|
||||
public function doGetMessages($prj_uid)
|
||||
{
|
||||
try {
|
||||
$message = new \ProcessMaker\BusinessModel\Message();
|
||||
|
||||
$response = $message->getMessages($prj_uid);
|
||||
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @url GET /:prj_uid/message/:mes_uid
|
||||
*
|
||||
* @param string $mes_uid {@min 32}{@max 32}
|
||||
* @param string $prj_uid {@min 32}{@max 32}
|
||||
*/
|
||||
public function doGetMessage($mes_uid, $prj_uid)
|
||||
{
|
||||
try {
|
||||
$message = new \ProcessMaker\BusinessModel\Message();
|
||||
|
||||
$response = $message->getMessage($prj_uid, $mes_uid);
|
||||
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @url POST /:prj_uid/message
|
||||
*
|
||||
* @param string $prj_uid {@min 32}{@max 32}
|
||||
* @param array $request_data
|
||||
*
|
||||
* @status 201
|
||||
*/
|
||||
public function doPostMessage($prj_uid, $request_data)
|
||||
{
|
||||
try {
|
||||
$request_data = (array)($request_data);
|
||||
$message = new \ProcessMaker\BusinessModel\Message();
|
||||
|
||||
$arrayData = $message->create($prj_uid, $request_data);
|
||||
|
||||
$response = $arrayData;
|
||||
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @url PUT /:prj_uid/message/:mes_uid
|
||||
*
|
||||
* @param string $prj_uid {@min 32}{@max 32}
|
||||
* @param string $mes_uid {@min 32}{@max 32}
|
||||
* @param array $request_data
|
||||
*/
|
||||
public function doPutMessage($prj_uid, $mes_uid, array $request_data)
|
||||
{
|
||||
try {
|
||||
$request_data = (array)($request_data);
|
||||
$message = new \ProcessMaker\BusinessModel\Message();
|
||||
|
||||
$message->update($prj_uid, $mes_uid, $request_data);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @url DELETE /:prj_uid/message/:mes_uid
|
||||
*
|
||||
* @param string $prj_uid {@min 32}{@max 32}
|
||||
* @param string $mes_uid {@min 32}{@max 32}
|
||||
*/
|
||||
public function doDeleteMessage($prj_uid, $mes_uid)
|
||||
{
|
||||
try {
|
||||
$message = new \ProcessMaker\BusinessModel\Message();
|
||||
|
||||
$message->delete($prj_uid, $mes_uid);
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ debug = 1
|
||||
trigger-wizard = "ProcessMaker\Services\Api\Project\TriggerWizard"
|
||||
category = "ProcessMaker\Services\Api\ProcessCategory"
|
||||
process-variable = "ProcessMaker\Services\Api\Project\Variable"
|
||||
message = "ProcessMaker\Services\Api\Project\Message"
|
||||
|
||||
[alias: projects]
|
||||
project = "ProcessMaker\Services\Api\Project"
|
||||
@@ -92,4 +93,4 @@ debug = 1
|
||||
email = "ProcessMaker\Services\Api\EmailServer"
|
||||
|
||||
[alias: emails]
|
||||
email = "ProcessMaker\Services\Api\EmailServer"
|
||||
email = "ProcessMaker\Services\Api\EmailServer"
|
||||
|
||||
Reference in New Issue
Block a user