This commit is contained in:
Paula Quispe
2017-08-25 14:21:19 -04:00
parent 8564a6ab53
commit 57348d6ef7
4 changed files with 21 additions and 22 deletions

View File

@@ -5,11 +5,11 @@ namespace ProcessMaker\BusinessModel\Cases;
use Propel; use Propel;
use StdClass; use StdClass;
use G; use G;
use Cases; use Cases as ClassesCase;
use AppDocument; use AppDocument;
use Dynaform; use Dynaform;
use Exception; use Exception;
use Task; use Task as ClassesTask;
/** /**
* Return the ChangeLog of a Dynaform * Return the ChangeLog of a Dynaform
@@ -166,7 +166,7 @@ class ChangeLog
$title = $obj->getDynTitle(); $title = $obj->getDynTitle();
break; break;
case 'TASK': case 'TASK':
$obj = new Task(); $obj = new ClassesTask();
$obj->load($uid); $obj->load($uid);
$title = $obj->getTasTitle(); $title = $obj->getTasTitle();
break; break;
@@ -178,7 +178,7 @@ class ChangeLog
private function loadPermissions($APP_UID, $PRO_UID, $TAS_UID) private function loadPermissions($APP_UID, $PRO_UID, $TAS_UID)
{ {
$oCase = new Cases(); $oCase = new ClassesCases();
$this->permissions = $oCase->getAllObjects( $this->permissions = $oCase->getAllObjects(
$PRO_UID, $APP_UID, $TAS_UID, $_SESSION['USER_LOGGED'] $PRO_UID, $APP_UID, $TAS_UID, $_SESSION['USER_LOGGED']
); );

View File

@@ -3,7 +3,6 @@ namespace ProcessMaker\BusinessModel;
use Behat\Behat\Exception\Exception; use Behat\Behat\Exception\Exception;
use \G; use \G;
use \Cases;
use \Criteria; use \Criteria;
use \ObjectPermissionPeer; use \ObjectPermissionPeer;

View File

@@ -8,7 +8,7 @@ use BasePeer;
use Bootstrap; use Bootstrap;
use Calendar; use Calendar;
use CalendarDefinitionPeer; use CalendarDefinitionPeer;
use Cases; use Cases as ClassesCases;
use Configurations; use Configurations;
use Criteria; use Criteria;
use DashletInstancePeer; use DashletInstancePeer;
@@ -1066,7 +1066,7 @@ class User
//Verify data //Verify data
$this->throwExceptionIfNotExistsUser($usrUid, $this->arrayFieldNameForException["usrUid"]); $this->throwExceptionIfNotExistsUser($usrUid, $this->arrayFieldNameForException["usrUid"]);
$oProcessMap = new Cases(); $oProcessMap = new ClassesCases();
$USR_UID = $usrUid; $USR_UID = $usrUid;
$total = 0; $total = 0;
$history = 0; $history = 0;

View File

@@ -1,15 +1,15 @@
<?php <?php
namespace ProcessMaker\Project; namespace ProcessMaker\Project;
use \Criteria; use Criteria;
use ProcessMaker\Plugins\PluginRegistry; use ProcessMaker\Plugins\PluginRegistry;
use \ResultSet; use ResultSet;
use \Process; use Process as ClassesProcess;
use \Tasks; use Tasks;
use \Task; use Task as ClassesTask;
use \Route; use Route;
use \RoutePeer; use RoutePeer;
use ProcessMaker\Util\Common; use ProcessMaker\Util\Common;
use ProcessMaker\Exception; use ProcessMaker\Exception;
@@ -38,7 +38,7 @@ class Workflow extends Handler
$me = new self(); $me = new self();
try { try {
$process = new Process(); $process = new ClassesProcess();
$processData = $process->load($proUid); $processData = $process->load($proUid);
} catch (\Exception $e) { } catch (\Exception $e) {
if (is_null(\ProcessPeer::retrieveByPK($proUid))) { if (is_null(\ProcessPeer::retrieveByPK($proUid))) {
@@ -80,7 +80,7 @@ class Workflow extends Handler
} }
// Create project // Create project
$process = new Process(); $process = new ClassesProcess();
$this->proUid = $process->create($data, false); $this->proUid = $process->create($data, false);
// Call Plugins // Call Plugins
@@ -106,7 +106,7 @@ class Workflow extends Handler
public function update($data) public function update($data)
{ {
$process = new Process(); $process = new ClassesProcess();
$data["PRO_UID"] = $this->getUid(); $data["PRO_UID"] = $this->getUid();
$process->update($data); $process->update($data);
} }
@@ -137,7 +137,7 @@ class Workflow extends Handler
public static function getList($start = null, $limit = null, $filter = "", $changeCaseTo = CASE_UPPER) public static function getList($start = null, $limit = null, $filter = "", $changeCaseTo = CASE_UPPER)
{ {
//return Project::getAll($start, $limit, $filter, $changeCaseTo); //return Project::getAll($start, $limit, $filter, $changeCaseTo);
$process = new Process(); $process = new ClassesProcess();
$processes = $process->getAllProcesses($start, $limit); $processes = $process->getAllProcesses($start, $limit);
//$processes = $process->getAll(); //$processes = $process->getAll();
@@ -182,7 +182,7 @@ class Workflow extends Handler
try { try {
self::log("Add Task with data: ", $taskData); self::log("Add Task with data: ", $taskData);
$task = new Task(); $task = new ClassesTask();
$tasUid = $task->create($taskData, false); $tasUid = $task->create($taskData, false);
self::log("Add Task Success!"); self::log("Add Task Success!");
@@ -203,7 +203,7 @@ class Workflow extends Handler
{ {
try { try {
self::log("Update Task: $tasUid", "With data: ", $taskData); self::log("Update Task: $tasUid", "With data: ", $taskData);
$task = new Task(); $task = new ClassesTask();
$taskData['TAS_UID'] = $tasUid; $taskData['TAS_UID'] = $tasUid;
$result = $task->update($taskData); $result = $task->update($taskData);
self::log("Update Task Success!"); self::log("Update Task Success!");
@@ -252,7 +252,7 @@ class Workflow extends Handler
public function getTask($tasUid) public function getTask($tasUid)
{ {
try { try {
$task = new Task(); $task = new ClassesTask();
$taskData = $task->load($tasUid); $taskData = $task->load($tasUid);
} catch (\Exception $e){ } catch (\Exception $e){
$taskData = null; $taskData = null;
@@ -583,7 +583,7 @@ class Workflow extends Handler
try { try {
//Instance all classes necesaries //Instance all classes necesaries
$oProcess = new \Process(); $oProcess = new ClassesProcess();
$oDynaform = new \Dynaform(); $oDynaform = new \Dynaform();
$oInputDocument = new \InputDocument(); $oInputDocument = new \InputDocument();
$oOutputDocument = new \OutputDocument(); $oOutputDocument = new \OutputDocument();