Merged in release/3.2.2 (pull request #6026)
Release/3.2.2 Approved-by: Paula Quispe <paula.quispe@processmaker.com>
This commit is contained in:
@@ -5,11 +5,11 @@ namespace ProcessMaker\BusinessModel\Cases;
|
||||
use Propel;
|
||||
use StdClass;
|
||||
use G;
|
||||
use Cases;
|
||||
use Cases as ClassesCase;
|
||||
use AppDocument;
|
||||
use Dynaform;
|
||||
use Exception;
|
||||
use Task;
|
||||
use Task as ClassesTask;
|
||||
|
||||
/**
|
||||
* Return the ChangeLog of a Dynaform
|
||||
@@ -166,7 +166,7 @@ class ChangeLog
|
||||
$title = $obj->getDynTitle();
|
||||
break;
|
||||
case 'TASK':
|
||||
$obj = new Task();
|
||||
$obj = new ClassesTask();
|
||||
$obj->load($uid);
|
||||
$title = $obj->getTasTitle();
|
||||
break;
|
||||
@@ -178,7 +178,7 @@ class ChangeLog
|
||||
|
||||
private function loadPermissions($APP_UID, $PRO_UID, $TAS_UID)
|
||||
{
|
||||
$oCase = new Cases();
|
||||
$oCase = new ClassesCases();
|
||||
$this->permissions = $oCase->getAllObjects(
|
||||
$PRO_UID, $APP_UID, $TAS_UID, $_SESSION['USER_LOGGED']
|
||||
);
|
||||
|
||||
@@ -3,7 +3,6 @@ namespace ProcessMaker\BusinessModel;
|
||||
|
||||
use Behat\Behat\Exception\Exception;
|
||||
use \G;
|
||||
use \Cases;
|
||||
use \Criteria;
|
||||
use \ObjectPermissionPeer;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ use BasePeer;
|
||||
use Bootstrap;
|
||||
use Calendar;
|
||||
use CalendarDefinitionPeer;
|
||||
use Cases;
|
||||
use Cases as ClassesCases;
|
||||
use Configurations;
|
||||
use Criteria;
|
||||
use DashletInstancePeer;
|
||||
@@ -1066,7 +1066,7 @@ class User
|
||||
//Verify data
|
||||
$this->throwExceptionIfNotExistsUser($usrUid, $this->arrayFieldNameForException["usrUid"]);
|
||||
|
||||
$oProcessMap = new Cases();
|
||||
$oProcessMap = new ClassesCases();
|
||||
$USR_UID = $usrUid;
|
||||
$total = 0;
|
||||
$history = 0;
|
||||
|
||||
@@ -31,6 +31,7 @@ use ProcessMaker\Plugins\Interfaces\TaskExtendedProperty;
|
||||
use ProcessMaker\Plugins\Interfaces\ToolbarDetail;
|
||||
use ProcessMaker\Plugins\Interfaces\TriggerDetail;
|
||||
use ProcessMaker\Plugins\Traits\Attributes;
|
||||
use ProcessMaker\Plugins\Traits\Init;
|
||||
use ProcessMaker\Plugins\Traits\PluginStructure;
|
||||
use Publisher;
|
||||
use stdClass;
|
||||
@@ -43,6 +44,7 @@ class PluginRegistry
|
||||
{
|
||||
use PluginStructure;
|
||||
use Attributes;
|
||||
use Init;
|
||||
|
||||
const NAME_CACHE = SYS_SYS . __CLASS__;
|
||||
/**
|
||||
|
||||
33
workflow/engine/src/ProcessMaker/Plugins/Traits/Init.php
Normal file
33
workflow/engine/src/ProcessMaker/Plugins/Traits/Init.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace ProcessMaker\Plugins\Traits;
|
||||
|
||||
/**
|
||||
* Trait Init
|
||||
* @package ProcessMaker\Plugins\Traits
|
||||
*/
|
||||
trait Init
|
||||
{
|
||||
/**
|
||||
* Initialization of functions and others of a plugin
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->initFunction();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialization of plugin pmFunctions
|
||||
*/
|
||||
private function initFunction()
|
||||
{
|
||||
$pmFunctions = $this->getPmFunctions();
|
||||
foreach ($pmFunctions as $namespace) {
|
||||
$filePmFunctions = PATH_PLUGINS . $namespace . PATH_SEP . 'classes' . PATH_SEP . 'class.pmFunctions.php';
|
||||
if (file_exists($filePmFunctions) && $this->isEnable($namespace)) {
|
||||
include_once($filePmFunctions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
<?php
|
||||
namespace ProcessMaker\Project;
|
||||
|
||||
use \Criteria;
|
||||
use Criteria;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
use \ResultSet;
|
||||
use ResultSet;
|
||||
|
||||
use \Process;
|
||||
use \Tasks;
|
||||
use \Task;
|
||||
use \Route;
|
||||
use \RoutePeer;
|
||||
use Process as ClassesProcess;
|
||||
use Tasks;
|
||||
use Task as ClassesTask;
|
||||
use Route;
|
||||
use RoutePeer;
|
||||
|
||||
use ProcessMaker\Util\Common;
|
||||
use ProcessMaker\Exception;
|
||||
@@ -38,7 +38,7 @@ class Workflow extends Handler
|
||||
$me = new self();
|
||||
|
||||
try {
|
||||
$process = new Process();
|
||||
$process = new ClassesProcess();
|
||||
$processData = $process->load($proUid);
|
||||
} catch (\Exception $e) {
|
||||
if (is_null(\ProcessPeer::retrieveByPK($proUid))) {
|
||||
@@ -75,12 +75,12 @@ class Workflow extends Handler
|
||||
self::log("Create Process with data:", $data);
|
||||
|
||||
//validate if process with specified name already exists
|
||||
if (Process::existsByProTitle($data["PRO_TITLE"])) {
|
||||
if (ClassesProcess::existsByProTitle($data["PRO_TITLE"])) {
|
||||
throw new Exception\ProjectAlreadyExists($this, $data["PRO_TITLE"]);
|
||||
}
|
||||
|
||||
// Create project
|
||||
$process = new Process();
|
||||
$process = new ClassesProcess();
|
||||
$this->proUid = $process->create($data, false);
|
||||
|
||||
// Call Plugins
|
||||
@@ -106,7 +106,7 @@ class Workflow extends Handler
|
||||
|
||||
public function update($data)
|
||||
{
|
||||
$process = new Process();
|
||||
$process = new ClassesProcess();
|
||||
$data["PRO_UID"] = $this->getUid();
|
||||
$process->update($data);
|
||||
}
|
||||
@@ -137,7 +137,7 @@ class Workflow extends Handler
|
||||
public static function getList($start = null, $limit = null, $filter = "", $changeCaseTo = CASE_UPPER)
|
||||
{
|
||||
//return Project::getAll($start, $limit, $filter, $changeCaseTo);
|
||||
$process = new Process();
|
||||
$process = new ClassesProcess();
|
||||
$processes = $process->getAllProcesses($start, $limit);
|
||||
//$processes = $process->getAll();
|
||||
|
||||
@@ -182,7 +182,7 @@ class Workflow extends Handler
|
||||
|
||||
try {
|
||||
self::log("Add Task with data: ", $taskData);
|
||||
$task = new Task();
|
||||
$task = new ClassesTask();
|
||||
$tasUid = $task->create($taskData, false);
|
||||
self::log("Add Task Success!");
|
||||
|
||||
@@ -203,7 +203,7 @@ class Workflow extends Handler
|
||||
{
|
||||
try {
|
||||
self::log("Update Task: $tasUid", "With data: ", $taskData);
|
||||
$task = new Task();
|
||||
$task = new ClassesTask();
|
||||
$taskData['TAS_UID'] = $tasUid;
|
||||
$result = $task->update($taskData);
|
||||
self::log("Update Task Success!");
|
||||
@@ -252,7 +252,7 @@ class Workflow extends Handler
|
||||
public function getTask($tasUid)
|
||||
{
|
||||
try {
|
||||
$task = new Task();
|
||||
$task = new ClassesTask();
|
||||
$taskData = $task->load($tasUid);
|
||||
} catch (\Exception $e){
|
||||
$taskData = null;
|
||||
@@ -583,7 +583,7 @@ class Workflow extends Handler
|
||||
try {
|
||||
|
||||
//Instance all classes necesaries
|
||||
$oProcess = new \Process();
|
||||
$oProcess = new ClassesProcess();
|
||||
$oDynaform = new \Dynaform();
|
||||
$oInputDocument = new \InputDocument();
|
||||
$oOutputDocument = new \OutputDocument();
|
||||
|
||||
@@ -13,7 +13,7 @@ use Exception;
|
||||
use ProcessMaker\BusinessModel\Light as BusinessModelLight;
|
||||
use RBAC;
|
||||
use ProcessMaker\BusinessModel\Cases as BusinessModelCases;
|
||||
use Cases;
|
||||
use Cases as ClassesCases;
|
||||
use AppDelegation;
|
||||
use ProcessMaker\BusinessModel\Lists;
|
||||
use ProcessMaker\BusinessModel\Task;
|
||||
@@ -805,7 +805,7 @@ class Light extends Api
|
||||
public function doDeleteCases($app_uid)
|
||||
{
|
||||
try {
|
||||
$oCase = new Cases();
|
||||
$oCase = new ClassesCases();
|
||||
$oCase->removeCase($app_uid);
|
||||
$result = array(
|
||||
"message" => G::LoadTranslation("ID_COMMAND_EXECUTED_SUCCESSFULLY")
|
||||
@@ -1003,7 +1003,7 @@ class Light extends Api
|
||||
public function doGetNextStep($pro_uid, $app_uid, $cas_index, $step_pos)
|
||||
{
|
||||
try {
|
||||
$oCase = new Cases();
|
||||
$oCase = new ClassesCases();
|
||||
|
||||
$oAppDelegate = new AppDelegation();
|
||||
$alreadyRouted = $oAppDelegate->alreadyRouted($app_uid, $cas_index);
|
||||
@@ -1046,7 +1046,7 @@ class Light extends Api
|
||||
|
||||
$caseVariables = array();
|
||||
if (!is_null($app_uid)) {
|
||||
$case = new Cases();
|
||||
$case = new ClassesCases();
|
||||
$fields = $case->loadCase($app_uid, $del_index);
|
||||
$caseVariables = array_merge($fields['APP_DATA'],
|
||||
BusinessModelCases::getGlobalVariables($fields['APP_DATA']));
|
||||
@@ -1689,7 +1689,7 @@ class Light extends Api
|
||||
* Get Case Variables
|
||||
*
|
||||
* @access protected
|
||||
* @class AccessControl {@className \ProcessMaker\Services\ApiCases}
|
||||
* @class AccessControl {@className \ProcessMaker\Services\Api\Cases}
|
||||
* @url GET /:app_uid/variables
|
||||
*
|
||||
* @param string $app_uid {@min 1}{@max 32}
|
||||
@@ -1852,7 +1852,7 @@ class Light extends Api
|
||||
$response = array();
|
||||
|
||||
//conditionalSteps
|
||||
$oCase = new Cases();
|
||||
$oCase = new ClassesCases();
|
||||
$oAppDelegate = new AppDelegation();
|
||||
$alreadyRouted = $oAppDelegate->alreadyRouted($app_uid, $app_index);
|
||||
if ($alreadyRouted) {
|
||||
|
||||
Reference in New Issue
Block a user