checkout processMap class
This commit is contained in:
@@ -95,15 +95,15 @@ function run_upgrade($command, $args)
|
||||
if (defined('PATH_C')) {
|
||||
rm_dir(PATH_C, true);
|
||||
}
|
||||
$workspaces = get_workspaces_from_args($args);
|
||||
$workspaces = get_workspaces_from_args($command);
|
||||
$count = count($workspaces);
|
||||
$first = true;
|
||||
$errors = false;
|
||||
$buildCacheView = array_key_exists("buildACV", $command);
|
||||
$buildCacheView = array_key_exists("buildACV", $args);
|
||||
foreach ($workspaces as $index => $workspace) {
|
||||
try {
|
||||
CLI::logging("Upgrading workspaces ($index/$count): " . CLI::info($workspace->name) . "\n");
|
||||
$workspace->upgrade($first, $buildCacheView);
|
||||
$workspace->upgrade($first, $buildCacheView, $workspace->name);
|
||||
$workspace->close();
|
||||
$first = false;
|
||||
} catch (Exception $e) {
|
||||
|
||||
@@ -174,7 +174,7 @@ function run_workspace_upgrade($args, $opts) {
|
||||
$first = true;
|
||||
foreach ($workspaces as $workspace) {
|
||||
try {
|
||||
$workspace->upgrade($first);
|
||||
$workspace->upgrade($first, false, $workspace->name);
|
||||
$first = false;
|
||||
} catch (Exception $e) {
|
||||
echo "Errors upgrading workspace " . CLI::info($workspace->name) . ": " . CLI::error($e->getMessage()) . "\n";
|
||||
|
||||
@@ -463,7 +463,7 @@ class Cases
|
||||
return $rows;
|
||||
}
|
||||
|
||||
public function isSelfService($USR_UID, $TAS_UID)
|
||||
public function isSelfService($USR_UID, $TAS_UID, $APP_UID = '')
|
||||
{
|
||||
$tasks = $this->getSelfServiceTasks($USR_UID);
|
||||
|
||||
@@ -472,6 +472,23 @@ class Cases
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($APP_UID != '') {
|
||||
$groupsInstance = new Groups();
|
||||
$groups = $groupsInstance->getActiveGroupsForAnUser($USR_UID);
|
||||
$taskInstance = new Task();
|
||||
$taskData = $taskInstance->Load($TAS_UID);
|
||||
$tasGroupVariable = str_replace(array('@', '#'), '', $taskData['TAS_GROUP_VARIABLE']);
|
||||
$caseData = $this->LoadCase($APP_UID);
|
||||
if (isset($caseData['APP_DATA'][$tasGroupVariable])) {
|
||||
if (trim($caseData['APP_DATA'][$tasGroupVariable]) != '') {
|
||||
if (in_array(trim($caseData['APP_DATA'][$tasGroupVariable]), $groups)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4752,10 +4769,15 @@ class Cases
|
||||
$RESULT_OBJECTS['OUTPUT_DOCUMENTS'] = array_merge_recursive(
|
||||
G::arrayDiff($MAIN_OBJECTS['VIEW']['OUTPUT_DOCUMENTS'],$MAIN_OBJECTS['BLOCK']['OUTPUT_DOCUMENTS']),
|
||||
G::arrayDiff($MAIN_OBJECTS['DELETE']['OUTPUT_DOCUMENTS'],$MAIN_OBJECTS['BLOCK']['OUTPUT_DOCUMENTS'])
|
||||
);
|
||||
);
|
||||
$RESULT_OBJECTS['CASES_NOTES'] = G::arrayDiff(
|
||||
$MAIN_OBJECTS['VIEW']['CASES_NOTES'], $MAIN_OBJECTS['BLOCK']['CASES_NOTES']
|
||||
);
|
||||
array_push($RESULT_OBJECTS['DYNAFORMS'], -1);
|
||||
array_push($RESULT_OBJECTS['INPUT_DOCUMENTS'], -1);
|
||||
array_push($RESULT_OBJECTS['OUTPUT_DOCUMENTS'], -1);
|
||||
array_push($RESULT_OBJECTS['CASES_NOTES'], -1);
|
||||
|
||||
return $RESULT_OBJECTS;
|
||||
}
|
||||
|
||||
@@ -4773,7 +4795,7 @@ class Cases
|
||||
$aCase = $this->loadCase($APP_UID);
|
||||
$USER_PERMISSIONS = Array();
|
||||
$GROUP_PERMISSIONS = Array();
|
||||
$RESULT = Array("DYNAFORM" => Array(), "INPUT" => Array(), "OUTPUT" => Array());
|
||||
$RESULT = Array("DYNAFORM" => Array(), "INPUT" => Array(), "OUTPUT" => Array(), "CASES_NOTES" => 0);
|
||||
|
||||
//permissions per user
|
||||
$oCriteria = new Criteria('workflow');
|
||||
@@ -4791,11 +4813,12 @@ class Cases
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, '')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, '0')
|
||||
)
|
||||
)->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, 'ALL')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, '')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, '0')
|
||||
)
|
||||
)
|
||||
);
|
||||
$oCriteria->add(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, 'ALL')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, '')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, '0')
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -4826,11 +4849,12 @@ class Cases
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, '')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::TAS_UID, '0')
|
||||
)
|
||||
)->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, 'ALL')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, '')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, '0')
|
||||
)
|
||||
)
|
||||
);
|
||||
$oCriteria->add(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, 'ALL')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, '')->addOr(
|
||||
$oCriteria->getNewCriterion(ObjectPermissionPeer::OP_CASE_STATUS, '0')
|
||||
)
|
||||
)
|
||||
);
|
||||
@@ -4841,7 +4865,6 @@ class Cases
|
||||
}
|
||||
}
|
||||
$PERMISSIONS = array_merge($USER_PERMISSIONS, $GROUP_PERMISSIONS);
|
||||
|
||||
foreach ($PERMISSIONS as $row) {
|
||||
$USER = $row['USR_UID'];
|
||||
$USER_RELATION = $row['OP_USER_RELATION'];
|
||||
@@ -4927,6 +4950,7 @@ class Cases
|
||||
}
|
||||
$oDataset->next();
|
||||
}
|
||||
$RESULT['CASES_NOTES'] = 1;
|
||||
break;
|
||||
case 'DYNAFORM':
|
||||
$oCriteria = new Criteria('workflow');
|
||||
@@ -5000,13 +5024,17 @@ class Cases
|
||||
$oDataset->next();
|
||||
}
|
||||
break;
|
||||
case 'CASES_NOTES':
|
||||
$RESULT['CASES_NOTES'] = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Array(
|
||||
"DYNAFORMS" => $RESULT['DYNAFORM'],
|
||||
"INPUT_DOCUMENTS" => $RESULT['INPUT'],
|
||||
"OUTPUT_DOCUMENTS" => $RESULT['OUTPUT']
|
||||
"OUTPUT_DOCUMENTS" => $RESULT['OUTPUT'],
|
||||
"CASES_NOTES" => $RESULT['CASES_NOTES']
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -993,10 +993,30 @@ class processMap {
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'users/users_ShortList2', $this->getTaskUsersCriteria($sTaskUID, $_SESSION ['iType']), $aFields);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
G::RenderPage('publish', 'raw');
|
||||
return true;
|
||||
} catch (Exception $oError) {
|
||||
throw ($oError);
|
||||
=======
|
||||
//If the function returns a DEFAULT calendar it means that this object doesn't have assigned any calendar
|
||||
$aFields ['TAS_CALENDAR'] = $calendarInfo ['CALENDAR_APPLIED'] != 'DEFAULT' ? $calendarInfo ['CALENDAR_UID'] : "";
|
||||
}
|
||||
|
||||
if ($iForm == 2) {
|
||||
if ($aFields['TAS_ASSIGN_TYPE'] == 'SELF_SERVICE' && $aFields['TAS_GROUP_VARIABLE'] != '') {
|
||||
$aFields['TAS_ASSIGN_TYPE'] = 'SELF_SERVICE_EVALUATE';
|
||||
}
|
||||
}
|
||||
|
||||
global $G_PUBLISH;
|
||||
G::LoadClass('xmlfield_InputPM');
|
||||
$G_PUBLISH = new Publisher ( );
|
||||
if($sw_template){
|
||||
$G_PUBLISH->AddContent('view', $sFilename);
|
||||
}else{
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', $sFilename, '', $aFields);
|
||||
>>>>>>> upstream/master
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3030,9 +3050,47 @@ class processMap {
|
||||
$aConditions [] = array(ContentPeer::CON_LANG, DBAdapter::getStringDelimiter () . SYS_LANG . DBAdapter::getStringDelimiter ());
|
||||
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
|
||||
|
||||
<<<<<<< HEAD
|
||||
$oCriteria->add(ProcessUserPeer::PU_TYPE, 'GROUP_SUPERVISOR');
|
||||
$oCriteria->add(ProcessUserPeer::PRO_UID, $sProcessUID);
|
||||
$oCriteria->addAscendingOrderByColumn(ContentPeer::CON_VALUE);
|
||||
=======
|
||||
/**
|
||||
* listProcessesUser
|
||||
*
|
||||
* @param string $sProcessUID
|
||||
* @return object(Criteria) $oCriteria
|
||||
*/
|
||||
function listProcessesUser($sProcessUID) {
|
||||
$aResp = array(
|
||||
array(
|
||||
'LA_PU_UID' => 'char',
|
||||
'LA_PRO_UID' => 'char',
|
||||
'LA_USR_UID' => 'char',
|
||||
'LA_PU_NAME' => 'char',
|
||||
'LA_PU_TYPE_NAME' => 'char')
|
||||
);
|
||||
|
||||
// Groups
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::PU_UID);
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::USR_UID);
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::PRO_UID);
|
||||
$oCriteria->addAsColumn('GRP_TITLE', ContentPeer::CON_VALUE);
|
||||
|
||||
$aConditions [] = array(ProcessUserPeer::USR_UID, ContentPeer::CON_ID);
|
||||
$aConditions [] = array(ContentPeer::CON_CATEGORY, DBAdapter::getStringDelimiter () . 'GRP_TITLE' . DBAdapter::getStringDelimiter ());
|
||||
$aConditions [] = array(ContentPeer::CON_LANG, DBAdapter::getStringDelimiter () . SYS_LANG . DBAdapter::getStringDelimiter ());
|
||||
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
|
||||
|
||||
$oCriteria->add(ProcessUserPeer::PU_TYPE, 'GROUP_SUPERVISOR');
|
||||
$oCriteria->add(ProcessUserPeer::PRO_UID, $sProcessUID);
|
||||
$oCriteria->addAscendingOrderByColumn(ContentPeer::CON_VALUE);
|
||||
|
||||
$oDataset = ProcessUserPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
>>>>>>> upstream/master
|
||||
|
||||
$oDataset = ProcessUserPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
@@ -3128,8 +3186,33 @@ class processMap {
|
||||
$aConditions [] = array(ContentPeer::CON_CATEGORY, DBAdapter::getStringDelimiter () . 'GRP_TITLE' . DBAdapter::getStringDelimiter ());
|
||||
$aConditions [] = array(ContentPeer::CON_LANG, DBAdapter::getStringDelimiter () . SYS_LANG . DBAdapter::getStringDelimiter ());
|
||||
|
||||
<<<<<<< HEAD
|
||||
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
|
||||
$oCriteria->add(GroupwfPeer::GRP_UID, $aGRUS, Criteria::NOT_IN);
|
||||
=======
|
||||
$aRespLi = array(
|
||||
array(
|
||||
'UID' => 'char',
|
||||
'USER_GROUP' => 'char',
|
||||
'TYPE_UID' => 'char',
|
||||
'PRO_UID' => 'char')
|
||||
);
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(GroupwfPeer::GRP_UID);
|
||||
$oCriteria->addAsColumn('GRP_TITLE', ContentPeer::CON_VALUE);
|
||||
|
||||
$aConditions [] = array(GroupwfPeer::GRP_UID, ContentPeer::CON_ID);
|
||||
$aConditions [] = array(ContentPeer::CON_CATEGORY, DBAdapter::getStringDelimiter () . 'GRP_TITLE' . DBAdapter::getStringDelimiter ());
|
||||
$aConditions [] = array(ContentPeer::CON_LANG, DBAdapter::getStringDelimiter () . SYS_LANG . DBAdapter::getStringDelimiter ());
|
||||
|
||||
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
|
||||
$oCriteria->add(GroupwfPeer::GRP_UID, $aGRUS, Criteria::NOT_IN);
|
||||
|
||||
$oCriteria->addAscendingOrderByColumn(ContentPeer::CON_VALUE);
|
||||
$oDataset = GroupwfPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
>>>>>>> upstream/master
|
||||
|
||||
$oCriteria->addAscendingOrderByColumn(ContentPeer::CON_VALUE);
|
||||
$oDataset = GroupwfPeer::doSelectRS($oCriteria);
|
||||
@@ -3348,6 +3431,10 @@ class processMap {
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
}
|
||||
break;
|
||||
case 'CASES_NOTES' :
|
||||
$sObjectType = G::LoadTranslation('ID_CASES_NOTES');
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
break;
|
||||
default :
|
||||
$sObjectType = G::LoadTranslation('ID_ALL');
|
||||
$sObject = G::LoadTranslation('ID_ALL');
|
||||
|
||||
@@ -3390,7 +3390,7 @@ class Processes {
|
||||
}
|
||||
$client = @new SoapClient($endpoint, $proxy);
|
||||
} catch (Exception $e) {
|
||||
throw ( new Exception ( $e->message ) );
|
||||
throw ( new Exception ( $e->getMessage() ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1010,10 +1010,6 @@ class System {
|
||||
|
||||
if ($_SESSION['PROCESSMAKER_ENV_HASH'] === $hash) {
|
||||
$_SESSION['PROCESSMAKER_ENV']['from_cache'] = 1;
|
||||
if (!isset($_SESSION['PROCESSMAKER_ENV']['proxy_pass'])) {
|
||||
$_SESSION['PROCESSMAKER_ENV']['proxy_pass'] = '';
|
||||
}
|
||||
$_SESSION['PROCESSMAKER_ENV']['proxy_pass'] = G::decrypt($_SESSION['PROCESSMAKER_ENV']['proxy_pass'], 'proxy_pass');
|
||||
return $_SESSION['PROCESSMAKER_ENV'];
|
||||
}
|
||||
}
|
||||
@@ -1025,8 +1021,8 @@ class System {
|
||||
'debug_time' => 0,
|
||||
'debug_calendar' => 0,
|
||||
'wsdl_cache' => 1,
|
||||
'memory_limit' => '100M',
|
||||
'time_zone' => 'America/La_Paz',
|
||||
'memory_limit' => '128M',
|
||||
'time_zone' => 'America/New_York',
|
||||
'memcached' => 0,
|
||||
'memcached_server' => '',
|
||||
'default_skin' => 'classic',
|
||||
|
||||
@@ -1653,6 +1653,43 @@ class wsBase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* get all variables the system and case selected
|
||||
* @param string $caseId
|
||||
*
|
||||
* @return $result will return an object
|
||||
*/
|
||||
public function getVariablesNames($caseId)
|
||||
{
|
||||
try {
|
||||
|
||||
$oCase = new Cases();
|
||||
|
||||
$caseFields = $oCase->loadCase($caseId);
|
||||
|
||||
$oldFields = $caseFields['APP_DATA'];
|
||||
$resFields = array();
|
||||
|
||||
foreach ($oldFields as $key => $val) {
|
||||
$node = new stdClass();
|
||||
$node->name = $key;
|
||||
$resFields[] = $node;
|
||||
}
|
||||
|
||||
$result = new wsGetVariableResponse(
|
||||
0,
|
||||
count($resFields) . G::loadTranslation('ID_VARIABLES_SENT'), $resFields
|
||||
);
|
||||
|
||||
return $result;
|
||||
|
||||
} catch (Exception $e) {
|
||||
$result = new wsGetVariableResponse(100, $e->getMessage(), null);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* new Case begins a new case under the name of the logged-in user.
|
||||
* @param string $processId
|
||||
|
||||
@@ -54,7 +54,7 @@ class workspaceTools {
|
||||
*
|
||||
* @param bool $first true if this is the first workspace to be upgrade
|
||||
*/
|
||||
public function upgrade($first=false, $buildCacheView=false)
|
||||
public function upgrade($first=false, $buildCacheView=false, $workSpace=SYS_SYS)
|
||||
{
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Updating database...\n");
|
||||
@@ -72,7 +72,7 @@ class workspaceTools {
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Updating Content...\n");
|
||||
$this->upgradeContent();
|
||||
$this->upgradeContent($workSpace);
|
||||
$stop = microtime(true);
|
||||
$final = $stop - $start;
|
||||
CLI::logging("<*> Process Updating Content carried out in $final seconds.\n");
|
||||
@@ -290,7 +290,7 @@ class workspaceTools {
|
||||
* Upgrade this workspace Content.
|
||||
*
|
||||
*/
|
||||
public function upgradeContent() {
|
||||
public function upgradeContent($workSpace=SYS_SYS) {
|
||||
$this->initPropel(true);
|
||||
require_once('classes/model/Language.php');
|
||||
G::LoadThirdParty('pear/json', 'class.json');
|
||||
@@ -304,7 +304,7 @@ class workspaceTools {
|
||||
}
|
||||
require_once('classes/model/Content.php');
|
||||
$regenerateContent = new Content();
|
||||
$regenerateContent->regenerateContent($arrayLang);
|
||||
$regenerateContent->regenerateContent($arrayLang, $workSpace);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -304,6 +304,61 @@ class AppCacheView extends BaseAppCacheView
|
||||
return $tasks;
|
||||
}
|
||||
|
||||
public function getSelfServiceCasesByEvaluate($userUid) {
|
||||
$cases = array();
|
||||
|
||||
//check groups assigned to SelfService task
|
||||
G::LoadClass('groups');
|
||||
$group = new Groups();
|
||||
$aGroups = $group->getActiveGroupsForAnUser($userUid);
|
||||
|
||||
$c = new Criteria();
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn(TaskPeer::TAS_UID);
|
||||
$c->addSelectColumn(TaskPeer::PRO_UID);
|
||||
$c->addSelectColumn(TaskPeer::TAS_GROUP_VARIABLE);
|
||||
$c->addJoin(TaskPeer::PRO_UID, ProcessPeer::PRO_UID, Criteria::LEFT_JOIN);
|
||||
$c->addJoin(TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN);
|
||||
$c->add(ProcessPeer::PRO_STATUS, 'ACTIVE');
|
||||
$c->add(TaskPeer::TAS_ASSIGN_TYPE, 'SELF_SERVICE');
|
||||
$c->add(TaskPeer::TAS_GROUP_VARIABLE, '', Criteria::NOT_EQUAL);
|
||||
$rs = TaskPeer::doSelectRS($c);
|
||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
|
||||
if ($rs->getRecordCount() > 0) {
|
||||
if (!class_exists('Cases')) {
|
||||
G::loadClass('case');
|
||||
}
|
||||
$caseInstance = new Cases();
|
||||
while ($row = $rs->getRow()) {
|
||||
$tasGroupVariable = str_replace(array('@', '#'), '', $row['TAS_GROUP_VARIABLE']);
|
||||
$c2 = new Criteria();
|
||||
$c2->clearSelectColumns();
|
||||
$c2->addSelectColumn(AppDelegationPeer::APP_UID);
|
||||
$c2->add(AppDelegationPeer::TAS_UID, $row['TAS_UID']);
|
||||
$c2->add(AppDelegationPeer::USR_UID, '');
|
||||
$c2->add(AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN');
|
||||
$rs2 = AppDelegationPeer::doSelectRS($c2);
|
||||
$rs2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$rs2->next();
|
||||
while ($row2 = $rs2->getRow()) {
|
||||
$caseData = $caseInstance->LoadCase($row2['APP_UID']);
|
||||
if (isset($caseData['APP_DATA'][$tasGroupVariable])) {
|
||||
if (trim($caseData['APP_DATA'][$tasGroupVariable]) != '') {
|
||||
if (in_array(trim($caseData['APP_DATA'][$tasGroupVariable]), $aGroups)) {
|
||||
$cases[] = $row2['APP_UID'];
|
||||
}
|
||||
}
|
||||
}
|
||||
$rs2->next();
|
||||
}
|
||||
$rs->next();
|
||||
}
|
||||
}
|
||||
return $cases;
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the UNASSIGNED cases list criteria
|
||||
* param $userUid the current userUid
|
||||
@@ -327,14 +382,18 @@ class AppCacheView extends BaseAppCacheView
|
||||
$criteria = $this->addPMFieldsToCriteria('unassigned');
|
||||
}
|
||||
|
||||
//$criteria->add(AppCacheViewPeer::APP_STATUS, "TO_DO");
|
||||
|
||||
$criteria->add(AppCacheViewPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
|
||||
//$criteria->add(AppCacheViewPeer::APP_THREAD_STATUS, 'OPEN');
|
||||
//$criteria->add(AppCacheViewPeer::DEL_THREAD_STATUS, 'OPEN');
|
||||
|
||||
$criteria->add(AppCacheViewPeer::USR_UID, '');
|
||||
$criteria->add(AppCacheViewPeer::TAS_UID, $tasks, Criteria::IN);
|
||||
|
||||
$cases = $this->getSelfServiceCasesByEvaluate($userUid);
|
||||
if (!empty($cases)) {
|
||||
$criteria->add(
|
||||
$criteria->getNewCriterion(AppCacheViewPeer::TAS_UID, $tasks, Criteria::IN)->
|
||||
addOr($criteria->getNewCriterion(AppCacheViewPeer::APP_UID, $cases, Criteria::IN))
|
||||
);
|
||||
} else {
|
||||
$criteria->add(AppCacheViewPeer::TAS_UID, $tasks, Criteria::IN);
|
||||
}
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ class Content extends BaseContent {
|
||||
*
|
||||
* @param array $langs
|
||||
*/
|
||||
function regenerateContent($langs)
|
||||
function regenerateContent($langs, $workSpace=SYS_SYS)
|
||||
{
|
||||
//Search the language
|
||||
$key = array_search('en',$langs);
|
||||
@@ -312,18 +312,26 @@ class Content extends BaseContent {
|
||||
|
||||
$sql = " SELECT CON_ID, CON_CATEGORY, CON_LANG, CON_PARENT, CON_VALUE
|
||||
FROM CONTENT
|
||||
ORDER BY CON_ID, CON_CATEGORY, CON_LANG, CON_PARENT ";
|
||||
ORDER BY CON_ID, CON_CATEGORY, CON_PARENT, CON_LANG";
|
||||
|
||||
G::LoadClass("wsTools");
|
||||
$workSpace = new workspaceTools($workSpace);
|
||||
$workSpace->getDBInfo();
|
||||
|
||||
$link = mysql_pconnect($workSpace->dbHost, $workSpace->dbUser, $workSpace->dbPass)
|
||||
or die ("Could not connect");
|
||||
|
||||
mysql_select_db($workSpace->dbName, $link);
|
||||
mysql_query("SET NAMES 'utf8';");
|
||||
mysql_query('SET OPTION SQL_BIG_SELECTS=1');
|
||||
$result = mysql_unbuffered_query($sql);
|
||||
$result = mysql_unbuffered_query($sql, $link);
|
||||
$list = array();
|
||||
$default = array();
|
||||
$sw = array('CON_ID'=>'','CON_CATEGORY'=>'','CON_PARENT'=>'');
|
||||
while ($row = mysql_fetch_assoc($result)) {
|
||||
if ($sw['CON_ID'] == $row['CON_ID'] && $sw['CON_CATEGORY'] == $row['CON_CATEGORY'] && $sw['CON_PARENT'] == $row['CON_PARENT']) {
|
||||
$list[] = $row;
|
||||
if ($sw['CON_LANG'] == $langs[$key]) {
|
||||
$default = $row;
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->rowsClustered++;
|
||||
if (count($langs) != count($list)) {
|
||||
@@ -342,6 +350,9 @@ class Content extends BaseContent {
|
||||
$default = array();
|
||||
$list[] = $row;
|
||||
}
|
||||
if ($sw['CON_LANG'] == $langs[$key]) {
|
||||
$default = $row;
|
||||
}
|
||||
$this->rowsProcessed++;
|
||||
}
|
||||
if (count($langs) != count($list)) {
|
||||
@@ -352,11 +363,13 @@ class Content extends BaseContent {
|
||||
mysql_free_result($result);
|
||||
$total = $this->rowsProcessed + $this->rowsInserted;
|
||||
|
||||
CLI::logging("Rows Processed ---> $this->rowsProcessed ..... \n");
|
||||
CLI::logging("Rows Clustered ---> $this->rowsClustered ..... \n");
|
||||
CLI::logging("Rows Unchanged ---> $this->rowsUnchanged ..... \n");
|
||||
CLI::logging("Rows Inserted ---> $this->rowsInserted ..... \n");
|
||||
CLI::logging("Rows Total ---> $total ..... \n");
|
||||
if (!isset($_SERVER['SERVER_NAME'])) {
|
||||
CLI::logging("Rows Processed ---> $this->rowsProcessed ..... \n");
|
||||
CLI::logging("Rows Clustered ---> $this->rowsClustered ..... \n");
|
||||
CLI::logging("Rows Unchanged ---> $this->rowsUnchanged ..... \n");
|
||||
CLI::logging("Rows Inserted ---> $this->rowsInserted ..... \n");
|
||||
CLI::logging("Rows Total ---> $total ..... \n");
|
||||
}
|
||||
}
|
||||
|
||||
function checkLanguage($content, $default)
|
||||
|
||||
@@ -89,6 +89,8 @@ class TaskMapBuilder
|
||||
|
||||
$tMap->addColumn('TAS_ASSIGN_VARIABLE', 'TasAssignVariable', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
$tMap->addColumn('TAS_GROUP_VARIABLE', 'TasGroupVariable', 'string', CreoleTypes::VARCHAR, false, 100);
|
||||
|
||||
$tMap->addColumn('TAS_MI_INSTANCE_VARIABLE', 'TasMiInstanceVariable', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
$tMap->addColumn('TAS_MI_COMPLETE_VARIABLE', 'TasMiCompleteVariable', 'string', CreoleTypes::VARCHAR, true, 100);
|
||||
|
||||
@@ -99,6 +99,12 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $tas_assign_variable = '@@SYS_NEXT_USER_TO_BE_ASSIGNED';
|
||||
|
||||
/**
|
||||
* The value for the tas_group_variable field.
|
||||
* @var string
|
||||
*/
|
||||
protected $tas_group_variable = '@@SYS_GROUP_TO_BE_ASSIGNED';
|
||||
|
||||
/**
|
||||
* The value for the tas_mi_instance_variable field.
|
||||
* @var string
|
||||
@@ -419,6 +425,17 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
return $this->tas_assign_variable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [tas_group_variable] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTasGroupVariable()
|
||||
{
|
||||
|
||||
return $this->tas_group_variable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [tas_mi_instance_variable] column value.
|
||||
*
|
||||
@@ -990,6 +1007,28 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
|
||||
} // setTasAssignVariable()
|
||||
|
||||
/**
|
||||
* Set the value of [tas_group_variable] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return void
|
||||
*/
|
||||
public function setTasGroupVariable($v)
|
||||
{
|
||||
|
||||
// Since the native PHP type for this column is string,
|
||||
// we will cast the input to a string (if it is not).
|
||||
if ($v !== null && !is_string($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->tas_group_variable !== $v || $v === '@@SYS_GROUP_TO_BE_ASSIGNED') {
|
||||
$this->tas_group_variable = $v;
|
||||
$this->modifiedColumns[] = TaskPeer::TAS_GROUP_VARIABLE;
|
||||
}
|
||||
|
||||
} // setTasGroupVariable()
|
||||
|
||||
/**
|
||||
* Set the value of [tas_mi_instance_variable] column.
|
||||
*
|
||||
@@ -1669,70 +1708,72 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
|
||||
$this->tas_assign_variable = $rs->getString($startcol + 11);
|
||||
|
||||
$this->tas_mi_instance_variable = $rs->getString($startcol + 12);
|
||||
$this->tas_group_variable = $rs->getString($startcol + 12);
|
||||
|
||||
$this->tas_mi_complete_variable = $rs->getString($startcol + 13);
|
||||
$this->tas_mi_instance_variable = $rs->getString($startcol + 13);
|
||||
|
||||
$this->tas_assign_location = $rs->getString($startcol + 14);
|
||||
$this->tas_mi_complete_variable = $rs->getString($startcol + 14);
|
||||
|
||||
$this->tas_assign_location_adhoc = $rs->getString($startcol + 15);
|
||||
$this->tas_assign_location = $rs->getString($startcol + 15);
|
||||
|
||||
$this->tas_transfer_fly = $rs->getString($startcol + 16);
|
||||
$this->tas_assign_location_adhoc = $rs->getString($startcol + 16);
|
||||
|
||||
$this->tas_last_assigned = $rs->getString($startcol + 17);
|
||||
$this->tas_transfer_fly = $rs->getString($startcol + 17);
|
||||
|
||||
$this->tas_user = $rs->getString($startcol + 18);
|
||||
$this->tas_last_assigned = $rs->getString($startcol + 18);
|
||||
|
||||
$this->tas_can_upload = $rs->getString($startcol + 19);
|
||||
$this->tas_user = $rs->getString($startcol + 19);
|
||||
|
||||
$this->tas_view_upload = $rs->getString($startcol + 20);
|
||||
$this->tas_can_upload = $rs->getString($startcol + 20);
|
||||
|
||||
$this->tas_view_additional_documentation = $rs->getString($startcol + 21);
|
||||
$this->tas_view_upload = $rs->getString($startcol + 21);
|
||||
|
||||
$this->tas_can_cancel = $rs->getString($startcol + 22);
|
||||
$this->tas_view_additional_documentation = $rs->getString($startcol + 22);
|
||||
|
||||
$this->tas_owner_app = $rs->getString($startcol + 23);
|
||||
$this->tas_can_cancel = $rs->getString($startcol + 23);
|
||||
|
||||
$this->stg_uid = $rs->getString($startcol + 24);
|
||||
$this->tas_owner_app = $rs->getString($startcol + 24);
|
||||
|
||||
$this->tas_can_pause = $rs->getString($startcol + 25);
|
||||
$this->stg_uid = $rs->getString($startcol + 25);
|
||||
|
||||
$this->tas_can_send_message = $rs->getString($startcol + 26);
|
||||
$this->tas_can_pause = $rs->getString($startcol + 26);
|
||||
|
||||
$this->tas_can_delete_docs = $rs->getString($startcol + 27);
|
||||
$this->tas_can_send_message = $rs->getString($startcol + 27);
|
||||
|
||||
$this->tas_self_service = $rs->getString($startcol + 28);
|
||||
$this->tas_can_delete_docs = $rs->getString($startcol + 28);
|
||||
|
||||
$this->tas_start = $rs->getString($startcol + 29);
|
||||
$this->tas_self_service = $rs->getString($startcol + 29);
|
||||
|
||||
$this->tas_to_last_user = $rs->getString($startcol + 30);
|
||||
$this->tas_start = $rs->getString($startcol + 30);
|
||||
|
||||
$this->tas_send_last_email = $rs->getString($startcol + 31);
|
||||
$this->tas_to_last_user = $rs->getString($startcol + 31);
|
||||
|
||||
$this->tas_derivation = $rs->getString($startcol + 32);
|
||||
$this->tas_send_last_email = $rs->getString($startcol + 32);
|
||||
|
||||
$this->tas_posx = $rs->getInt($startcol + 33);
|
||||
$this->tas_derivation = $rs->getString($startcol + 33);
|
||||
|
||||
$this->tas_posy = $rs->getInt($startcol + 34);
|
||||
$this->tas_posx = $rs->getInt($startcol + 34);
|
||||
|
||||
$this->tas_width = $rs->getInt($startcol + 35);
|
||||
$this->tas_posy = $rs->getInt($startcol + 35);
|
||||
|
||||
$this->tas_height = $rs->getInt($startcol + 36);
|
||||
$this->tas_width = $rs->getInt($startcol + 36);
|
||||
|
||||
$this->tas_color = $rs->getString($startcol + 37);
|
||||
$this->tas_height = $rs->getInt($startcol + 37);
|
||||
|
||||
$this->tas_evn_uid = $rs->getString($startcol + 38);
|
||||
$this->tas_color = $rs->getString($startcol + 38);
|
||||
|
||||
$this->tas_boundary = $rs->getString($startcol + 39);
|
||||
$this->tas_evn_uid = $rs->getString($startcol + 39);
|
||||
|
||||
$this->tas_derivation_screen_tpl = $rs->getString($startcol + 40);
|
||||
$this->tas_boundary = $rs->getString($startcol + 40);
|
||||
|
||||
$this->tas_derivation_screen_tpl = $rs->getString($startcol + 41);
|
||||
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 41; // 41 = TaskPeer::NUM_COLUMNS - TaskPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 42; // 42 = TaskPeer::NUM_COLUMNS - TaskPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating Task object", $e);
|
||||
@@ -1973,90 +2014,93 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
return $this->getTasAssignVariable();
|
||||
break;
|
||||
case 12:
|
||||
return $this->getTasMiInstanceVariable();
|
||||
return $this->getTasGroupVariable();
|
||||
break;
|
||||
case 13:
|
||||
return $this->getTasMiCompleteVariable();
|
||||
return $this->getTasMiInstanceVariable();
|
||||
break;
|
||||
case 14:
|
||||
return $this->getTasAssignLocation();
|
||||
return $this->getTasMiCompleteVariable();
|
||||
break;
|
||||
case 15:
|
||||
return $this->getTasAssignLocationAdhoc();
|
||||
return $this->getTasAssignLocation();
|
||||
break;
|
||||
case 16:
|
||||
return $this->getTasTransferFly();
|
||||
return $this->getTasAssignLocationAdhoc();
|
||||
break;
|
||||
case 17:
|
||||
return $this->getTasLastAssigned();
|
||||
return $this->getTasTransferFly();
|
||||
break;
|
||||
case 18:
|
||||
return $this->getTasUser();
|
||||
return $this->getTasLastAssigned();
|
||||
break;
|
||||
case 19:
|
||||
return $this->getTasCanUpload();
|
||||
return $this->getTasUser();
|
||||
break;
|
||||
case 20:
|
||||
return $this->getTasViewUpload();
|
||||
return $this->getTasCanUpload();
|
||||
break;
|
||||
case 21:
|
||||
return $this->getTasViewAdditionalDocumentation();
|
||||
return $this->getTasViewUpload();
|
||||
break;
|
||||
case 22:
|
||||
return $this->getTasCanCancel();
|
||||
return $this->getTasViewAdditionalDocumentation();
|
||||
break;
|
||||
case 23:
|
||||
return $this->getTasOwnerApp();
|
||||
return $this->getTasCanCancel();
|
||||
break;
|
||||
case 24:
|
||||
return $this->getStgUid();
|
||||
return $this->getTasOwnerApp();
|
||||
break;
|
||||
case 25:
|
||||
return $this->getTasCanPause();
|
||||
return $this->getStgUid();
|
||||
break;
|
||||
case 26:
|
||||
return $this->getTasCanSendMessage();
|
||||
return $this->getTasCanPause();
|
||||
break;
|
||||
case 27:
|
||||
return $this->getTasCanDeleteDocs();
|
||||
return $this->getTasCanSendMessage();
|
||||
break;
|
||||
case 28:
|
||||
return $this->getTasSelfService();
|
||||
return $this->getTasCanDeleteDocs();
|
||||
break;
|
||||
case 29:
|
||||
return $this->getTasStart();
|
||||
return $this->getTasSelfService();
|
||||
break;
|
||||
case 30:
|
||||
return $this->getTasToLastUser();
|
||||
return $this->getTasStart();
|
||||
break;
|
||||
case 31:
|
||||
return $this->getTasSendLastEmail();
|
||||
return $this->getTasToLastUser();
|
||||
break;
|
||||
case 32:
|
||||
return $this->getTasDerivation();
|
||||
return $this->getTasSendLastEmail();
|
||||
break;
|
||||
case 33:
|
||||
return $this->getTasPosx();
|
||||
return $this->getTasDerivation();
|
||||
break;
|
||||
case 34:
|
||||
return $this->getTasPosy();
|
||||
return $this->getTasPosx();
|
||||
break;
|
||||
case 35:
|
||||
return $this->getTasWidth();
|
||||
return $this->getTasPosy();
|
||||
break;
|
||||
case 36:
|
||||
return $this->getTasHeight();
|
||||
return $this->getTasWidth();
|
||||
break;
|
||||
case 37:
|
||||
return $this->getTasColor();
|
||||
return $this->getTasHeight();
|
||||
break;
|
||||
case 38:
|
||||
return $this->getTasEvnUid();
|
||||
return $this->getTasColor();
|
||||
break;
|
||||
case 39:
|
||||
return $this->getTasBoundary();
|
||||
return $this->getTasEvnUid();
|
||||
break;
|
||||
case 40:
|
||||
return $this->getTasBoundary();
|
||||
break;
|
||||
case 41:
|
||||
return $this->getTasDerivationScreenTpl();
|
||||
break;
|
||||
default:
|
||||
@@ -2091,35 +2135,36 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
$keys[9] => $this->getTasPriorityVariable(),
|
||||
$keys[10] => $this->getTasAssignType(),
|
||||
$keys[11] => $this->getTasAssignVariable(),
|
||||
$keys[12] => $this->getTasMiInstanceVariable(),
|
||||
$keys[13] => $this->getTasMiCompleteVariable(),
|
||||
$keys[14] => $this->getTasAssignLocation(),
|
||||
$keys[15] => $this->getTasAssignLocationAdhoc(),
|
||||
$keys[16] => $this->getTasTransferFly(),
|
||||
$keys[17] => $this->getTasLastAssigned(),
|
||||
$keys[18] => $this->getTasUser(),
|
||||
$keys[19] => $this->getTasCanUpload(),
|
||||
$keys[20] => $this->getTasViewUpload(),
|
||||
$keys[21] => $this->getTasViewAdditionalDocumentation(),
|
||||
$keys[22] => $this->getTasCanCancel(),
|
||||
$keys[23] => $this->getTasOwnerApp(),
|
||||
$keys[24] => $this->getStgUid(),
|
||||
$keys[25] => $this->getTasCanPause(),
|
||||
$keys[26] => $this->getTasCanSendMessage(),
|
||||
$keys[27] => $this->getTasCanDeleteDocs(),
|
||||
$keys[28] => $this->getTasSelfService(),
|
||||
$keys[29] => $this->getTasStart(),
|
||||
$keys[30] => $this->getTasToLastUser(),
|
||||
$keys[31] => $this->getTasSendLastEmail(),
|
||||
$keys[32] => $this->getTasDerivation(),
|
||||
$keys[33] => $this->getTasPosx(),
|
||||
$keys[34] => $this->getTasPosy(),
|
||||
$keys[35] => $this->getTasWidth(),
|
||||
$keys[36] => $this->getTasHeight(),
|
||||
$keys[37] => $this->getTasColor(),
|
||||
$keys[38] => $this->getTasEvnUid(),
|
||||
$keys[39] => $this->getTasBoundary(),
|
||||
$keys[40] => $this->getTasDerivationScreenTpl(),
|
||||
$keys[12] => $this->getTasGroupVariable(),
|
||||
$keys[13] => $this->getTasMiInstanceVariable(),
|
||||
$keys[14] => $this->getTasMiCompleteVariable(),
|
||||
$keys[15] => $this->getTasAssignLocation(),
|
||||
$keys[16] => $this->getTasAssignLocationAdhoc(),
|
||||
$keys[17] => $this->getTasTransferFly(),
|
||||
$keys[18] => $this->getTasLastAssigned(),
|
||||
$keys[19] => $this->getTasUser(),
|
||||
$keys[20] => $this->getTasCanUpload(),
|
||||
$keys[21] => $this->getTasViewUpload(),
|
||||
$keys[22] => $this->getTasViewAdditionalDocumentation(),
|
||||
$keys[23] => $this->getTasCanCancel(),
|
||||
$keys[24] => $this->getTasOwnerApp(),
|
||||
$keys[25] => $this->getStgUid(),
|
||||
$keys[26] => $this->getTasCanPause(),
|
||||
$keys[27] => $this->getTasCanSendMessage(),
|
||||
$keys[28] => $this->getTasCanDeleteDocs(),
|
||||
$keys[29] => $this->getTasSelfService(),
|
||||
$keys[30] => $this->getTasStart(),
|
||||
$keys[31] => $this->getTasToLastUser(),
|
||||
$keys[32] => $this->getTasSendLastEmail(),
|
||||
$keys[33] => $this->getTasDerivation(),
|
||||
$keys[34] => $this->getTasPosx(),
|
||||
$keys[35] => $this->getTasPosy(),
|
||||
$keys[36] => $this->getTasWidth(),
|
||||
$keys[37] => $this->getTasHeight(),
|
||||
$keys[38] => $this->getTasColor(),
|
||||
$keys[39] => $this->getTasEvnUid(),
|
||||
$keys[40] => $this->getTasBoundary(),
|
||||
$keys[41] => $this->getTasDerivationScreenTpl(),
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
@@ -2188,90 +2233,93 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
$this->setTasAssignVariable($value);
|
||||
break;
|
||||
case 12:
|
||||
$this->setTasMiInstanceVariable($value);
|
||||
$this->setTasGroupVariable($value);
|
||||
break;
|
||||
case 13:
|
||||
$this->setTasMiCompleteVariable($value);
|
||||
$this->setTasMiInstanceVariable($value);
|
||||
break;
|
||||
case 14:
|
||||
$this->setTasAssignLocation($value);
|
||||
$this->setTasMiCompleteVariable($value);
|
||||
break;
|
||||
case 15:
|
||||
$this->setTasAssignLocationAdhoc($value);
|
||||
$this->setTasAssignLocation($value);
|
||||
break;
|
||||
case 16:
|
||||
$this->setTasTransferFly($value);
|
||||
$this->setTasAssignLocationAdhoc($value);
|
||||
break;
|
||||
case 17:
|
||||
$this->setTasLastAssigned($value);
|
||||
$this->setTasTransferFly($value);
|
||||
break;
|
||||
case 18:
|
||||
$this->setTasUser($value);
|
||||
$this->setTasLastAssigned($value);
|
||||
break;
|
||||
case 19:
|
||||
$this->setTasCanUpload($value);
|
||||
$this->setTasUser($value);
|
||||
break;
|
||||
case 20:
|
||||
$this->setTasViewUpload($value);
|
||||
$this->setTasCanUpload($value);
|
||||
break;
|
||||
case 21:
|
||||
$this->setTasViewAdditionalDocumentation($value);
|
||||
$this->setTasViewUpload($value);
|
||||
break;
|
||||
case 22:
|
||||
$this->setTasCanCancel($value);
|
||||
$this->setTasViewAdditionalDocumentation($value);
|
||||
break;
|
||||
case 23:
|
||||
$this->setTasOwnerApp($value);
|
||||
$this->setTasCanCancel($value);
|
||||
break;
|
||||
case 24:
|
||||
$this->setStgUid($value);
|
||||
$this->setTasOwnerApp($value);
|
||||
break;
|
||||
case 25:
|
||||
$this->setTasCanPause($value);
|
||||
$this->setStgUid($value);
|
||||
break;
|
||||
case 26:
|
||||
$this->setTasCanSendMessage($value);
|
||||
$this->setTasCanPause($value);
|
||||
break;
|
||||
case 27:
|
||||
$this->setTasCanDeleteDocs($value);
|
||||
$this->setTasCanSendMessage($value);
|
||||
break;
|
||||
case 28:
|
||||
$this->setTasSelfService($value);
|
||||
$this->setTasCanDeleteDocs($value);
|
||||
break;
|
||||
case 29:
|
||||
$this->setTasStart($value);
|
||||
$this->setTasSelfService($value);
|
||||
break;
|
||||
case 30:
|
||||
$this->setTasToLastUser($value);
|
||||
$this->setTasStart($value);
|
||||
break;
|
||||
case 31:
|
||||
$this->setTasSendLastEmail($value);
|
||||
$this->setTasToLastUser($value);
|
||||
break;
|
||||
case 32:
|
||||
$this->setTasDerivation($value);
|
||||
$this->setTasSendLastEmail($value);
|
||||
break;
|
||||
case 33:
|
||||
$this->setTasPosx($value);
|
||||
$this->setTasDerivation($value);
|
||||
break;
|
||||
case 34:
|
||||
$this->setTasPosy($value);
|
||||
$this->setTasPosx($value);
|
||||
break;
|
||||
case 35:
|
||||
$this->setTasWidth($value);
|
||||
$this->setTasPosy($value);
|
||||
break;
|
||||
case 36:
|
||||
$this->setTasHeight($value);
|
||||
$this->setTasWidth($value);
|
||||
break;
|
||||
case 37:
|
||||
$this->setTasColor($value);
|
||||
$this->setTasHeight($value);
|
||||
break;
|
||||
case 38:
|
||||
$this->setTasEvnUid($value);
|
||||
$this->setTasColor($value);
|
||||
break;
|
||||
case 39:
|
||||
$this->setTasBoundary($value);
|
||||
$this->setTasEvnUid($value);
|
||||
break;
|
||||
case 40:
|
||||
$this->setTasBoundary($value);
|
||||
break;
|
||||
case 41:
|
||||
$this->setTasDerivationScreenTpl($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -2346,119 +2394,123 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[12], $arr)) {
|
||||
$this->setTasMiInstanceVariable($arr[$keys[12]]);
|
||||
$this->setTasGroupVariable($arr[$keys[12]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[13], $arr)) {
|
||||
$this->setTasMiCompleteVariable($arr[$keys[13]]);
|
||||
$this->setTasMiInstanceVariable($arr[$keys[13]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[14], $arr)) {
|
||||
$this->setTasAssignLocation($arr[$keys[14]]);
|
||||
$this->setTasMiCompleteVariable($arr[$keys[14]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[15], $arr)) {
|
||||
$this->setTasAssignLocationAdhoc($arr[$keys[15]]);
|
||||
$this->setTasAssignLocation($arr[$keys[15]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[16], $arr)) {
|
||||
$this->setTasTransferFly($arr[$keys[16]]);
|
||||
$this->setTasAssignLocationAdhoc($arr[$keys[16]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[17], $arr)) {
|
||||
$this->setTasLastAssigned($arr[$keys[17]]);
|
||||
$this->setTasTransferFly($arr[$keys[17]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[18], $arr)) {
|
||||
$this->setTasUser($arr[$keys[18]]);
|
||||
$this->setTasLastAssigned($arr[$keys[18]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[19], $arr)) {
|
||||
$this->setTasCanUpload($arr[$keys[19]]);
|
||||
$this->setTasUser($arr[$keys[19]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[20], $arr)) {
|
||||
$this->setTasViewUpload($arr[$keys[20]]);
|
||||
$this->setTasCanUpload($arr[$keys[20]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[21], $arr)) {
|
||||
$this->setTasViewAdditionalDocumentation($arr[$keys[21]]);
|
||||
$this->setTasViewUpload($arr[$keys[21]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[22], $arr)) {
|
||||
$this->setTasCanCancel($arr[$keys[22]]);
|
||||
$this->setTasViewAdditionalDocumentation($arr[$keys[22]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[23], $arr)) {
|
||||
$this->setTasOwnerApp($arr[$keys[23]]);
|
||||
$this->setTasCanCancel($arr[$keys[23]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[24], $arr)) {
|
||||
$this->setStgUid($arr[$keys[24]]);
|
||||
$this->setTasOwnerApp($arr[$keys[24]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[25], $arr)) {
|
||||
$this->setTasCanPause($arr[$keys[25]]);
|
||||
$this->setStgUid($arr[$keys[25]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[26], $arr)) {
|
||||
$this->setTasCanSendMessage($arr[$keys[26]]);
|
||||
$this->setTasCanPause($arr[$keys[26]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[27], $arr)) {
|
||||
$this->setTasCanDeleteDocs($arr[$keys[27]]);
|
||||
$this->setTasCanSendMessage($arr[$keys[27]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[28], $arr)) {
|
||||
$this->setTasSelfService($arr[$keys[28]]);
|
||||
$this->setTasCanDeleteDocs($arr[$keys[28]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[29], $arr)) {
|
||||
$this->setTasStart($arr[$keys[29]]);
|
||||
$this->setTasSelfService($arr[$keys[29]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[30], $arr)) {
|
||||
$this->setTasToLastUser($arr[$keys[30]]);
|
||||
$this->setTasStart($arr[$keys[30]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[31], $arr)) {
|
||||
$this->setTasSendLastEmail($arr[$keys[31]]);
|
||||
$this->setTasToLastUser($arr[$keys[31]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[32], $arr)) {
|
||||
$this->setTasDerivation($arr[$keys[32]]);
|
||||
$this->setTasSendLastEmail($arr[$keys[32]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[33], $arr)) {
|
||||
$this->setTasPosx($arr[$keys[33]]);
|
||||
$this->setTasDerivation($arr[$keys[33]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[34], $arr)) {
|
||||
$this->setTasPosy($arr[$keys[34]]);
|
||||
$this->setTasPosx($arr[$keys[34]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[35], $arr)) {
|
||||
$this->setTasWidth($arr[$keys[35]]);
|
||||
$this->setTasPosy($arr[$keys[35]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[36], $arr)) {
|
||||
$this->setTasHeight($arr[$keys[36]]);
|
||||
$this->setTasWidth($arr[$keys[36]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[37], $arr)) {
|
||||
$this->setTasColor($arr[$keys[37]]);
|
||||
$this->setTasHeight($arr[$keys[37]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[38], $arr)) {
|
||||
$this->setTasEvnUid($arr[$keys[38]]);
|
||||
$this->setTasColor($arr[$keys[38]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[39], $arr)) {
|
||||
$this->setTasBoundary($arr[$keys[39]]);
|
||||
$this->setTasEvnUid($arr[$keys[39]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[40], $arr)) {
|
||||
$this->setTasDerivationScreenTpl($arr[$keys[40]]);
|
||||
$this->setTasBoundary($arr[$keys[40]]);
|
||||
}
|
||||
|
||||
if (array_key_exists($keys[41], $arr)) {
|
||||
$this->setTasDerivationScreenTpl($arr[$keys[41]]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2520,6 +2572,10 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
$criteria->add(TaskPeer::TAS_ASSIGN_VARIABLE, $this->tas_assign_variable);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(TaskPeer::TAS_GROUP_VARIABLE)) {
|
||||
$criteria->add(TaskPeer::TAS_GROUP_VARIABLE, $this->tas_group_variable);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(TaskPeer::TAS_MI_INSTANCE_VARIABLE)) {
|
||||
$criteria->add(TaskPeer::TAS_MI_INSTANCE_VARIABLE, $this->tas_mi_instance_variable);
|
||||
}
|
||||
@@ -2712,6 +2768,8 @@ abstract class BaseTask extends BaseObject implements Persistent
|
||||
|
||||
$copyObj->setTasAssignVariable($this->tas_assign_variable);
|
||||
|
||||
$copyObj->setTasGroupVariable($this->tas_group_variable);
|
||||
|
||||
$copyObj->setTasMiInstanceVariable($this->tas_mi_instance_variable);
|
||||
|
||||
$copyObj->setTasMiCompleteVariable($this->tas_mi_complete_variable);
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract class BaseTaskPeer
|
||||
const CLASS_DEFAULT = 'classes.model.Task';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 41;
|
||||
const NUM_COLUMNS = 42;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
@@ -67,6 +67,9 @@ abstract class BaseTaskPeer
|
||||
/** the column name for the TAS_ASSIGN_VARIABLE field */
|
||||
const TAS_ASSIGN_VARIABLE = 'TASK.TAS_ASSIGN_VARIABLE';
|
||||
|
||||
/** the column name for the TAS_GROUP_VARIABLE field */
|
||||
const TAS_GROUP_VARIABLE = 'TASK.TAS_GROUP_VARIABLE';
|
||||
|
||||
/** the column name for the TAS_MI_INSTANCE_VARIABLE field */
|
||||
const TAS_MI_INSTANCE_VARIABLE = 'TASK.TAS_MI_INSTANCE_VARIABLE';
|
||||
|
||||
@@ -165,10 +168,10 @@ abstract class BaseTaskPeer
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('ProUid', 'TasUid', 'TasType', 'TasDuration', 'TasDelayType', 'TasTemporizer', 'TasTypeDay', 'TasTimeunit', 'TasAlert', 'TasPriorityVariable', 'TasAssignType', 'TasAssignVariable', 'TasMiInstanceVariable', 'TasMiCompleteVariable', 'TasAssignLocation', 'TasAssignLocationAdhoc', 'TasTransferFly', 'TasLastAssigned', 'TasUser', 'TasCanUpload', 'TasViewUpload', 'TasViewAdditionalDocumentation', 'TasCanCancel', 'TasOwnerApp', 'StgUid', 'TasCanPause', 'TasCanSendMessage', 'TasCanDeleteDocs', 'TasSelfService', 'TasStart', 'TasToLastUser', 'TasSendLastEmail', 'TasDerivation', 'TasPosx', 'TasPosy', 'TasWidth', 'TasHeight', 'TasColor', 'TasEvnUid', 'TasBoundary', 'TasDerivationScreenTpl', ),
|
||||
BasePeer::TYPE_COLNAME => array (TaskPeer::PRO_UID, TaskPeer::TAS_UID, TaskPeer::TAS_TYPE, TaskPeer::TAS_DURATION, TaskPeer::TAS_DELAY_TYPE, TaskPeer::TAS_TEMPORIZER, TaskPeer::TAS_TYPE_DAY, TaskPeer::TAS_TIMEUNIT, TaskPeer::TAS_ALERT, TaskPeer::TAS_PRIORITY_VARIABLE, TaskPeer::TAS_ASSIGN_TYPE, TaskPeer::TAS_ASSIGN_VARIABLE, TaskPeer::TAS_MI_INSTANCE_VARIABLE, TaskPeer::TAS_MI_COMPLETE_VARIABLE, TaskPeer::TAS_ASSIGN_LOCATION, TaskPeer::TAS_ASSIGN_LOCATION_ADHOC, TaskPeer::TAS_TRANSFER_FLY, TaskPeer::TAS_LAST_ASSIGNED, TaskPeer::TAS_USER, TaskPeer::TAS_CAN_UPLOAD, TaskPeer::TAS_VIEW_UPLOAD, TaskPeer::TAS_VIEW_ADDITIONAL_DOCUMENTATION, TaskPeer::TAS_CAN_CANCEL, TaskPeer::TAS_OWNER_APP, TaskPeer::STG_UID, TaskPeer::TAS_CAN_PAUSE, TaskPeer::TAS_CAN_SEND_MESSAGE, TaskPeer::TAS_CAN_DELETE_DOCS, TaskPeer::TAS_SELF_SERVICE, TaskPeer::TAS_START, TaskPeer::TAS_TO_LAST_USER, TaskPeer::TAS_SEND_LAST_EMAIL, TaskPeer::TAS_DERIVATION, TaskPeer::TAS_POSX, TaskPeer::TAS_POSY, TaskPeer::TAS_WIDTH, TaskPeer::TAS_HEIGHT, TaskPeer::TAS_COLOR, TaskPeer::TAS_EVN_UID, TaskPeer::TAS_BOUNDARY, TaskPeer::TAS_DERIVATION_SCREEN_TPL, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('PRO_UID', 'TAS_UID', 'TAS_TYPE', 'TAS_DURATION', 'TAS_DELAY_TYPE', 'TAS_TEMPORIZER', 'TAS_TYPE_DAY', 'TAS_TIMEUNIT', 'TAS_ALERT', 'TAS_PRIORITY_VARIABLE', 'TAS_ASSIGN_TYPE', 'TAS_ASSIGN_VARIABLE', 'TAS_MI_INSTANCE_VARIABLE', 'TAS_MI_COMPLETE_VARIABLE', 'TAS_ASSIGN_LOCATION', 'TAS_ASSIGN_LOCATION_ADHOC', 'TAS_TRANSFER_FLY', 'TAS_LAST_ASSIGNED', 'TAS_USER', 'TAS_CAN_UPLOAD', 'TAS_VIEW_UPLOAD', 'TAS_VIEW_ADDITIONAL_DOCUMENTATION', 'TAS_CAN_CANCEL', 'TAS_OWNER_APP', 'STG_UID', 'TAS_CAN_PAUSE', 'TAS_CAN_SEND_MESSAGE', 'TAS_CAN_DELETE_DOCS', 'TAS_SELF_SERVICE', 'TAS_START', 'TAS_TO_LAST_USER', 'TAS_SEND_LAST_EMAIL', 'TAS_DERIVATION', 'TAS_POSX', 'TAS_POSY', 'TAS_WIDTH', 'TAS_HEIGHT', 'TAS_COLOR', 'TAS_EVN_UID', 'TAS_BOUNDARY', 'TAS_DERIVATION_SCREEN_TPL', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, )
|
||||
BasePeer::TYPE_PHPNAME => array ('ProUid', 'TasUid', 'TasType', 'TasDuration', 'TasDelayType', 'TasTemporizer', 'TasTypeDay', 'TasTimeunit', 'TasAlert', 'TasPriorityVariable', 'TasAssignType', 'TasAssignVariable', 'TasGroupVariable', 'TasMiInstanceVariable', 'TasMiCompleteVariable', 'TasAssignLocation', 'TasAssignLocationAdhoc', 'TasTransferFly', 'TasLastAssigned', 'TasUser', 'TasCanUpload', 'TasViewUpload', 'TasViewAdditionalDocumentation', 'TasCanCancel', 'TasOwnerApp', 'StgUid', 'TasCanPause', 'TasCanSendMessage', 'TasCanDeleteDocs', 'TasSelfService', 'TasStart', 'TasToLastUser', 'TasSendLastEmail', 'TasDerivation', 'TasPosx', 'TasPosy', 'TasWidth', 'TasHeight', 'TasColor', 'TasEvnUid', 'TasBoundary', 'TasDerivationScreenTpl', ),
|
||||
BasePeer::TYPE_COLNAME => array (TaskPeer::PRO_UID, TaskPeer::TAS_UID, TaskPeer::TAS_TYPE, TaskPeer::TAS_DURATION, TaskPeer::TAS_DELAY_TYPE, TaskPeer::TAS_TEMPORIZER, TaskPeer::TAS_TYPE_DAY, TaskPeer::TAS_TIMEUNIT, TaskPeer::TAS_ALERT, TaskPeer::TAS_PRIORITY_VARIABLE, TaskPeer::TAS_ASSIGN_TYPE, TaskPeer::TAS_ASSIGN_VARIABLE, TaskPeer::TAS_GROUP_VARIABLE, TaskPeer::TAS_MI_INSTANCE_VARIABLE, TaskPeer::TAS_MI_COMPLETE_VARIABLE, TaskPeer::TAS_ASSIGN_LOCATION, TaskPeer::TAS_ASSIGN_LOCATION_ADHOC, TaskPeer::TAS_TRANSFER_FLY, TaskPeer::TAS_LAST_ASSIGNED, TaskPeer::TAS_USER, TaskPeer::TAS_CAN_UPLOAD, TaskPeer::TAS_VIEW_UPLOAD, TaskPeer::TAS_VIEW_ADDITIONAL_DOCUMENTATION, TaskPeer::TAS_CAN_CANCEL, TaskPeer::TAS_OWNER_APP, TaskPeer::STG_UID, TaskPeer::TAS_CAN_PAUSE, TaskPeer::TAS_CAN_SEND_MESSAGE, TaskPeer::TAS_CAN_DELETE_DOCS, TaskPeer::TAS_SELF_SERVICE, TaskPeer::TAS_START, TaskPeer::TAS_TO_LAST_USER, TaskPeer::TAS_SEND_LAST_EMAIL, TaskPeer::TAS_DERIVATION, TaskPeer::TAS_POSX, TaskPeer::TAS_POSY, TaskPeer::TAS_WIDTH, TaskPeer::TAS_HEIGHT, TaskPeer::TAS_COLOR, TaskPeer::TAS_EVN_UID, TaskPeer::TAS_BOUNDARY, TaskPeer::TAS_DERIVATION_SCREEN_TPL, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('PRO_UID', 'TAS_UID', 'TAS_TYPE', 'TAS_DURATION', 'TAS_DELAY_TYPE', 'TAS_TEMPORIZER', 'TAS_TYPE_DAY', 'TAS_TIMEUNIT', 'TAS_ALERT', 'TAS_PRIORITY_VARIABLE', 'TAS_ASSIGN_TYPE', 'TAS_ASSIGN_VARIABLE', 'TAS_GROUP_VARIABLE', 'TAS_MI_INSTANCE_VARIABLE', 'TAS_MI_COMPLETE_VARIABLE', 'TAS_ASSIGN_LOCATION', 'TAS_ASSIGN_LOCATION_ADHOC', 'TAS_TRANSFER_FLY', 'TAS_LAST_ASSIGNED', 'TAS_USER', 'TAS_CAN_UPLOAD', 'TAS_VIEW_UPLOAD', 'TAS_VIEW_ADDITIONAL_DOCUMENTATION', 'TAS_CAN_CANCEL', 'TAS_OWNER_APP', 'STG_UID', 'TAS_CAN_PAUSE', 'TAS_CAN_SEND_MESSAGE', 'TAS_CAN_DELETE_DOCS', 'TAS_SELF_SERVICE', 'TAS_START', 'TAS_TO_LAST_USER', 'TAS_SEND_LAST_EMAIL', 'TAS_DERIVATION', 'TAS_POSX', 'TAS_POSY', 'TAS_WIDTH', 'TAS_HEIGHT', 'TAS_COLOR', 'TAS_EVN_UID', 'TAS_BOUNDARY', 'TAS_DERIVATION_SCREEN_TPL', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -178,10 +181,10 @@ abstract class BaseTaskPeer
|
||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('ProUid' => 0, 'TasUid' => 1, 'TasType' => 2, 'TasDuration' => 3, 'TasDelayType' => 4, 'TasTemporizer' => 5, 'TasTypeDay' => 6, 'TasTimeunit' => 7, 'TasAlert' => 8, 'TasPriorityVariable' => 9, 'TasAssignType' => 10, 'TasAssignVariable' => 11, 'TasMiInstanceVariable' => 12, 'TasMiCompleteVariable' => 13, 'TasAssignLocation' => 14, 'TasAssignLocationAdhoc' => 15, 'TasTransferFly' => 16, 'TasLastAssigned' => 17, 'TasUser' => 18, 'TasCanUpload' => 19, 'TasViewUpload' => 20, 'TasViewAdditionalDocumentation' => 21, 'TasCanCancel' => 22, 'TasOwnerApp' => 23, 'StgUid' => 24, 'TasCanPause' => 25, 'TasCanSendMessage' => 26, 'TasCanDeleteDocs' => 27, 'TasSelfService' => 28, 'TasStart' => 29, 'TasToLastUser' => 30, 'TasSendLastEmail' => 31, 'TasDerivation' => 32, 'TasPosx' => 33, 'TasPosy' => 34, 'TasWidth' => 35, 'TasHeight' => 36, 'TasColor' => 37, 'TasEvnUid' => 38, 'TasBoundary' => 39, 'TasDerivationScreenTpl' => 40, ),
|
||||
BasePeer::TYPE_COLNAME => array (TaskPeer::PRO_UID => 0, TaskPeer::TAS_UID => 1, TaskPeer::TAS_TYPE => 2, TaskPeer::TAS_DURATION => 3, TaskPeer::TAS_DELAY_TYPE => 4, TaskPeer::TAS_TEMPORIZER => 5, TaskPeer::TAS_TYPE_DAY => 6, TaskPeer::TAS_TIMEUNIT => 7, TaskPeer::TAS_ALERT => 8, TaskPeer::TAS_PRIORITY_VARIABLE => 9, TaskPeer::TAS_ASSIGN_TYPE => 10, TaskPeer::TAS_ASSIGN_VARIABLE => 11, TaskPeer::TAS_MI_INSTANCE_VARIABLE => 12, TaskPeer::TAS_MI_COMPLETE_VARIABLE => 13, TaskPeer::TAS_ASSIGN_LOCATION => 14, TaskPeer::TAS_ASSIGN_LOCATION_ADHOC => 15, TaskPeer::TAS_TRANSFER_FLY => 16, TaskPeer::TAS_LAST_ASSIGNED => 17, TaskPeer::TAS_USER => 18, TaskPeer::TAS_CAN_UPLOAD => 19, TaskPeer::TAS_VIEW_UPLOAD => 20, TaskPeer::TAS_VIEW_ADDITIONAL_DOCUMENTATION => 21, TaskPeer::TAS_CAN_CANCEL => 22, TaskPeer::TAS_OWNER_APP => 23, TaskPeer::STG_UID => 24, TaskPeer::TAS_CAN_PAUSE => 25, TaskPeer::TAS_CAN_SEND_MESSAGE => 26, TaskPeer::TAS_CAN_DELETE_DOCS => 27, TaskPeer::TAS_SELF_SERVICE => 28, TaskPeer::TAS_START => 29, TaskPeer::TAS_TO_LAST_USER => 30, TaskPeer::TAS_SEND_LAST_EMAIL => 31, TaskPeer::TAS_DERIVATION => 32, TaskPeer::TAS_POSX => 33, TaskPeer::TAS_POSY => 34, TaskPeer::TAS_WIDTH => 35, TaskPeer::TAS_HEIGHT => 36, TaskPeer::TAS_COLOR => 37, TaskPeer::TAS_EVN_UID => 38, TaskPeer::TAS_BOUNDARY => 39, TaskPeer::TAS_DERIVATION_SCREEN_TPL => 40, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('PRO_UID' => 0, 'TAS_UID' => 1, 'TAS_TYPE' => 2, 'TAS_DURATION' => 3, 'TAS_DELAY_TYPE' => 4, 'TAS_TEMPORIZER' => 5, 'TAS_TYPE_DAY' => 6, 'TAS_TIMEUNIT' => 7, 'TAS_ALERT' => 8, 'TAS_PRIORITY_VARIABLE' => 9, 'TAS_ASSIGN_TYPE' => 10, 'TAS_ASSIGN_VARIABLE' => 11, 'TAS_MI_INSTANCE_VARIABLE' => 12, 'TAS_MI_COMPLETE_VARIABLE' => 13, 'TAS_ASSIGN_LOCATION' => 14, 'TAS_ASSIGN_LOCATION_ADHOC' => 15, 'TAS_TRANSFER_FLY' => 16, 'TAS_LAST_ASSIGNED' => 17, 'TAS_USER' => 18, 'TAS_CAN_UPLOAD' => 19, 'TAS_VIEW_UPLOAD' => 20, 'TAS_VIEW_ADDITIONAL_DOCUMENTATION' => 21, 'TAS_CAN_CANCEL' => 22, 'TAS_OWNER_APP' => 23, 'STG_UID' => 24, 'TAS_CAN_PAUSE' => 25, 'TAS_CAN_SEND_MESSAGE' => 26, 'TAS_CAN_DELETE_DOCS' => 27, 'TAS_SELF_SERVICE' => 28, 'TAS_START' => 29, 'TAS_TO_LAST_USER' => 30, 'TAS_SEND_LAST_EMAIL' => 31, 'TAS_DERIVATION' => 32, 'TAS_POSX' => 33, 'TAS_POSY' => 34, 'TAS_WIDTH' => 35, 'TAS_HEIGHT' => 36, 'TAS_COLOR' => 37, 'TAS_EVN_UID' => 38, 'TAS_BOUNDARY' => 39, 'TAS_DERIVATION_SCREEN_TPL' => 40, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, )
|
||||
BasePeer::TYPE_PHPNAME => array ('ProUid' => 0, 'TasUid' => 1, 'TasType' => 2, 'TasDuration' => 3, 'TasDelayType' => 4, 'TasTemporizer' => 5, 'TasTypeDay' => 6, 'TasTimeunit' => 7, 'TasAlert' => 8, 'TasPriorityVariable' => 9, 'TasAssignType' => 10, 'TasAssignVariable' => 11, 'TasGroupVariable' => 12, 'TasMiInstanceVariable' => 13, 'TasMiCompleteVariable' => 14, 'TasAssignLocation' => 15, 'TasAssignLocationAdhoc' => 16, 'TasTransferFly' => 17, 'TasLastAssigned' => 18, 'TasUser' => 19, 'TasCanUpload' => 20, 'TasViewUpload' => 21, 'TasViewAdditionalDocumentation' => 22, 'TasCanCancel' => 23, 'TasOwnerApp' => 24, 'StgUid' => 25, 'TasCanPause' => 26, 'TasCanSendMessage' => 27, 'TasCanDeleteDocs' => 28, 'TasSelfService' => 29, 'TasStart' => 30, 'TasToLastUser' => 31, 'TasSendLastEmail' => 32, 'TasDerivation' => 33, 'TasPosx' => 34, 'TasPosy' => 35, 'TasWidth' => 36, 'TasHeight' => 37, 'TasColor' => 38, 'TasEvnUid' => 39, 'TasBoundary' => 40, 'TasDerivationScreenTpl' => 41, ),
|
||||
BasePeer::TYPE_COLNAME => array (TaskPeer::PRO_UID => 0, TaskPeer::TAS_UID => 1, TaskPeer::TAS_TYPE => 2, TaskPeer::TAS_DURATION => 3, TaskPeer::TAS_DELAY_TYPE => 4, TaskPeer::TAS_TEMPORIZER => 5, TaskPeer::TAS_TYPE_DAY => 6, TaskPeer::TAS_TIMEUNIT => 7, TaskPeer::TAS_ALERT => 8, TaskPeer::TAS_PRIORITY_VARIABLE => 9, TaskPeer::TAS_ASSIGN_TYPE => 10, TaskPeer::TAS_ASSIGN_VARIABLE => 11, TaskPeer::TAS_GROUP_VARIABLE => 12, TaskPeer::TAS_MI_INSTANCE_VARIABLE => 13, TaskPeer::TAS_MI_COMPLETE_VARIABLE => 14, TaskPeer::TAS_ASSIGN_LOCATION => 15, TaskPeer::TAS_ASSIGN_LOCATION_ADHOC => 16, TaskPeer::TAS_TRANSFER_FLY => 17, TaskPeer::TAS_LAST_ASSIGNED => 18, TaskPeer::TAS_USER => 19, TaskPeer::TAS_CAN_UPLOAD => 20, TaskPeer::TAS_VIEW_UPLOAD => 21, TaskPeer::TAS_VIEW_ADDITIONAL_DOCUMENTATION => 22, TaskPeer::TAS_CAN_CANCEL => 23, TaskPeer::TAS_OWNER_APP => 24, TaskPeer::STG_UID => 25, TaskPeer::TAS_CAN_PAUSE => 26, TaskPeer::TAS_CAN_SEND_MESSAGE => 27, TaskPeer::TAS_CAN_DELETE_DOCS => 28, TaskPeer::TAS_SELF_SERVICE => 29, TaskPeer::TAS_START => 30, TaskPeer::TAS_TO_LAST_USER => 31, TaskPeer::TAS_SEND_LAST_EMAIL => 32, TaskPeer::TAS_DERIVATION => 33, TaskPeer::TAS_POSX => 34, TaskPeer::TAS_POSY => 35, TaskPeer::TAS_WIDTH => 36, TaskPeer::TAS_HEIGHT => 37, TaskPeer::TAS_COLOR => 38, TaskPeer::TAS_EVN_UID => 39, TaskPeer::TAS_BOUNDARY => 40, TaskPeer::TAS_DERIVATION_SCREEN_TPL => 41, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('PRO_UID' => 0, 'TAS_UID' => 1, 'TAS_TYPE' => 2, 'TAS_DURATION' => 3, 'TAS_DELAY_TYPE' => 4, 'TAS_TEMPORIZER' => 5, 'TAS_TYPE_DAY' => 6, 'TAS_TIMEUNIT' => 7, 'TAS_ALERT' => 8, 'TAS_PRIORITY_VARIABLE' => 9, 'TAS_ASSIGN_TYPE' => 10, 'TAS_ASSIGN_VARIABLE' => 11, 'TAS_GROUP_VARIABLE' => 12, 'TAS_MI_INSTANCE_VARIABLE' => 13, 'TAS_MI_COMPLETE_VARIABLE' => 14, 'TAS_ASSIGN_LOCATION' => 15, 'TAS_ASSIGN_LOCATION_ADHOC' => 16, 'TAS_TRANSFER_FLY' => 17, 'TAS_LAST_ASSIGNED' => 18, 'TAS_USER' => 19, 'TAS_CAN_UPLOAD' => 20, 'TAS_VIEW_UPLOAD' => 21, 'TAS_VIEW_ADDITIONAL_DOCUMENTATION' => 22, 'TAS_CAN_CANCEL' => 23, 'TAS_OWNER_APP' => 24, 'STG_UID' => 25, 'TAS_CAN_PAUSE' => 26, 'TAS_CAN_SEND_MESSAGE' => 27, 'TAS_CAN_DELETE_DOCS' => 28, 'TAS_SELF_SERVICE' => 29, 'TAS_START' => 30, 'TAS_TO_LAST_USER' => 31, 'TAS_SEND_LAST_EMAIL' => 32, 'TAS_DERIVATION' => 33, 'TAS_POSX' => 34, 'TAS_POSY' => 35, 'TAS_WIDTH' => 36, 'TAS_HEIGHT' => 37, 'TAS_COLOR' => 38, 'TAS_EVN_UID' => 39, 'TAS_BOUNDARY' => 40, 'TAS_DERIVATION_SCREEN_TPL' => 41, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -306,6 +309,8 @@ abstract class BaseTaskPeer
|
||||
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_ASSIGN_VARIABLE);
|
||||
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_GROUP_VARIABLE);
|
||||
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_MI_INSTANCE_VARIABLE);
|
||||
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_MI_COMPLETE_VARIABLE);
|
||||
|
||||
@@ -282,6 +282,12 @@ function getFolderChildren($alfrescoServerUrl, $folderId, $user, $pwd) {
|
||||
*
|
||||
*/
|
||||
function uploadDoc($alfrescoServerUrl, $fileSource, $title, $description, $docType, $user, $pwd, $path = '') {
|
||||
if (!(file_exists($fileSource)))
|
||||
{
|
||||
G::SendTemporalMessage('ID_FILE_PLUGIN_NOT_EXISTS', 'error', 'labels', null, null, array('pluginFile' => $fileSource));
|
||||
G::header('Location: '.$_SERVER['HTTP_REFERER']);
|
||||
die;
|
||||
}
|
||||
$filep = fopen($fileSource,"r");
|
||||
$fileLength = filesize($fileSource);
|
||||
$fileContent = fread($filep,$fileLength);
|
||||
|
||||
@@ -1162,6 +1162,7 @@
|
||||
<column name="TAS_PRIORITY_VARIABLE" type="VARCHAR" size="100" required="true" default=""/>
|
||||
<column name="TAS_ASSIGN_TYPE" type="VARCHAR" size="30" required="true" default="BALANCED"/>
|
||||
<column name="TAS_ASSIGN_VARIABLE" type="VARCHAR" size="100" required="true" default="@@SYS_NEXT_USER_TO_BE_ASSIGNED"/>
|
||||
<column name="TAS_GROUP_VARIABLE" type="VARCHAR" size="100" required="false" default="@@SYS_GROUP_TO_BE_ASSIGNED"/>
|
||||
<column name="TAS_MI_INSTANCE_VARIABLE" type="VARCHAR" size="100" required="true" default="@@SYS_VAR_TOTAL_INSTANCE"/>
|
||||
<column name="TAS_MI_COMPLETE_VARIABLE" type="VARCHAR" size="100" required="true" default="@@SYS_VAR_TOTAL_INSTANCES_COMPLETE"/>
|
||||
<column name="TAS_ASSIGN_LOCATION" type="VARCHAR" size="20" required="true" default="FALSE"/>
|
||||
|
||||
@@ -17,7 +17,6 @@ class AppProxy extends HttpProxyController
|
||||
*/
|
||||
function getNotesList($httpData)
|
||||
{
|
||||
require_once ( "classes/model/AppNotes.php" );
|
||||
$appUid = null;
|
||||
|
||||
if (isset($httpData->appUid) && trim($httpData->appUid) != "") {
|
||||
@@ -29,6 +28,22 @@ class AppProxy extends HttpProxyController
|
||||
}
|
||||
}
|
||||
|
||||
G::LoadClass('case');
|
||||
$case = new Cases();
|
||||
|
||||
$proUid = ($httpData->pro == '') ? $_SESSION['PROCESS'] : $httpData->pro;
|
||||
$tasUid = ($httpData->tas == '') ? $_SESSION['TASK'] : $httpData->tas;
|
||||
$usrUid = $_SESSION['USER_LOGGED'];
|
||||
|
||||
$respView = $case->getAllObjectsFrom($proUid, $appUid, $tasUid, $usrUid, 'VIEW');
|
||||
$respBlock = $case->getAllObjectsFrom($proUid, $appUid, $tasUid, $usrUid, 'BLOCK');
|
||||
|
||||
if ($respView['CASES_NOTES'] == 0 && $respBlock['CASES_NOTES'] == 0) {
|
||||
return array('totalCount' => 0, 'notes' => array(), 'noPerms' => 1);
|
||||
}
|
||||
|
||||
require_once ( "classes/model/AppNotes.php" );
|
||||
|
||||
if (!isset($appUid)) {
|
||||
throw new Exception('Can\'t resolve the Apllication ID for this request.');
|
||||
}
|
||||
|
||||
@@ -39,6 +39,10 @@ var saveDataTaskTemporal = function(iForm)
|
||||
{
|
||||
oTaskData.TAS_ASSIGN_TYPE = 'SELF_SERVICE';
|
||||
}
|
||||
if (getField('TAS_ASSIGN_TYPE][SELF_SERVICE_EVALUATE').checked)
|
||||
{
|
||||
oTaskData.TAS_ASSIGN_TYPE = 'SELF_SERVICE_EVALUATE';
|
||||
}
|
||||
if (getField('TAS_ASSIGN_TYPE][REPORT_TO').checked)
|
||||
{
|
||||
oTaskData.TAS_ASSIGN_TYPE = 'REPORT_TO';
|
||||
@@ -65,6 +69,7 @@ var saveDataTaskTemporal = function(iForm)
|
||||
oTaskData.TAS_ASSIGN_TYPE = 'CANCEL_MI';
|
||||
}*/
|
||||
oTaskData.TAS_ASSIGN_VARIABLE = getField('TAS_ASSIGN_VARIABLE').value;
|
||||
oTaskData.TAS_GROUP_VARIABLE = getField('TAS_GROUP_VARIABLE').value;
|
||||
/* this feature is temporarily disabled
|
||||
oTaskData.TAS_MI_INSTANCE_VARIABLE = getField('TAS_MI_INSTANCE_VARIABLE').value;
|
||||
oTaskData.TAS_MI_COMPLETE_VARIABLE = getField('TAS_MI_COMPLETE_VARIABLE').value;*/
|
||||
|
||||
@@ -124,14 +124,25 @@ class Service_Rest_RestTool
|
||||
$this->dbInfo[$table['@name']]['pKeys'] = array();
|
||||
$this->dbInfo[$table['@name']]['columns'] = array();
|
||||
$this->dbInfo[$table['@name']]['required_columns'] = array();
|
||||
//Adding data types
|
||||
$this->dbInfo[$table['@name']]['type']['name'] = array();
|
||||
$this->dbInfo[$table['@name']]['type']['Length'] = array();
|
||||
|
||||
foreach ($table['column'] as $column) {
|
||||
$this->dbInfo[$table['@name']]['columns'][] = $column['@name'];
|
||||
|
||||
$this->dbInfo[$table['@name']]['type']['name'][] = $column['@type'];
|
||||
//adding size to typeLength if exists
|
||||
if (array_key_exists('@size', $column) && self::cast($column['@size'])) {
|
||||
$this->dbInfo[$table['@name']]['type']['Length'][] = $column['@size'];
|
||||
}
|
||||
else{
|
||||
$this->dbInfo[$table['@name']]['type']['Length'][] = '0';
|
||||
}
|
||||
//adding name to pkeys if exists primary key exists
|
||||
if (array_key_exists('@primaryKey', $column) && self::cast($column['@primaryKey'])) {
|
||||
$this->dbInfo[$table['@name']]['pKeys'][] = $column['@name'];
|
||||
}
|
||||
|
||||
//adding name to requiered_columns if required field exists
|
||||
if (array_key_exists('@required', $column) && self::cast($column['@required'])) {
|
||||
$this->dbInfo[$table['@name']]['required_columns'][] = $column['@name'];
|
||||
}
|
||||
@@ -260,13 +271,27 @@ EOT;
|
||||
)
|
||||
));
|
||||
|
||||
//new feature adding columns types as commentary.
|
||||
$infoExtra = array();
|
||||
foreach ($this->dbInfo as $tablename => $columns){
|
||||
$maxArray = count($columns['columns']);
|
||||
for($ptr = 0; $ptr < $maxArray; $ptr++){
|
||||
$columnName = $columns['columns'][$ptr];
|
||||
$type = $columns['type'];
|
||||
$typeName = $type['name'][$ptr];
|
||||
$typelength = $type['Length'][$ptr];
|
||||
$infoExtra[$tablename][] = "Column: " . $columnName . " of type ". $typeName . (($typelength != '0')?("[" . $typelength . "]"):"");
|
||||
}
|
||||
}
|
||||
|
||||
$c = 0;
|
||||
//foreach ($this->config['_tables'] as $table => $conf) {
|
||||
foreach ($this->config['_tables'] as $table => $conf) {
|
||||
$classname = self::camelize($table, 'class');
|
||||
$allowedMethods = explode(' ', $conf['ALLOW_METHODS']);
|
||||
$methods = '';
|
||||
|
||||
|
||||
// Getting data for every method.
|
||||
foreach ($allowedMethods as $method) {
|
||||
// validation for a valid method
|
||||
if (! in_array($method, array('GET', 'POST', 'PUT', 'DELETE'))) {
|
||||
@@ -368,7 +393,9 @@ EOT;
|
||||
|
||||
$classContent = Haanga::Load('class.tpl', array(
|
||||
'classname' => $classname,
|
||||
'methods' => $methods
|
||||
'type' => $infoExtra[$table],
|
||||
'tablename' => $table,
|
||||
'methods' => $methods
|
||||
), true);
|
||||
|
||||
//echo "File #$c - $classname.php saved!\n";
|
||||
|
||||
@@ -2,5 +2,12 @@
|
||||
|
||||
class Services_Rest_{{ classname }}
|
||||
{
|
||||
/**
|
||||
* Structure of table '{{ tablename }}'
|
||||
*
|
||||
{% for columnType in type %}* {{columnType}}
|
||||
{% endfor %}*
|
||||
*/
|
||||
|
||||
{{ methods | safe }}
|
||||
}
|
||||
|
||||
@@ -764,19 +764,55 @@ function moveAction()
|
||||
{
|
||||
copyMoveAction("move");
|
||||
}
|
||||
|
||||
function findChilds($uidFolder, $path, $arrayPath) {
|
||||
$Criteria = new Criteria ();
|
||||
$Criteria->addSelectColumn ( AppFolderPeer::FOLDER_UID );
|
||||
$Criteria->addSelectColumn ( AppFolderPeer::FOLDER_PARENT_UID );
|
||||
$Criteria->addSelectColumn ( AppFolderPeer::FOLDER_NAME );
|
||||
$Criteria->addSelectColumn ( AppFolderPeer::FOLDER_CREATE_DATE );
|
||||
$Criteria->addSelectColumn ( AppFolderPeer::FOLDER_UPDATE_DATE );
|
||||
|
||||
$Criteria->add(AppFolderPeer::FOLDER_PARENT_UID, $uidFolder);
|
||||
$Criteria->addAscendingOrderByColumn(AppFolderPeer::FOLDER_NAME);
|
||||
|
||||
$rs = appFolderPeer::doSelectRS ( $Criteria );
|
||||
$rs->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
||||
|
||||
$folderResult = array ();
|
||||
$appFoder = new AppFolder ();
|
||||
while ($rs->next()) {
|
||||
$row = $rs->getRow();
|
||||
$path = ($uidFolder != '/')? $path : '';
|
||||
$path = $path."/".$row['FOLDER_NAME'];
|
||||
$arrayPath[] = array($row['FOLDER_UID'],$path);
|
||||
$arrayPath = findChilds($row['FOLDER_UID'], $path, $arrayPath);
|
||||
}
|
||||
return $arrayPath;
|
||||
}
|
||||
function copyMoveAction($type)
|
||||
{
|
||||
require_once ("classes/model/AppFolder.php");
|
||||
$oPMFolder = new AppFolder ();
|
||||
|
||||
$dir=$_REQUEST['dir'];
|
||||
$paths = array();
|
||||
$folderResult = findChilds('/', '', $paths);
|
||||
$withCombo = 30;
|
||||
foreach ($folderResult as $key => $value) {
|
||||
$count = strlen($value[1]);
|
||||
$withCombo = ($count>$withCombo) ? $count : $withCombo;
|
||||
}
|
||||
$root = array("/","/");
|
||||
array_unshift ($folderResult,$root);
|
||||
|
||||
$dirCompletePath=$oPMFolder->getFolderStructure($dir);
|
||||
$copyDialog["xtype"]="form";
|
||||
$copyDialog["id"]="simpleform";
|
||||
$copyDialog["labelWidth"]=125;
|
||||
$copyDialog["width"]=340;
|
||||
$copyDialog["url"]="URL_SCRIPT";
|
||||
$copyDialog["xtype"] = "form";
|
||||
$copyDialog["id"] = "simpleform";
|
||||
$copyDialog["labelWidth"] = 80;
|
||||
$copyDialog["width"] = 500;
|
||||
$copyDialog["modal"] = true;
|
||||
$copyDialog["url"] = "URL_SCRIPT";
|
||||
if ($type=="copy") {
|
||||
$copyDialog["dialogtitle"]= "Copy";
|
||||
} else {
|
||||
@@ -787,19 +823,28 @@ function copyMoveAction($type)
|
||||
$copyDialog["items"]=array();
|
||||
|
||||
$itemField=array();
|
||||
$itemField["xtype"]="textfield";
|
||||
$itemField["fieldLabel"]="Destination";
|
||||
$itemField["name"]="new_dir_label";
|
||||
$itemField["value"]=$dirCompletePath['PATH'];
|
||||
$itemField["width"]=175;
|
||||
$itemField["xtype"] = "combo";
|
||||
$itemField["hiddenName"] = "new_dir";
|
||||
$itemField["id"] = "new_dir_label";
|
||||
$itemField["name"] = "new_dir_label";
|
||||
$itemField["mode"] = "local";
|
||||
$itemField["triggerAction"] = "all";
|
||||
$itemField["store"] = $folderResult;
|
||||
$itemField["valueField"] = "FOLDER_UID";
|
||||
$itemField["displayField"] = "FOLDER_NAME";
|
||||
$itemField["selectOnFocus"] = true;
|
||||
$itemField["tpl"] = '<tpl for="."><div ext:qtip="{field2}" class="x-combo-list-item">{field2}</div></tpl>';
|
||||
$itemField["fieldLabel"] = "Destination";
|
||||
$itemField["emptyText"] = "Select a directory...";
|
||||
$itemField["width"] = 390;
|
||||
$itemField["allowBlank"]=false;
|
||||
$copyDialog["items"][]=$itemField;
|
||||
|
||||
$itemField=array();
|
||||
$itemField["xtype"]="hidden";
|
||||
$itemField["fieldLabel"]="Destination";
|
||||
$itemField["name"]="new_dir";
|
||||
$itemField["value"]="$dirCompletePath";
|
||||
$itemField["fieldLabel"]="copyMove";
|
||||
$itemField["name"]="copyMove";
|
||||
$itemField["value"]="all";
|
||||
$itemField["width"]=175;
|
||||
$itemField["allowBlank"]=false;
|
||||
$copyDialog["items"][]=$itemField;
|
||||
@@ -813,47 +858,58 @@ function copyMoveAction($type)
|
||||
$itemButton["text"]= "Move";
|
||||
}
|
||||
$itemButton["handler"]="copyDialogCreateButtonFunction";
|
||||
$itemButton["id"]="buttonCopy";
|
||||
$functionsToReplace["copyDialogCreateButtonFunction"]="function() {
|
||||
form = Ext.getCmp('simpleform').getForm();
|
||||
statusBarMessage('Please wait...', true, true);
|
||||
var requestParams = getRequestParams();
|
||||
requestParams.confirm = 'true';
|
||||
requestParams.action = '".$type."Execute';
|
||||
form.submit({
|
||||
//reset: true,
|
||||
reset: false,
|
||||
success: function(form, action) {
|
||||
form = Ext.getCmp('simpleform').getForm();
|
||||
var requestParams = getRequestParams();
|
||||
requestParams.confirm = 'true';
|
||||
if (Ext.getCmp('new_dir_label').getValue() == '') {
|
||||
statusBarMessage('Select a Directory', false, false);
|
||||
return false;
|
||||
}
|
||||
requestParams.new_dir = Ext.getCmp('new_dir_label').getValue()
|
||||
statusBarMessage('Please wait...', true, true);
|
||||
Ext.getCmp('new_dir_label').disable();
|
||||
Ext.getCmp('buttonCopy').disable();
|
||||
Ext.getCmp('buttonCancel').disable();
|
||||
requestParams.action = '".$type."Execute';
|
||||
form.submit({
|
||||
reset: false,
|
||||
success: function(form, action) {
|
||||
if(action.result.success){
|
||||
if(action.result.success=='success'){
|
||||
statusBarMessage(action.result.message, false, true);
|
||||
try{
|
||||
dirTree.getSelectionModel().getSelectedNode().reload();
|
||||
} catch(e) {}
|
||||
datastore.reload();
|
||||
Ext.getCmp('dialog').destroy();
|
||||
if(action.result.success=='success'){
|
||||
statusBarMessage(action.result.message, false, true);
|
||||
var node = dirTree.getNodeById('root');
|
||||
node.select();
|
||||
datastore.directory = 'root';
|
||||
datastore.reload();
|
||||
dirTree.getRootNode().reload();
|
||||
requestParams.dir = 'root';
|
||||
Ext.getCmp('dialog').destroy();
|
||||
}else{
|
||||
statusBarMessage(action.result.message, false, false);
|
||||
statusBarMessage(action.result.message, false, false);
|
||||
}
|
||||
}else{
|
||||
}else{
|
||||
if(!action.result) return;
|
||||
Ext.MessageBox.alert('Error!', action.result.error);
|
||||
statusBarMessage(action.result.error, false, false);
|
||||
}
|
||||
},
|
||||
failure: function(form, action) {
|
||||
if(!action.result) return;
|
||||
Ext.MessageBox.alert('Error!', action.result.error);
|
||||
statusBarMessage(action.result.error, false, false);
|
||||
},
|
||||
scope: form,
|
||||
// add some vars to the request, similar to hidden fields
|
||||
params: requestParams
|
||||
});
|
||||
}";
|
||||
}
|
||||
},
|
||||
failure: function(form, action) {
|
||||
if(!action.result) return;
|
||||
Ext.MessageBox.alert('Error!', action.result.error);
|
||||
statusBarMessage(action.result.error, false, false);
|
||||
},
|
||||
scope: form,
|
||||
// add some vars to the request, similar to hidden fields
|
||||
params: requestParams
|
||||
});
|
||||
}";
|
||||
$copyDialog["buttons"][]=$itemButton;
|
||||
|
||||
$itemButton=array();
|
||||
$itemButton["text"]="Cancel";
|
||||
$itemButton["id"]="buttonCancel";
|
||||
$itemButton["handler"]= "copyDialogCancelButtonFunction";
|
||||
$functionsToReplace["copyDialogCancelButtonFunction"]="function() { Ext.getCmp('dialog').destroy(); }";
|
||||
$copyDialog["buttons"][]=$itemButton;
|
||||
@@ -924,6 +980,54 @@ function overwriteFile ($node, $fileName) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function copyMoveExecuteTree($uidFolder, $newUidFolder)
|
||||
{
|
||||
require_once ("classes/model/AppDocument.php");
|
||||
require_once ('classes/model/AppFolder.php');
|
||||
|
||||
$appFoder = new AppFolder ();
|
||||
$folderContent = $appFoder->getFolderContent($uidFolder);
|
||||
$folderOrigin = $appFoder->getFolderStructure($uidFolder);
|
||||
$FolderParentUid = trim($newUidFolder);//$form['FOLDER_PARENT_UID'];
|
||||
$FolderName = $folderOrigin[$uidFolder]['NAME'];
|
||||
$newFolderContent = $appFoder->createFolder ($FolderName, $FolderParentUid, "new");
|
||||
|
||||
$appDocument = new AppDocument();
|
||||
if ($_REQUEST['action'] == 'moveExecute') {
|
||||
$appFoder->remove($uidFolder,$folderOrigin[$uidFolder]['PARENT']);
|
||||
}
|
||||
$action = $_REQUEST['action'];
|
||||
foreach ($folderContent['documents'] as $keys => $value) {
|
||||
$docInfo = $appDocument->load($value['APP_DOC_UID'],$value['DOC_VERSION']);
|
||||
$docInfo['FOLDER_UID'] = $newFolderContent['folderUID'];
|
||||
$docInfo['APP_DOC_CREATE_DATE'] = date('Y-m-d H:i:s');
|
||||
$docInfo['APP_DOC_STATUS'] = 'ACTIVE';
|
||||
if ($action == 'copyExecute') {
|
||||
unset($docInfo['APP_DOC_UID']);
|
||||
$docUid = $appDocument->create($docInfo);
|
||||
} else {
|
||||
$appDocument->update($docInfo);
|
||||
}
|
||||
}
|
||||
return $newFolderContent['folderUID'];
|
||||
}
|
||||
|
||||
function checkTree ($uidOriginFolder, $uidNewFolder)
|
||||
{
|
||||
require_once ('classes/model/AppFolder.php');
|
||||
$appFoder = new AppFolder ();
|
||||
$newFoldercontent = copyMoveExecuteTree($uidOriginFolder, $uidNewFolder);
|
||||
$listfolder = $appFoder->getFolderList($uidOriginFolder);
|
||||
if (count($listfolder)>0) {
|
||||
foreach ($listfolder['folders'] as $key => $value) {
|
||||
copyMoveExecuteTree($value['FOLDER_UID'],$newFoldercontent);
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function uploadExternalDocument()
|
||||
{
|
||||
$response['action']=$_POST['action']. " - ".$_POST['option'];
|
||||
@@ -980,19 +1084,30 @@ function uploadExternalDocument()
|
||||
}
|
||||
} elseif (isset($_POST['selitems'])) {
|
||||
$response="";
|
||||
$response['msg']="correct reload";
|
||||
$response['msg']= "correct reload";
|
||||
$response['success']=true;
|
||||
require_once ("classes/model/AppDocument.php");
|
||||
require_once ('classes/model/AppFolder.php');
|
||||
$oAppDocument = new AppDocument();
|
||||
foreach ($_POST['selitems'] as $docId) {
|
||||
$arrayDocId = explode ('_',$docId);
|
||||
//print "<b>$docId</b>";
|
||||
$docInfo=$oAppDocument->load($arrayDocId[0]);
|
||||
$docInfo['FOLDER_UID'] = $_POST['new_dir'];
|
||||
$docInfo['APP_DOC_CREATE_DATE'] = date('Y-m-d H:i:s');
|
||||
$oAppDocument->update($docInfo);
|
||||
//G::pr($docInfo);
|
||||
if (isset($_REQUEST['option']) && isset($_REQUEST['copyMove'])) {
|
||||
if ($_REQUEST['option'] == 'directory' && $_REQUEST['copyMove'] == 'all') {
|
||||
$response['action'] = $_POST['action']. " - ".$_POST['option'];
|
||||
$response['error'] = "Complete";
|
||||
$response['message']= str_replace("Execute", "", $_POST['action']). " ". "Complete";
|
||||
$response['success']= 'success';
|
||||
$response['node'] = '';
|
||||
$_POST ['node'] = "";
|
||||
$newFolderUid = checkTree($_REQUEST['dir'], $_REQUEST['new_dir']);
|
||||
}
|
||||
$_POST['selitems'] = array();
|
||||
} else {
|
||||
require_once ("classes/model/AppDocument.php");
|
||||
$oAppDocument = new AppDocument();
|
||||
foreach ($_POST['selitems'] as $docId) {
|
||||
$arrayDocId = explode ('_',$docId);
|
||||
$docInfo=$oAppDocument->load($arrayDocId[0]);
|
||||
$docInfo['FOLDER_UID'] = $_POST['new_dir'];
|
||||
$docInfo['APP_DOC_CREATE_DATE'] = date('Y-m-d H:i:s');
|
||||
$oAppDocument->update($docInfo);
|
||||
//G::pr($docInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
//G::pr($quequeUpload);
|
||||
|
||||
@@ -640,6 +640,8 @@ switch (($_POST['action'])?$_POST['action']:$_REQUEST['action']) {
|
||||
$result = $rs->getRow();
|
||||
$result["FILEDOCEXIST"] = ($result["FILEDOC"]);
|
||||
$result["FILEPDFEXIST"] = ($result["FILEPDF"]);
|
||||
$result["DELETE_FILE"] = (isset($result['ID_DELETE']) && $result['ID_DELETE'] == 'Delete') ? true : false;
|
||||
|
||||
$aProcesses[] = $result;
|
||||
|
||||
$rs->next();
|
||||
|
||||
@@ -142,10 +142,11 @@ try {
|
||||
$_SESSION['CURRENT_TASK'] = $aFields['TAS_UID'];
|
||||
|
||||
//if the task is in the valid selfservice tasks for this user, then catch the case, else just view the resume
|
||||
if( $oCase->isSelfService($_SESSION['USER_LOGGED'], $aFields['TAS_UID']) ) {
|
||||
if( $oCase->isSelfService($_SESSION['USER_LOGGED'], $aFields['TAS_UID'], $sAppUid) ) {
|
||||
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_CatchSelfService.php');
|
||||
} else
|
||||
} else {
|
||||
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -308,6 +308,11 @@
|
||||
<xs:element name="value" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="variableListNameStruct">
|
||||
<xs:sequence>
|
||||
<xs:element name="name" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:element name="variableListRequest">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
@@ -325,6 +330,16 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="getVariablesNamesResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="status_code" type="xs:integer"/>
|
||||
<xs:element name="message" type="xs:string"/>
|
||||
<xs:element name="timestamp" type="xs:string"/>
|
||||
<xs:element name="variables" minOccurs="0" maxOccurs="unbounded" type="xs0:variableListNameStruct"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="getVariablesRequest">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
@@ -334,6 +349,14 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="getVariablesNamesRequest">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="sessionId" type="xs:string"/>
|
||||
<xs:element name="caseId" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="newCaseRequest">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
@@ -920,6 +943,12 @@
|
||||
<message name="getVariablesResponse">
|
||||
<part name="parameters" element="xs0:getVariablesResponse"/>
|
||||
</message>
|
||||
<message name="getVariablesNamesRequest">
|
||||
<part name="parameters" element="xs0:getVariablesNamesRequest"/>
|
||||
</message>
|
||||
<message name="getVariablesNamesResponse">
|
||||
<part name="parameters" element="xs0:getVariablesNamesResponse"/>
|
||||
</message>
|
||||
<message name="sendMessageRequest">
|
||||
<part name="parameters" element="xs0:sendMessageRequest"/>
|
||||
</message>
|
||||
@@ -1102,6 +1131,10 @@
|
||||
<input message="xs0:getVariablesRequest"/>
|
||||
<output message="xs0:getVariablesResponse"/>
|
||||
</operation>
|
||||
<operation name="getVariablesNames">
|
||||
<input message="xs0:getVariablesNamesRequest"/>
|
||||
<output message="xs0:getVariablesNamesResponse"/>
|
||||
</operation>
|
||||
<operation name="sendMessage">
|
||||
<input message="xs0:sendMessageRequest"/>
|
||||
<output message="xs0:pmResponse"/>
|
||||
@@ -1363,6 +1396,15 @@
|
||||
<soap12:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="getVariablesNames">
|
||||
<soap12:operation soapAction="urn:getVariablesNames" soapActionRequired="true" style="document"/>
|
||||
<input>
|
||||
<soap12:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap12:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="sendMessage">
|
||||
<soap12:operation soapAction="urn:sendMessage" soapActionRequired="true" style="document"/>
|
||||
<input>
|
||||
|
||||
@@ -516,6 +516,28 @@ function GetVariables($params)
|
||||
return $res;
|
||||
}
|
||||
|
||||
function GetVariablesNames($params)
|
||||
{
|
||||
|
||||
$vsResult = isValidSession($params->sessionId);
|
||||
|
||||
if ($vsResult->status_code !== 0) {
|
||||
return $vsResult;
|
||||
}
|
||||
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
$result = new wsGetVariableResponse(2, "You do not have privileges", null);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
$ws = new wsBase();
|
||||
|
||||
$res = $ws->getVariablesNames($params->caseId);
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
function DerivateCase($params)
|
||||
{
|
||||
$oSession = new Sessions();
|
||||
@@ -1169,6 +1191,7 @@ $server->addFunction("removeDocument");
|
||||
$server->addFunction("SendMessage");
|
||||
$server->addFunction("SendVariables");
|
||||
$server->addFunction("GetVariables");
|
||||
$server->addFunction("GetVariablesNames");
|
||||
$server->addFunction("DerivateCase");
|
||||
$server->addFunction("RouteCase");
|
||||
$server->addFunction("executeTrigger");
|
||||
|
||||
@@ -73,7 +73,7 @@ try {
|
||||
|
||||
G::LoadClass("wsTools");
|
||||
$renegerateContent = new workspaceTools(SYS_SYS);
|
||||
$renegerateContent->upgradeContent();
|
||||
$messs = $renegerateContent->upgradeContent();
|
||||
|
||||
$result->msg = G::LoadTranslation('IMPORT_LANGUAGE_SUCCESS') . "\n";
|
||||
$result->msg .= "PO File num. records: " . $importResults->recordsCount . "\n";
|
||||
@@ -83,7 +83,7 @@ try {
|
||||
if( $importResults->errMsg != '' ){
|
||||
$result->msg .= "Errors registered: \n" . $importResults->errMsg . "\n";
|
||||
}
|
||||
|
||||
|
||||
//$result->msg = htmlentities($result->msg);
|
||||
$result->success = true;
|
||||
|
||||
|
||||
@@ -64,6 +64,13 @@ try {
|
||||
unset($aData['TAS_DEF_MESSAGE_TEMPLATE']);
|
||||
}
|
||||
|
||||
//Validating TAS_ASSIGN_VARIABLE value
|
||||
if ($aData['TAS_ASSIGN_TYPE'] == 'SELF_SERVICE_EVALUATE') {
|
||||
$aData['TAS_ASSIGN_TYPE'] = 'SELF_SERVICE';
|
||||
} else {
|
||||
$aData['TAS_GROUP_VARIABLE'] = '';
|
||||
}
|
||||
|
||||
$result = $oTask->update($aData);
|
||||
|
||||
$response["status"] = "OK";
|
||||
|
||||
@@ -39,6 +39,7 @@ class Services_Rest_AppDocument
|
||||
$criteria->addSelectColumn(AppDocumentPeer::APP_DOC_TAGS);
|
||||
$criteria->addSelectColumn(AppDocumentPeer::APP_DOC_STATUS);
|
||||
$criteria->addSelectColumn(AppDocumentPeer::APP_DOC_STATUS_DATE);
|
||||
$criteria->addSelectColumn(AppDocumentPeer::APP_DOC_FIELDNAME);
|
||||
|
||||
$dataset = AppEventPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
@@ -61,5 +61,77 @@ class Services_Rest_AppOwner
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid, $ownUid, $usrUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function post($appUid, $ownUid, $usrUid)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new AppOwner();
|
||||
|
||||
$obj->setAppUid($appUid);
|
||||
$obj->setOwnUid($ownUid);
|
||||
$obj->setUsrUid($usrUid);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid, $ownUid, $usrUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function put($appUid, $ownUid, $usrUid)
|
||||
{
|
||||
try {
|
||||
$obj = AppOwnerPeer::retrieveByPK($appUid, $ownUid, $usrUid);
|
||||
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid, $ownUid, $usrUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function delete($appUid, $ownUid, $usrUid)
|
||||
{
|
||||
$conn = Propel::getConnection(AppOwnerPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = AppOwnerPeer::retrieveByPK($appUid, $ownUid, $usrUid);
|
||||
if (! is_object($obj)) {
|
||||
throw new RestException(412, 'Record does not exist.');
|
||||
}
|
||||
$obj->delete();
|
||||
|
||||
$conn->commit();
|
||||
} catch (Exception $e) {
|
||||
$conn->rollback();
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -63,5 +63,82 @@ class Services_Rest_AppThread
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid, $appThreadIndex Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function post($appUid, $appThreadIndex, $appThreadParent, $appThreadStatus, $delIndex)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new AppThread();
|
||||
|
||||
$obj->setAppUid($appUid);
|
||||
$obj->setAppThreadIndex($appThreadIndex);
|
||||
$obj->setAppThreadParent($appThreadParent);
|
||||
$obj->setAppThreadStatus($appThreadStatus);
|
||||
$obj->setDelIndex($delIndex);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid, $appThreadIndex Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function put($appUid, $appThreadIndex, $appThreadParent, $appThreadStatus, $delIndex)
|
||||
{
|
||||
try {
|
||||
$obj = AppThreadPeer::retrieveByPK($appUid, $appThreadIndex);
|
||||
|
||||
$obj->setAppThreadParent($appThreadParent);
|
||||
$obj->setAppThreadStatus($appThreadStatus);
|
||||
$obj->setDelIndex($delIndex);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid, $appThreadIndex Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function delete($appUid, $appThreadIndex)
|
||||
{
|
||||
$conn = Propel::getConnection(AppThreadPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = AppThreadPeer::retrieveByPK($appUid, $appThreadIndex);
|
||||
if (! is_object($obj)) {
|
||||
throw new RestException(412, 'Record does not exist.');
|
||||
}
|
||||
$obj->delete();
|
||||
|
||||
$conn->commit();
|
||||
} catch (Exception $e) {
|
||||
$conn->rollback();
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -74,5 +74,105 @@ class Services_Rest_Application
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function post($appUid, $appNumber, $appParent, $appStatus, $proUid, $appProcStatus, $appProcCode, $appParallel, $appInitUser, $appCurUser, $appCreateDate, $appInitDate, $appFinishDate, $appUpdateDate, $appData, $appPin)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Application();
|
||||
|
||||
$obj->setAppUid($appUid);
|
||||
$obj->setAppNumber($appNumber);
|
||||
$obj->setAppParent($appParent);
|
||||
$obj->setAppStatus($appStatus);
|
||||
$obj->setProUid($proUid);
|
||||
$obj->setAppProcStatus($appProcStatus);
|
||||
$obj->setAppProcCode($appProcCode);
|
||||
$obj->setAppParallel($appParallel);
|
||||
$obj->setAppInitUser($appInitUser);
|
||||
$obj->setAppCurUser($appCurUser);
|
||||
$obj->setAppCreateDate($appCreateDate);
|
||||
$obj->setAppInitDate($appInitDate);
|
||||
$obj->setAppFinishDate($appFinishDate);
|
||||
$obj->setAppUpdateDate($appUpdateDate);
|
||||
$obj->setAppData($appData);
|
||||
$obj->setAppPin($appPin);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function put($appUid, $appNumber, $appParent, $appStatus, $proUid, $appProcStatus, $appProcCode, $appParallel, $appInitUser, $appCurUser, $appCreateDate, $appInitDate, $appFinishDate, $appUpdateDate, $appData, $appPin)
|
||||
{
|
||||
try {
|
||||
$obj = ApplicationPeer::retrieveByPK($appUid);
|
||||
|
||||
$obj->setAppNumber($appNumber);
|
||||
$obj->setAppParent($appParent);
|
||||
$obj->setAppStatus($appStatus);
|
||||
$obj->setProUid($proUid);
|
||||
$obj->setAppProcStatus($appProcStatus);
|
||||
$obj->setAppProcCode($appProcCode);
|
||||
$obj->setAppParallel($appParallel);
|
||||
$obj->setAppInitUser($appInitUser);
|
||||
$obj->setAppCurUser($appCurUser);
|
||||
$obj->setAppCreateDate($appCreateDate);
|
||||
$obj->setAppInitDate($appInitDate);
|
||||
$obj->setAppFinishDate($appFinishDate);
|
||||
$obj->setAppUpdateDate($appUpdateDate);
|
||||
$obj->setAppData($appData);
|
||||
$obj->setAppPin($appPin);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $appUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function delete($appUid)
|
||||
{
|
||||
$conn = Propel::getConnection(ApplicationPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = ApplicationPeer::retrieveByPK($appUid);
|
||||
if (! is_object($obj)) {
|
||||
throw new RestException(412, 'Record does not exist.');
|
||||
}
|
||||
$obj->delete();
|
||||
|
||||
$conn->commit();
|
||||
} catch (Exception $e) {
|
||||
$conn->rollback();
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -65,5 +65,87 @@ class Services_Rest_CalendarDefinition
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $calendarUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function post($calendarUid, $calendarName, $calendarCreateDate, $calendarUpdateDate, $calendarWorkDays, $calendarDescription, $calendarStatus)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new CalendarDefinition();
|
||||
|
||||
$obj->setCalendarUid($calendarUid);
|
||||
$obj->setCalendarName($calendarName);
|
||||
$obj->setCalendarCreateDate($calendarCreateDate);
|
||||
$obj->setCalendarUpdateDate($calendarUpdateDate);
|
||||
$obj->setCalendarWorkDays($calendarWorkDays);
|
||||
$obj->setCalendarDescription($calendarDescription);
|
||||
$obj->setCalendarStatus($calendarStatus);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $calendarUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function put($calendarUid, $calendarName, $calendarCreateDate, $calendarUpdateDate, $calendarWorkDays, $calendarDescription, $calendarStatus)
|
||||
{
|
||||
try {
|
||||
$obj = CalendarDefinitionPeer::retrieveByPK($calendarUid);
|
||||
|
||||
$obj->setCalendarName($calendarName);
|
||||
$obj->setCalendarCreateDate($calendarCreateDate);
|
||||
$obj->setCalendarUpdateDate($calendarUpdateDate);
|
||||
$obj->setCalendarWorkDays($calendarWorkDays);
|
||||
$obj->setCalendarDescription($calendarDescription);
|
||||
$obj->setCalendarStatus($calendarStatus);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $calendarUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function delete($calendarUid)
|
||||
{
|
||||
$conn = Propel::getConnection(CalendarDefinitionPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = CalendarDefinitionPeer::retrieveByPK($calendarUid);
|
||||
if (! is_object($obj)) {
|
||||
throw new RestException(412, 'Record does not exist.');
|
||||
}
|
||||
$obj->delete();
|
||||
|
||||
$conn->commit();
|
||||
} catch (Exception $e) {
|
||||
$conn->rollback();
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -63,5 +63,80 @@ class Services_Rest_Content
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $conCategory, $conParent, $conId, $conLang Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function post($conCategory, $conParent, $conId, $conLang, $conValue)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Content();
|
||||
|
||||
$obj->setConCategory($conCategory);
|
||||
$obj->setConParent($conParent);
|
||||
$obj->setConId($conId);
|
||||
$obj->setConLang($conLang);
|
||||
$obj->setConValue($conValue);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $conCategory, $conParent, $conId, $conLang Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function put($conCategory, $conParent, $conId, $conLang, $conValue)
|
||||
{
|
||||
try {
|
||||
$obj = ContentPeer::retrieveByPK($conCategory, $conParent, $conId, $conLang);
|
||||
|
||||
$obj->setConValue($conValue);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $conCategory, $conParent, $conId, $conLang Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function delete($conCategory, $conParent, $conId, $conLang)
|
||||
{
|
||||
$conn = Propel::getConnection(ContentPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = ContentPeer::retrieveByPK($conCategory, $conParent, $conId, $conLang);
|
||||
if (! is_object($obj)) {
|
||||
throw new RestException(412, 'Record does not exist.');
|
||||
}
|
||||
$obj->delete();
|
||||
|
||||
$conn->commit();
|
||||
} catch (Exception $e) {
|
||||
$conn->rollback();
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -61,5 +61,79 @@ class Services_Rest_Holiday
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $hldUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function post($hldUid, $hldDate, $hldDescription)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Holiday();
|
||||
|
||||
$obj->setHldUid($hldUid);
|
||||
$obj->setHldDate($hldDate);
|
||||
$obj->setHldDescription($hldDescription);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $hldUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function put($hldUid, $hldDate, $hldDescription)
|
||||
{
|
||||
try {
|
||||
$obj = HolidayPeer::retrieveByPK($hldUid);
|
||||
|
||||
$obj->setHldDate($hldDate);
|
||||
$obj->setHldDescription($hldDescription);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $hldUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function delete($hldUid)
|
||||
{
|
||||
$conn = Propel::getConnection(HolidayPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = HolidayPeer::retrieveByPK($hldUid);
|
||||
if (! is_object($obj)) {
|
||||
throw new RestException(412, 'Record does not exist.');
|
||||
}
|
||||
$obj->delete();
|
||||
|
||||
$conn->commit();
|
||||
} catch (Exception $e) {
|
||||
$conn->rollback();
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -83,5 +83,123 @@ class Services_Rest_Process
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $proUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function post($proUid, $proParent, $proTime, $proTimeunit, $proStatus, $proTypeDay, $proType, $proAssignment, $proShowMap, $proShowMessage, $proShowDelegate, $proShowDynaform, $proCategory, $proSubCategory, $proIndustry, $proUpdateDate, $proCreateDate, $proCreateUser, $proHeight, $proWidth, $proTitleX, $proTitleY, $proDebug, $proDynaforms, $proDerivationScreenTpl)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Process();
|
||||
|
||||
$obj->setProUid($proUid);
|
||||
$obj->setProParent($proParent);
|
||||
$obj->setProTime($proTime);
|
||||
$obj->setProTimeunit($proTimeunit);
|
||||
$obj->setProStatus($proStatus);
|
||||
$obj->setProTypeDay($proTypeDay);
|
||||
$obj->setProType($proType);
|
||||
$obj->setProAssignment($proAssignment);
|
||||
$obj->setProShowMap($proShowMap);
|
||||
$obj->setProShowMessage($proShowMessage);
|
||||
$obj->setProShowDelegate($proShowDelegate);
|
||||
$obj->setProShowDynaform($proShowDynaform);
|
||||
$obj->setProCategory($proCategory);
|
||||
$obj->setProSubCategory($proSubCategory);
|
||||
$obj->setProIndustry($proIndustry);
|
||||
$obj->setProUpdateDate($proUpdateDate);
|
||||
$obj->setProCreateDate($proCreateDate);
|
||||
$obj->setProCreateUser($proCreateUser);
|
||||
$obj->setProHeight($proHeight);
|
||||
$obj->setProWidth($proWidth);
|
||||
$obj->setProTitleX($proTitleX);
|
||||
$obj->setProTitleY($proTitleY);
|
||||
$obj->setProDebug($proDebug);
|
||||
$obj->setProDynaforms($proDynaforms);
|
||||
$obj->setProDerivationScreenTpl($proDerivationScreenTpl);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $proUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function put($proUid, $proParent, $proTime, $proTimeunit, $proStatus, $proTypeDay, $proType, $proAssignment, $proShowMap, $proShowMessage, $proShowDelegate, $proShowDynaform, $proCategory, $proSubCategory, $proIndustry, $proUpdateDate, $proCreateDate, $proCreateUser, $proHeight, $proWidth, $proTitleX, $proTitleY, $proDebug, $proDynaforms, $proDerivationScreenTpl)
|
||||
{
|
||||
try {
|
||||
$obj = ProcessPeer::retrieveByPK($proUid);
|
||||
|
||||
$obj->setProParent($proParent);
|
||||
$obj->setProTime($proTime);
|
||||
$obj->setProTimeunit($proTimeunit);
|
||||
$obj->setProStatus($proStatus);
|
||||
$obj->setProTypeDay($proTypeDay);
|
||||
$obj->setProType($proType);
|
||||
$obj->setProAssignment($proAssignment);
|
||||
$obj->setProShowMap($proShowMap);
|
||||
$obj->setProShowMessage($proShowMessage);
|
||||
$obj->setProShowDelegate($proShowDelegate);
|
||||
$obj->setProShowDynaform($proShowDynaform);
|
||||
$obj->setProCategory($proCategory);
|
||||
$obj->setProSubCategory($proSubCategory);
|
||||
$obj->setProIndustry($proIndustry);
|
||||
$obj->setProUpdateDate($proUpdateDate);
|
||||
$obj->setProCreateDate($proCreateDate);
|
||||
$obj->setProCreateUser($proCreateUser);
|
||||
$obj->setProHeight($proHeight);
|
||||
$obj->setProWidth($proWidth);
|
||||
$obj->setProTitleX($proTitleX);
|
||||
$obj->setProTitleY($proTitleY);
|
||||
$obj->setProDebug($proDebug);
|
||||
$obj->setProDynaforms($proDynaforms);
|
||||
$obj->setProDerivationScreenTpl($proDerivationScreenTpl);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $proUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function delete($proUid)
|
||||
{
|
||||
$conn = Propel::getConnection(ProcessPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = ProcessPeer::retrieveByPK($proUid);
|
||||
if (! is_object($obj)) {
|
||||
throw new RestException(412, 'Record does not exist.');
|
||||
}
|
||||
$obj->delete();
|
||||
|
||||
$conn->commit();
|
||||
} catch (Exception $e) {
|
||||
$conn->rollback();
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -65,5 +65,87 @@ class Services_Rest_Session
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $sesUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function post($sesUid, $sesStatus, $usrUid, $sesRemoteIp, $sesInitDate, $sesDueDate, $sesEndDate)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Session();
|
||||
|
||||
$obj->setSesUid($sesUid);
|
||||
$obj->setSesStatus($sesStatus);
|
||||
$obj->setUsrUid($usrUid);
|
||||
$obj->setSesRemoteIp($sesRemoteIp);
|
||||
$obj->setSesInitDate($sesInitDate);
|
||||
$obj->setSesDueDate($sesDueDate);
|
||||
$obj->setSesEndDate($sesEndDate);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $sesUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function put($sesUid, $sesStatus, $usrUid, $sesRemoteIp, $sesInitDate, $sesDueDate, $sesEndDate)
|
||||
{
|
||||
try {
|
||||
$obj = SessionPeer::retrieveByPK($sesUid);
|
||||
|
||||
$obj->setSesStatus($sesStatus);
|
||||
$obj->setUsrUid($usrUid);
|
||||
$obj->setSesRemoteIp($sesRemoteIp);
|
||||
$obj->setSesInitDate($sesInitDate);
|
||||
$obj->setSesDueDate($sesDueDate);
|
||||
$obj->setSesEndDate($sesEndDate);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $sesUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function delete($sesUid)
|
||||
{
|
||||
$conn = Propel::getConnection(SessionPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = SessionPeer::retrieveByPK($sesUid);
|
||||
if (! is_object($obj)) {
|
||||
throw new RestException(412, 'Record does not exist.');
|
||||
}
|
||||
$obj->delete();
|
||||
|
||||
$conn->commit();
|
||||
} catch (Exception $e) {
|
||||
$conn->rollback();
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -66,5 +66,89 @@ class Services_Rest_Step
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $stepUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function post($stepUid, $proUid, $tasUid, $stepTypeObj, $stepUidObj, $stepCondition, $stepPosition, $stepMode)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Step();
|
||||
|
||||
$obj->setStepUid($stepUid);
|
||||
$obj->setProUid($proUid);
|
||||
$obj->setTasUid($tasUid);
|
||||
$obj->setStepTypeObj($stepTypeObj);
|
||||
$obj->setStepUidObj($stepUidObj);
|
||||
$obj->setStepCondition($stepCondition);
|
||||
$obj->setStepPosition($stepPosition);
|
||||
$obj->setStepMode($stepMode);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $stepUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function put($stepUid, $proUid, $tasUid, $stepTypeObj, $stepUidObj, $stepCondition, $stepPosition, $stepMode)
|
||||
{
|
||||
try {
|
||||
$obj = StepPeer::retrieveByPK($stepUid);
|
||||
|
||||
$obj->setProUid($proUid);
|
||||
$obj->setTasUid($tasUid);
|
||||
$obj->setStepTypeObj($stepTypeObj);
|
||||
$obj->setStepUidObj($stepUidObj);
|
||||
$obj->setStepCondition($stepCondition);
|
||||
$obj->setStepPosition($stepPosition);
|
||||
$obj->setStepMode($stepMode);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $stepUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function delete($stepUid)
|
||||
{
|
||||
$conn = Propel::getConnection(StepPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = StepPeer::retrieveByPK($stepUid);
|
||||
if (! is_object($obj)) {
|
||||
throw new RestException(412, 'Record does not exist.');
|
||||
}
|
||||
$obj->delete();
|
||||
|
||||
$conn->commit();
|
||||
} catch (Exception $e) {
|
||||
$conn->rollback();
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -70,5 +70,97 @@ class Services_Rest_SubProcess
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $spUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function post($spUid, $proUid, $tasUid, $proParent, $tasParent, $spType, $spSynchronous, $spSynchronousType, $spSynchronousWait, $spVariablesOut, $spVariablesIn, $spGridIn)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new SubProcess();
|
||||
|
||||
$obj->setSpUid($spUid);
|
||||
$obj->setProUid($proUid);
|
||||
$obj->setTasUid($tasUid);
|
||||
$obj->setProParent($proParent);
|
||||
$obj->setTasParent($tasParent);
|
||||
$obj->setSpType($spType);
|
||||
$obj->setSpSynchronous($spSynchronous);
|
||||
$obj->setSpSynchronousType($spSynchronousType);
|
||||
$obj->setSpSynchronousWait($spSynchronousWait);
|
||||
$obj->setSpVariablesOut($spVariablesOut);
|
||||
$obj->setSpVariablesIn($spVariablesIn);
|
||||
$obj->setSpGridIn($spGridIn);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $spUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function put($spUid, $proUid, $tasUid, $proParent, $tasParent, $spType, $spSynchronous, $spSynchronousType, $spSynchronousWait, $spVariablesOut, $spVariablesIn, $spGridIn)
|
||||
{
|
||||
try {
|
||||
$obj = SubProcessPeer::retrieveByPK($spUid);
|
||||
|
||||
$obj->setProUid($proUid);
|
||||
$obj->setTasUid($tasUid);
|
||||
$obj->setProParent($proParent);
|
||||
$obj->setTasParent($tasParent);
|
||||
$obj->setSpType($spType);
|
||||
$obj->setSpSynchronous($spSynchronous);
|
||||
$obj->setSpSynchronousType($spSynchronousType);
|
||||
$obj->setSpSynchronousWait($spSynchronousWait);
|
||||
$obj->setSpVariablesOut($spVariablesOut);
|
||||
$obj->setSpVariablesIn($spVariablesIn);
|
||||
$obj->setSpGridIn($spGridIn);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $spUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function delete($spUid)
|
||||
{
|
||||
$conn = Propel::getConnection(SubProcessPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = SubProcessPeer::retrieveByPK($spUid);
|
||||
if (! is_object($obj)) {
|
||||
throw new RestException(412, 'Record does not exist.');
|
||||
}
|
||||
$obj->delete();
|
||||
|
||||
$conn->commit();
|
||||
} catch (Exception $e) {
|
||||
$conn->rollback();
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ class Services_Rest_Task
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_PRIORITY_VARIABLE);
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_ASSIGN_TYPE);
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_ASSIGN_VARIABLE);
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_GROUP_VARIABLE);
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_MI_INSTANCE_VARIABLE);
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_MI_COMPLETE_VARIABLE);
|
||||
$criteria->addSelectColumn(TaskPeer::TAS_ASSIGN_LOCATION);
|
||||
|
||||
@@ -63,5 +63,81 @@ class Services_Rest_Translation
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $trnCategory, $trnId, $trnLang Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function post($trnCategory, $trnId, $trnLang, $trnValue, $trnUpdateDate)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Translation();
|
||||
|
||||
$obj->setTrnCategory($trnCategory);
|
||||
$obj->setTrnId($trnId);
|
||||
$obj->setTrnLang($trnLang);
|
||||
$obj->setTrnValue($trnValue);
|
||||
$obj->setTrnUpdateDate($trnUpdateDate);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $trnCategory, $trnId, $trnLang Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function put($trnCategory, $trnId, $trnLang, $trnValue, $trnUpdateDate)
|
||||
{
|
||||
try {
|
||||
$obj = TranslationPeer::retrieveByPK($trnCategory, $trnId, $trnLang);
|
||||
|
||||
$obj->setTrnValue($trnValue);
|
||||
$obj->setTrnUpdateDate($trnUpdateDate);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $trnCategory, $trnId, $trnLang Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function delete($trnCategory, $trnId, $trnLang)
|
||||
{
|
||||
$conn = Propel::getConnection(TranslationPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = TranslationPeer::retrieveByPK($trnCategory, $trnId, $trnLang);
|
||||
if (! is_object($obj)) {
|
||||
throw new RestException(412, 'Record does not exist.');
|
||||
}
|
||||
$obj->delete();
|
||||
|
||||
$conn->commit();
|
||||
} catch (Exception $e) {
|
||||
$conn->rollback();
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -84,5 +84,125 @@ class Services_Rest_Users
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'POST' method for Rest API
|
||||
*
|
||||
* @param mixed $usrUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function post($usrUid, $usrUsername, $usrPassword, $usrFirstname, $usrLastname, $usrEmail, $usrDueDate, $usrCreateDate, $usrUpdateDate, $usrStatus, $usrCountry, $usrCity, $usrLocation, $usrAddress, $usrPhone, $usrFax, $usrCellular, $usrZipCode, $depUid, $usrPosition, $usrResume, $usrBirthday, $usrRole, $usrReportsTo, $usrReplacedBy, $usrUx)
|
||||
{
|
||||
try {
|
||||
$result = array();
|
||||
$obj = new Users();
|
||||
|
||||
$obj->setUsrUid($usrUid);
|
||||
$obj->setUsrUsername($usrUsername);
|
||||
$obj->setUsrPassword($usrPassword);
|
||||
$obj->setUsrFirstname($usrFirstname);
|
||||
$obj->setUsrLastname($usrLastname);
|
||||
$obj->setUsrEmail($usrEmail);
|
||||
$obj->setUsrDueDate($usrDueDate);
|
||||
$obj->setUsrCreateDate($usrCreateDate);
|
||||
$obj->setUsrUpdateDate($usrUpdateDate);
|
||||
$obj->setUsrStatus($usrStatus);
|
||||
$obj->setUsrCountry($usrCountry);
|
||||
$obj->setUsrCity($usrCity);
|
||||
$obj->setUsrLocation($usrLocation);
|
||||
$obj->setUsrAddress($usrAddress);
|
||||
$obj->setUsrPhone($usrPhone);
|
||||
$obj->setUsrFax($usrFax);
|
||||
$obj->setUsrCellular($usrCellular);
|
||||
$obj->setUsrZipCode($usrZipCode);
|
||||
$obj->setDepUid($depUid);
|
||||
$obj->setUsrPosition($usrPosition);
|
||||
$obj->setUsrResume($usrResume);
|
||||
$obj->setUsrBirthday($usrBirthday);
|
||||
$obj->setUsrRole($usrRole);
|
||||
$obj->setUsrReportsTo($usrReportsTo);
|
||||
$obj->setUsrReplacedBy($usrReplacedBy);
|
||||
$obj->setUsrUx($usrUx);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'PUT' method for Rest API
|
||||
*
|
||||
* @param mixed $usrUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function put($usrUid, $usrUsername, $usrPassword, $usrFirstname, $usrLastname, $usrEmail, $usrDueDate, $usrCreateDate, $usrUpdateDate, $usrStatus, $usrCountry, $usrCity, $usrLocation, $usrAddress, $usrPhone, $usrFax, $usrCellular, $usrZipCode, $depUid, $usrPosition, $usrResume, $usrBirthday, $usrRole, $usrReportsTo, $usrReplacedBy, $usrUx)
|
||||
{
|
||||
try {
|
||||
$obj = UsersPeer::retrieveByPK($usrUid);
|
||||
|
||||
$obj->setUsrUsername($usrUsername);
|
||||
$obj->setUsrPassword($usrPassword);
|
||||
$obj->setUsrFirstname($usrFirstname);
|
||||
$obj->setUsrLastname($usrLastname);
|
||||
$obj->setUsrEmail($usrEmail);
|
||||
$obj->setUsrDueDate($usrDueDate);
|
||||
$obj->setUsrCreateDate($usrCreateDate);
|
||||
$obj->setUsrUpdateDate($usrUpdateDate);
|
||||
$obj->setUsrStatus($usrStatus);
|
||||
$obj->setUsrCountry($usrCountry);
|
||||
$obj->setUsrCity($usrCity);
|
||||
$obj->setUsrLocation($usrLocation);
|
||||
$obj->setUsrAddress($usrAddress);
|
||||
$obj->setUsrPhone($usrPhone);
|
||||
$obj->setUsrFax($usrFax);
|
||||
$obj->setUsrCellular($usrCellular);
|
||||
$obj->setUsrZipCode($usrZipCode);
|
||||
$obj->setDepUid($depUid);
|
||||
$obj->setUsrPosition($usrPosition);
|
||||
$obj->setUsrResume($usrResume);
|
||||
$obj->setUsrBirthday($usrBirthday);
|
||||
$obj->setUsrRole($usrRole);
|
||||
$obj->setUsrReportsTo($usrReportsTo);
|
||||
$obj->setUsrReplacedBy($usrReplacedBy);
|
||||
$obj->setUsrUx($usrUx);
|
||||
|
||||
$obj->save();
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation for 'DELETE' method for Rest API
|
||||
*
|
||||
* @param mixed $usrUid Primary key
|
||||
*
|
||||
* @return array $result Returns array within multiple records or a single record depending if
|
||||
* a single selection was requested passing id(s) as param
|
||||
*/
|
||||
protected function delete($usrUid)
|
||||
{
|
||||
$conn = Propel::getConnection(UsersPeer::DATABASE_NAME);
|
||||
|
||||
try {
|
||||
$conn->begin();
|
||||
|
||||
$obj = UsersPeer::retrieveByPK($usrUid);
|
||||
if (! is_object($obj)) {
|
||||
throw new RestException(412, 'Record does not exist.');
|
||||
}
|
||||
$obj->delete();
|
||||
|
||||
$conn->commit();
|
||||
} catch (Exception $e) {
|
||||
$conn->rollback();
|
||||
throw new RestException(412, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,15 +5,13 @@
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
{$_header}
|
||||
{literal}
|
||||
<!--[if IE]>
|
||||
<style>
|
||||
table.x-pm-headerbar td, table th {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-right: 0px;
|
||||
<!--[if lt IE 8]>
|
||||
<style type="text/css">
|
||||
.x-pm-headerbar-data {
|
||||
padding-top: 8px;
|
||||
}
|
||||
</style>
|
||||
<![endif]-->
|
||||
<![endif]-->
|
||||
{/literal}
|
||||
</head>
|
||||
<body>
|
||||
@@ -21,18 +19,18 @@
|
||||
<div id="panel-header" />
|
||||
|
||||
<div id="header-content" style="display:none">
|
||||
<table class="x-pm-headerbar">
|
||||
<table class="x-pm-headerbar">
|
||||
<tr>
|
||||
<td width="50%" valign="middle">
|
||||
<img src="{$logo_company}" height="40"/>
|
||||
</td>
|
||||
|
||||
<td align="right" valign="top">
|
||||
<td class="x-pm-headerbar-data" align="right" valign="top">
|
||||
<table width="100%" height="25" border="0" cellspacing="0" cellpadding="0" class="headerRightSection">
|
||||
<tr valign="middle">
|
||||
<td align="right">
|
||||
{if $licenseNotification != ''}
|
||||
<span class="x-pm-license-notification">
|
||||
<span class="x-pm-license-notification">
|
||||
<img src="/images/alert_icon.gif" width="10px" headerRightSection="10px"/> {$licenseNotification}
|
||||
</span>
|
||||
{/if}
|
||||
@@ -40,15 +38,15 @@
|
||||
<td height="12" valign="middle" align="right" valign="top">
|
||||
<a href="#" id="options-tool" class="options-tool">
|
||||
{$userfullname}
|
||||
<span>
|
||||
<img src="/images/classic/roll.static.gif" width="10px" headerRightSection="10px"/>
|
||||
<span>
|
||||
<img src="/images/classic/roll.static.gif" width="10px" headerRightSection="10px"/>
|
||||
</span>
|
||||
<br />
|
||||
<span style="font-size:9px">{$rolename}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td width="40" align="right">
|
||||
<span id="user-avatar">
|
||||
<span id="user-avatar">
|
||||
<img src="{$user_avatar}" width="25" height="25"/>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
@@ -13,16 +13,28 @@ function closeCaseNotesWindow(){
|
||||
}
|
||||
}
|
||||
|
||||
function openCaseNotesWindow(appUid1, modalSw, appTitle)
|
||||
function openCaseNotesWindow(appUid1, modalSw, appTitle, proUid, taskUid)
|
||||
{
|
||||
Ext.MessageBox.show({
|
||||
msg: _('ID_CASE_NOTES_LOADING'),
|
||||
progressText: 'Saving...',
|
||||
width:300,
|
||||
wait:true,
|
||||
waitConfig: {interval:200},
|
||||
animEl: 'mb7'
|
||||
});
|
||||
|
||||
Ext.QuickTips.init();
|
||||
appUid = !appUid1 ? "": appUid1;
|
||||
title = appTitle;
|
||||
appUid = !appUid1 ? "": appUid1;
|
||||
proUid = !proUid ? "": proUid;
|
||||
taskUid = !taskUid ? "": taskUid;
|
||||
|
||||
title = appTitle;
|
||||
var startRecord=0;
|
||||
var loadSize=10;
|
||||
|
||||
storeNotes = new Ext.data.JsonStore({
|
||||
url : '../appProxy/getNotesList?appUid='+appUid,
|
||||
url : '../appProxy/getNotesList?appUid='+appUid+'&pro='+proUid+'&tas='+taskUid,
|
||||
root: 'notes',
|
||||
totalProperty: 'totalCount',
|
||||
fields: ['USR_USERNAME','USR_FIRSTNAME','USR_LASTNAME','USR_FULL_NAME','NOTE_DATE','NOTE_CONTENT', 'USR_UID', 'user'],
|
||||
@@ -32,7 +44,22 @@ function openCaseNotesWindow(appUid1, modalSw, appTitle)
|
||||
},
|
||||
listeners:{
|
||||
load:function(){
|
||||
Ext.MessageBox.hide();
|
||||
if ( typeof(storeNotes.reader.jsonData.noPerms != 'undefined') &&
|
||||
(storeNotes.reader.jsonData.noPerms == '1') ) {
|
||||
Ext.MessageBox.show({
|
||||
title: _('ID_WARNING'),
|
||||
msg: _('ID_CASES_NOTES_NO_PERMISSIONS'),
|
||||
buttons: Ext.MessageBox.OK,
|
||||
animEl: 'mb9',
|
||||
icon: Ext.MessageBox.WARNING
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
caseNotesWindow.show();
|
||||
newNoteAreaActive = false;
|
||||
newNoteHandler();
|
||||
caseNotesWindow.setTitle(_('ID_CASES_NOTES') + ' (' + storeNotes.data.items.length + ')');
|
||||
|
||||
if(storeNotes.getCount()<storeNotes.getTotalCount()){
|
||||
@@ -135,7 +162,7 @@ function openCaseNotesWindow(appUid1, modalSw, appTitle)
|
||||
constrain: true,
|
||||
keys: {
|
||||
key: 27,
|
||||
fn : function(){
|
||||
fn : function(){
|
||||
caseNotesWindow.hide();
|
||||
}
|
||||
},
|
||||
@@ -151,22 +178,22 @@ function openCaseNotesWindow(appUid1, modalSw, appTitle)
|
||||
],
|
||||
tbar:[
|
||||
new Ext.form.TextArea({
|
||||
text : _('ID_NEW_NOTE'),
|
||||
xtype : 'textarea',
|
||||
id : 'caseNoteText',
|
||||
name : 'caseNoteText',
|
||||
width : 330,
|
||||
grow : true,
|
||||
text : _('ID_NEW_NOTE'),
|
||||
xtype : 'textarea',
|
||||
id : 'caseNoteText',
|
||||
name : 'caseNoteText',
|
||||
width : 330,
|
||||
grow : true,
|
||||
height : 40,
|
||||
growMin: 40,
|
||||
growMax: 80,
|
||||
maxLengthText : 500,
|
||||
allowBlank :true,
|
||||
selectOnFocus :true,
|
||||
maxLengthText : 500,
|
||||
allowBlank :true,
|
||||
selectOnFocus :true,
|
||||
enableKeyEvents: true,
|
||||
listeners : {
|
||||
scope : this,
|
||||
keyup : updateTextCtr,
|
||||
scope : this,
|
||||
keyup : updateTextCtr,
|
||||
keydown: updateTextCtr
|
||||
}
|
||||
})
|
||||
@@ -236,10 +263,6 @@ function openCaseNotesWindow(appUid1, modalSw, appTitle)
|
||||
//text: "",
|
||||
width: 200
|
||||
});
|
||||
|
||||
newNoteAreaActive = false;
|
||||
caseNotesWindow.show();
|
||||
newNoteHandler();
|
||||
}
|
||||
|
||||
function updateTextCtr(body, event) {
|
||||
|
||||
@@ -2,6 +2,38 @@
|
||||
* @author: Douglas Medrano
|
||||
* May 03, 2011
|
||||
*/
|
||||
function deleteFiles(sDocUid, sVersion) {
|
||||
Ext.MessageBox.confirm(_('ID_CONFIRM'), _('ID_DELETE_DOCUMENT'), function(res){
|
||||
if(res == 'yes') {
|
||||
Ext.MessageBox.show({
|
||||
msg: _('ID_LOADING'),
|
||||
width:300,
|
||||
wait:true,
|
||||
waitConfig: {interval:200},
|
||||
animEl: 'mb7'
|
||||
});
|
||||
|
||||
var requestParams = {
|
||||
action : 'delete',
|
||||
option: 'documents',
|
||||
item: sDocUid + '_' + sVersion,
|
||||
'selitems[]': sDocUid + '_' + sVersion
|
||||
};
|
||||
Ext.Ajax.request({
|
||||
url: '../appFolder/appFolderAjax.php',
|
||||
params : requestParams,
|
||||
success : function(response) {
|
||||
Ext.MessageBox.hide();
|
||||
store.load();
|
||||
},
|
||||
failure : function() {
|
||||
Ext.Msg.alert(TRANSLATIONS.ID_ERROR, TRANSLATIONS.ID_UNABLE_START_CASE);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ajaxPostRequest(url, callback_function, id){
|
||||
var d = new Date();
|
||||
var time = d.getTime();
|
||||
@@ -203,7 +235,9 @@
|
||||
{name : 'CREATED_BY'},
|
||||
{name : 'CREATE_DATE'},
|
||||
{name : 'FILEDOCLABEL'},
|
||||
{name : 'FILEPDFLABEL'}
|
||||
{name : 'FILEPDFLABEL'},
|
||||
{name : 'DELETE_FILE'},
|
||||
{name : 'DOC_VERSION'}
|
||||
]
|
||||
}
|
||||
)
|
||||
@@ -253,7 +287,16 @@
|
||||
actionTranslate = _("ID_DERIVATED");
|
||||
}
|
||||
return actionTranslate;
|
||||
};
|
||||
};
|
||||
|
||||
function renderDeleteFile(val,p,r) {
|
||||
if (r.data.DELETE_FILE) {
|
||||
return '<img src="/images/delete-16x16.gif" unselectable="off" onClick="deleteFiles(\'' + r.data.APP_DOC_UID + '\', \'' + r.data.DOC_VERSION + '\');">';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
var processesGrid = new Ext.grid.GridPanel({
|
||||
region: 'center',
|
||||
layout: 'fit',
|
||||
@@ -289,7 +332,8 @@
|
||||
{header: _("ID_OUTPUT_DOCUMENT"), dataIndex: 'OUTDOCTITLE', width: 70},
|
||||
{header: _("ID_ORIGIN_TASK"), dataIndex: 'ORIGIN', width: 70},
|
||||
{header: _("ID_CREATED_BY"), dataIndex: 'CREATED_BY', width: 70},
|
||||
{header: _("ID_CREATE_DATE"), dataIndex: 'CREATE_DATE', width: 70,renderer:startDateRender}
|
||||
{header: _("ID_CREATE_DATE"), dataIndex: 'CREATE_DATE', width: 70,renderer:startDateRender},
|
||||
{header: '', dataIndex: 'DELETE_FILE', width: 30,renderer:renderDeleteFile}
|
||||
|
||||
]
|
||||
}),
|
||||
@@ -392,28 +436,29 @@
|
||||
|
||||
var rowSelected = processesGrid.getSelectionModel().getSelected();
|
||||
|
||||
var FILEDOCEXIST = rowSelected.data.FILEDOCEXIST;
|
||||
var FILEPDFEXIST = rowSelected.data.FILEPDFEXIST;
|
||||
|
||||
if (rowSelected.data.FILEDOCLABEL=='') {
|
||||
Ext.getCmp('ID_DOWNLOAD_DOC').setDisabled(true);
|
||||
if (rowSelected) {
|
||||
var FILEDOCEXIST = rowSelected.data.FILEDOCEXIST;
|
||||
var FILEPDFEXIST = rowSelected.data.FILEPDFEXIST;
|
||||
|
||||
if (rowSelected.data.FILEDOCLABEL=='') {
|
||||
Ext.getCmp('ID_DOWNLOAD_DOC').setDisabled(true);
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('ID_DOWNLOAD_DOC').setDisabled(false);
|
||||
}
|
||||
|
||||
if (rowSelected.data.FILEPDFLABEL=='') {
|
||||
Ext.getCmp('ID_DOWNLOAD_PDF').setDisabled(true);
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('ID_DOWNLOAD_PDF').setDisabled(false);
|
||||
}
|
||||
|
||||
if ((rowSelected.data.FILEPDFLABEL=='') && (rowSelected.data.FILEDOCLABEL=='')) {
|
||||
Ext.getCmp('ID_DOWNLOAD_PDF').setDisabled(true);
|
||||
Ext.getCmp('ID_DOWNLOAD_DOC').setDisabled(true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('ID_DOWNLOAD_DOC').setDisabled(false);
|
||||
}
|
||||
|
||||
if (rowSelected.data.FILEPDFLABEL=='') {
|
||||
Ext.getCmp('ID_DOWNLOAD_PDF').setDisabled(true);
|
||||
}
|
||||
else {
|
||||
Ext.getCmp('ID_DOWNLOAD_PDF').setDisabled(false);
|
||||
}
|
||||
|
||||
if ((rowSelected.data.FILEPDFLABEL=='') && (rowSelected.data.FILEDOCLABEL=='')) {
|
||||
Ext.getCmp('ID_DOWNLOAD_PDF').setDisabled(true);
|
||||
Ext.getCmp('ID_DOWNLOAD_DOC').setDisabled(true);
|
||||
}
|
||||
|
||||
|
||||
/* var ID_DOWNLOAD_PDF2_ = Ext.getCmp('ID_DOWNLOAD_PDF');
|
||||
var ID_DOWNLOAD_DOC2_ = Ext.getCmp('ID_DOWNLOAD_DOC');
|
||||
@@ -469,31 +514,6 @@
|
||||
);
|
||||
|
||||
processesGrid.addListener('rowcontextmenu', emptyReturn,this);
|
||||
processesGrid.on('rowcontextmenu', function (grid, rowIndex, evt) {
|
||||
var sm = grid.getSelectionModel();
|
||||
sm.selectRow(rowIndex, sm.isSelected(rowIndex));
|
||||
|
||||
var rowSelected = Ext.getCmp('processesGrid').getSelectionModel().getSelected();
|
||||
var activator = Ext.getCmp('activator2');
|
||||
var debug = Ext.getCmp('debug');
|
||||
|
||||
if( rowSelected.data.PRO_STATUS == 'ACTIVE' ){
|
||||
activator.setIconClass('icon-deactivate');
|
||||
activator.setText(TRANSLATIONS.ID_DEACTIVATE);
|
||||
} else {
|
||||
activator.setIconClass('icon-activate');
|
||||
activator.setText(TRANSLATIONS.ID_ACTIVATE);
|
||||
}
|
||||
|
||||
if( rowSelected.data.PRO_DEBUG == 1){
|
||||
debug.setIconClass('icon-debug-disabled');
|
||||
debug.setText(_('ID_DISABLE_DEBUG'));
|
||||
} else {
|
||||
debug.setIconClass('icon-debug');
|
||||
debug.setText(_('ID_ENABLE_DEBUG'));
|
||||
}
|
||||
}, this);
|
||||
|
||||
processesGrid.on('contextmenu', function (evt) {
|
||||
evt.preventDefault();
|
||||
}, this);
|
||||
|
||||
@@ -477,9 +477,12 @@ Ext.onReady ( function() {
|
||||
};
|
||||
|
||||
function renderNote(val,p,r) {
|
||||
pro = r.json.PRO_UID;
|
||||
tas = r.json.TAS_UID;
|
||||
|
||||
appUid = r.data['APP_UID'];
|
||||
title = r.data['APP_TITLE'];
|
||||
return '<img src="/images/ext/default/s.gif" class="x-tree-node-icon ICON_CASES_NOTES" unselectable="off" id="extdd-17" onClick="openCaseNotesWindow(\''+appUid+'\', true, \''+title+'\')">';
|
||||
return '<img src="/images/ext/default/s.gif" class="x-tree-node-icon ICON_CASES_NOTES" unselectable="off" id="extdd-17" onClick="openCaseNotesWindow(\''+appUid+'\', true, \''+title+'\', \''+pro+'\', \''+tas+'\')">';
|
||||
}
|
||||
|
||||
//Render Full Name
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<option name="DYNAFORM">Dynaform</option>
|
||||
<option name="INPUT">Input Document</option>
|
||||
<option name="OUTPUT">Output Document</option>
|
||||
<option name="CASES_NOTES">Cases Notes</option>
|
||||
</en>
|
||||
</OP_OBJ_TYPE>
|
||||
<ALL type="dropdown" mode="edit" sqlConnection="dbarray">
|
||||
@@ -163,22 +164,33 @@ if(getField('OP_OBJ_TYPE').value=='ANY')
|
||||
hideRowById( 'DYNAFORMS' );
|
||||
hideRowById( 'INPUTS' );
|
||||
hideRowById( 'OUTPUTS' );
|
||||
showRowById( 'OP_ACTION' );
|
||||
}
|
||||
if(getField('OP_OBJ_TYPE').value=='DYNAFORM')
|
||||
{ hideRowById( 'ALL' );
|
||||
hideRowById( 'INPUTS' );
|
||||
hideRowById( 'OUTPUTS' );
|
||||
showRowById( 'OP_ACTION' );
|
||||
}
|
||||
if(getField('OP_OBJ_TYPE').value=='INPUT')
|
||||
{ hideRowById( 'ALL' );
|
||||
hideRowById( 'DYNAFORMS' );
|
||||
hideRowById( 'OUTPUTS' );
|
||||
showRowById( 'OP_ACTION' );
|
||||
}
|
||||
if(getField('OP_OBJ_TYPE').value=='OUTPUT')
|
||||
{ hideRowById( 'ALL' );
|
||||
hideRowById( 'DYNAFORMS' );
|
||||
hideRowById( 'INPUTS' );
|
||||
showRowById( 'OP_ACTION' );
|
||||
}
|
||||
if(getField('OP_OBJ_TYPE').value=='CASES_NOTES')
|
||||
{ hideRowById( 'ALL' );
|
||||
hideRowById( 'DYNAFORMS' );
|
||||
hideRowById( 'INPUTS' );
|
||||
hideRowById( 'OUTPUTS' );
|
||||
hideRowById( 'OP_ACTION' );
|
||||
}
|
||||
getOptions();
|
||||
rebuildOptionsWhenLoad(getField('OP_OBJ_TYPE').value);
|
||||
|
||||
@@ -188,24 +200,35 @@ leimnud.event.add(document.getElementById('form[OP_OBJ_TYPE]'), 'change', functi
|
||||
hideRowById( 'INPUTS' );
|
||||
hideRowById( 'OUTPUTS' );
|
||||
showRowById( 'DYNAFORMS' );
|
||||
showRowById( 'OP_ACTION' );
|
||||
}
|
||||
if(getField('OP_OBJ_TYPE').value=='INPUT')
|
||||
{ hideRowById( 'ALL' );
|
||||
hideRowById( 'DYNAFORMS' );
|
||||
hideRowById( 'OUTPUTS' );
|
||||
showRowById( 'INPUTS' );
|
||||
showRowById( 'OP_ACTION' );
|
||||
}
|
||||
if(getField('OP_OBJ_TYPE').value=='OUTPUT')
|
||||
{ hideRowById( 'ALL' );
|
||||
hideRowById( 'DYNAFORMS' );
|
||||
hideRowById( 'INPUTS' );
|
||||
showRowById( 'OUTPUTS' );
|
||||
showRowById( 'OP_ACTION' );
|
||||
}
|
||||
if(getField('OP_OBJ_TYPE').value=='CASES_NOTES')
|
||||
{ hideRowById( 'ALL' );
|
||||
hideRowById( 'DYNAFORMS' );
|
||||
hideRowById( 'INPUTS' );
|
||||
hideRowById( 'OUTPUTS' );
|
||||
hideRowById( 'OP_ACTION' );
|
||||
}
|
||||
if(getField('OP_OBJ_TYPE').value=='ANY')
|
||||
{ hideRowById('ALL' );
|
||||
hideRowById( 'DYNAFORMS' );
|
||||
hideRowById( 'INPUTS' );
|
||||
hideRowById( 'OUTPUTS' );
|
||||
showRowById( 'OP_ACTION' );
|
||||
}
|
||||
rebuildOptions(getField('OP_OBJ_TYPE').value);
|
||||
});
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<option name="DYNAFORM">Dynaform</option>
|
||||
<option name="INPUT">Input Document</option>
|
||||
<option name="OUTPUT">Output Document</option>
|
||||
<option name="CASES_NOTES">Cases Notes</option>
|
||||
</en>
|
||||
</OP_OBJ_TYPE>
|
||||
<ALL type="dropdown" mode="edit" sqlConnection="dbarray">
|
||||
@@ -131,6 +132,7 @@ leimnud.event.add(getField('OP_OBJ_TYPE'), 'change', function() {
|
||||
hideRowById('DYNAFORMS');
|
||||
hideRowById('INPUTS');
|
||||
hideRowById('OUTPUTS');
|
||||
showRowById('OP_ACTION');
|
||||
break;
|
||||
case 'DYNAFORM':
|
||||
getField('ALL').value = '';
|
||||
@@ -141,6 +143,7 @@ leimnud.event.add(getField('OP_OBJ_TYPE'), 'change', function() {
|
||||
showRowById('DYNAFORMS');
|
||||
hideRowById('INPUTS');
|
||||
hideRowById('OUTPUTS');
|
||||
showRowById('OP_ACTION');
|
||||
break;
|
||||
case 'INPUT':
|
||||
getField('ALL').value = '';
|
||||
@@ -151,6 +154,7 @@ leimnud.event.add(getField('OP_OBJ_TYPE'), 'change', function() {
|
||||
hideRowById('DYNAFORMS');
|
||||
showRowById('INPUTS');
|
||||
hideRowById('OUTPUTS');
|
||||
showRowById('OP_ACTION');
|
||||
break;
|
||||
case 'OUTPUT':
|
||||
getField('ALL').value = '';
|
||||
@@ -161,6 +165,19 @@ leimnud.event.add(getField('OP_OBJ_TYPE'), 'change', function() {
|
||||
hideRowById('DYNAFORMS');
|
||||
hideRowById('INPUTS');
|
||||
showRowById('OUTPUTS');
|
||||
showRowById('OP_ACTION');
|
||||
break;
|
||||
case 'CASES_NOTES':
|
||||
getField('ALL').value = '';
|
||||
getField('DYNAFORMS').value = '';
|
||||
getField('INPUTS').value = '';
|
||||
getField('OUTPUTS').value = '';
|
||||
getField('OP_ACTION').value = 'VIEW';
|
||||
hideRowById('ALL');
|
||||
hideRowById('DYNAFORMS');
|
||||
hideRowById('INPUTS');
|
||||
hideRowById('OUTPUTS');
|
||||
hideRowById('OP_ACTION');
|
||||
break;
|
||||
}
|
||||
rebuildOptions(vValue);
|
||||
@@ -179,6 +196,7 @@ switch (vValue) {
|
||||
hideRowById('DYNAFORMS');
|
||||
hideRowById('INPUTS');
|
||||
hideRowById('OUTPUTS');
|
||||
showRowById('OP_ACTION');
|
||||
break;
|
||||
case 'DYNAFORM':
|
||||
getField('ALL').value = '';
|
||||
@@ -189,6 +207,7 @@ switch (vValue) {
|
||||
showRowById('DYNAFORMS');
|
||||
hideRowById('INPUTS');
|
||||
hideRowById('OUTPUTS');
|
||||
showRowById('OP_ACTION');
|
||||
break;
|
||||
case 'INPUT':
|
||||
getField('ALL').value = '';
|
||||
@@ -199,6 +218,7 @@ switch (vValue) {
|
||||
hideRowById('DYNAFORMS');
|
||||
hideRowById('INPUTS');
|
||||
showRowById('OUTPUTS');
|
||||
showRowById('OP_ACTION');
|
||||
break;
|
||||
case 'OUTPUT':
|
||||
getField('ALL').value = '';
|
||||
@@ -209,7 +229,20 @@ switch (vValue) {
|
||||
hideRowById('DYNAFORMS');
|
||||
hideRowById('INPUTS');
|
||||
showRowById('OUTPUTS');
|
||||
showRowById('OP_ACTION');
|
||||
break;
|
||||
case 'CASES_NOTES':
|
||||
getField('ALL').value = '';
|
||||
getField('DYNAFORMS').value = '';
|
||||
getField('INPUTS').value = '';
|
||||
getField('OUTPUTS').value = '';
|
||||
getField('OP_ACTION').value = 'VIEW';
|
||||
hideRowById('ALL');
|
||||
hideRowById('DYNAFORMS');
|
||||
hideRowById('INPUTS');
|
||||
hideRowById('OUTPUTS');
|
||||
hideRowById('OP_ACTION');
|
||||
break;
|
||||
}
|
||||
getOptions();
|
||||
rebuildOptions(vValue);
|
||||
|
||||
@@ -12,9 +12,13 @@
|
||||
<LANG type="private"/>
|
||||
|
||||
<TAS_ASSIGN_TYPE type="radiogroup" defaultvalue="BALANCED" group="1">
|
||||
<en>Case to be assigned by<option name="BALANCED">Cyclical Assignment</option><option name="MANUAL">Manual Assignment</option><option name="EVALUATE">Value Based Assignment</option>
|
||||
<en>Case to be assigned by
|
||||
<option name="BALANCED">Cyclical Assignment</option>
|
||||
<option name="MANUAL">Manual Assignment</option>
|
||||
<option name="EVALUATE">Value Based Assignment</option>
|
||||
<option name="REPORT_TO">Reports to</option>
|
||||
<option name="SELF_SERVICE">Self Service</option>
|
||||
<option name="SELF_SERVICE_EVALUATE">Self Service Value Based Assignment</option>
|
||||
<!-- this feature is temporarily disabled -->
|
||||
<!--option name="STATIC_MI">Static Partial Join for Multiple Instances</option>
|
||||
<option name="CANCEL_MI">Cancelling Partial Join for Multiple Instances</option-->
|
||||
@@ -24,6 +28,10 @@
|
||||
<TAS_ASSIGN_VARIABLE type="textpm" size="40" maxlength="155" defaultvalue="@@SYS_NEXT_USER_TO_BE_ASSIGNED" showVars="1" process="@#PRO_UID">
|
||||
<en>Variable for Value Based Assignment</en>
|
||||
</TAS_ASSIGN_VARIABLE>
|
||||
|
||||
<TAS_GROUP_VARIABLE type="textpm" size="40" maxlength="155" defaultvalue="@@SYS_GROUP_TO_BE_ASSIGNED" showVars="1" process="@#PRO_UID">
|
||||
<en>Variable for Self Service Value Based Assignment</en>
|
||||
</TAS_GROUP_VARIABLE>
|
||||
<!-- this feature is temporarily disabled -->
|
||||
<!--TAS_MI_INSTANCE_VARIABLE type="textpm" size="40" maxlength="155" defaultvalue="@@SYS_VAR_TOTAL_INSTANCE" showVars="1" process="@#PRO_UID">
|
||||
<en>Variable for No of Instances</en>
|
||||
@@ -37,28 +45,37 @@
|
||||
|
||||
var showTextpm = function()
|
||||
{
|
||||
/* this feature is temporarily disabled
|
||||
if(getField('TAS_ASSIGN_TYPE][STATIC_MI').checked == true || getField('TAS_ASSIGN_TYPE][CANCEL_MI').checked == true)
|
||||
{
|
||||
showRowById('TAS_MI_INSTANCE_VARIABLE');
|
||||
showRowById('TAS_MI_COMPLETE_VARIABLE');
|
||||
hideRowById('TAS_ASSIGN_VARIABLE');
|
||||
}
|
||||
else */
|
||||
if(getField('TAS_ASSIGN_TYPE][EVALUATE').checked == true)
|
||||
/* this feature is temporarily disabled
|
||||
if(getField('TAS_ASSIGN_TYPE][STATIC_MI').checked == true || getField('TAS_ASSIGN_TYPE][CANCEL_MI').checked == true)
|
||||
{
|
||||
showRowById('TAS_ASSIGN_VARIABLE');
|
||||
/* this feature is temporarily disabled
|
||||
hideRowById('TAS_MI_INSTANCE_VARIABLE');
|
||||
hideRowById('TAS_MI_COMPLETE_VARIABLE');*/
|
||||
}
|
||||
else
|
||||
{
|
||||
showRowById('TAS_MI_INSTANCE_VARIABLE');
|
||||
showRowById('TAS_MI_COMPLETE_VARIABLE');
|
||||
hideRowById('TAS_ASSIGN_VARIABLE');
|
||||
/* this feature is temporarily disabled
|
||||
}
|
||||
else */
|
||||
if(getField('TAS_ASSIGN_TYPE][EVALUATE').checked == true) {
|
||||
showRowById('TAS_ASSIGN_VARIABLE');
|
||||
hideRowById('TAS_GROUP_VARIABLE');
|
||||
//getField('TAS_GROUP_VARIABLE').value = '';
|
||||
/* this feature is temporarily disabled
|
||||
hideRowById('TAS_MI_INSTANCE_VARIABLE');
|
||||
hideRowById('TAS_MI_COMPLETE_VARIABLE');*/
|
||||
}
|
||||
} else {
|
||||
if (getField('TAS_ASSIGN_TYPE][SELF_SERVICE_EVALUATE').checked) {
|
||||
hideRowById('TAS_ASSIGN_VARIABLE');
|
||||
showRowById('TAS_GROUP_VARIABLE');
|
||||
if (getField('TAS_GROUP_VARIABLE').value == '') {
|
||||
getField('TAS_GROUP_VARIABLE').value = '@' + '@' + 'SYS_GROUP_TO_BE_ASSIGNED';//the class xmlform replace this variable @@SYS_GROUP_TO_BE_ASSIGNED
|
||||
}
|
||||
} else {
|
||||
hideRowById('TAS_ASSIGN_VARIABLE');
|
||||
hideRowById('TAS_GROUP_VARIABLE');
|
||||
//getField('TAS_GROUP_VARIABLE').value = '';
|
||||
}
|
||||
/* this feature is temporarily disabled
|
||||
hideRowById('TAS_MI_INSTANCE_VARIABLE');
|
||||
hideRowById('TAS_MI_COMPLETE_VARIABLE');*/
|
||||
}
|
||||
};
|
||||
|
||||
/* Recovery data */
|
||||
@@ -67,7 +84,11 @@ if (aTaskFlag[1])
|
||||
switch (oTaskData.TAS_ASSIGN_TYPE)
|
||||
{
|
||||
case 'SELF_SERVICE':
|
||||
getField('TAS_ASSIGN_TYPE][SELF_SERVICE').checked = true;
|
||||
if (getField('TAS_GROUP_VARIABLE').value == '') {
|
||||
getField('TAS_ASSIGN_TYPE][SELF_SERVICE').checked = true;
|
||||
} else {
|
||||
getField('TAS_ASSIGN_TYPE][SELF_SERVICE_EVALUATE').checked = true;
|
||||
}
|
||||
showTextpm();
|
||||
break;
|
||||
case 'REPORT_TO':
|
||||
@@ -125,6 +146,10 @@ leimnud.event.add(getField('TAS_ASSIGN_TYPE][SELF_SERVICE'), 'click', function()
|
||||
showTextpm();
|
||||
});
|
||||
|
||||
leimnud.event.add(getField('TAS_ASSIGN_TYPE][SELF_SERVICE_EVALUATE'), 'click', function() {
|
||||
showTextpm();
|
||||
});
|
||||
|
||||
leimnud.event.add(getField('TAS_ASSIGN_TYPE][REPORT_TO'), 'click', function() {
|
||||
showTextpm();
|
||||
});
|
||||
@@ -206,4 +231,4 @@ var insertFormVar = function(sFieldName, sValue) {
|
||||
|
||||
]]></JS>
|
||||
|
||||
</dynaForm>
|
||||
</dynaForm>
|
||||
|
||||
Reference in New Issue
Block a user