Merged in release/3.2 (pull request #5470)

Release/3.2

Approved-by: Paula Quispe
This commit is contained in:
Paula Quispe
2017-02-24 17:20:39 +00:00
14 changed files with 345 additions and 268 deletions

View File

@@ -2015,7 +2015,7 @@ class Cases
* @return Fields * @return Fields
*/ */
public function startCase($sTasUid, $sUsrUid, $isSubprocess = false, $dataPreviusApplication = array()) public function startCase($sTasUid, $sUsrUid, $isSubprocess = false, $dataPreviusApplication = array(), $isSelfService = false)
{ {
if ($sTasUid != '') { if ($sTasUid != '') {
try { try {
@@ -2125,15 +2125,16 @@ class Cases
if(!$isSubprocess){ if(!$isSubprocess){
$Fields['APP_STATUS'] = 'DRAFT'; $Fields['APP_STATUS'] = 'DRAFT';
} }
$inbox = new ListInbox(); $inbox = new ListInbox();
$inbox->newRow($Fields, $sUsrUid, $isSubprocess, $dataPreviusApplication); $inbox->newRow($Fields, $sUsrUid, $isSelfService);
//Multiple Instance //Multiple Instance
foreach($aUserFields as $rowUser){ foreach($aUserFields as $rowUser){
$Fields["USR_UID"] = $rowUser["USR_UID"]; $Fields["USR_UID"] = $rowUser["USR_UID"];
$Fields["DEL_INDEX"] = $rowUser["DEL_INDEX"]; $Fields["DEL_INDEX"] = $rowUser["DEL_INDEX"];
$inbox = new ListInbox(); $inbox = new ListInbox();
$inbox->newRow($Fields, $sUsrUid, $isSubprocess, $dataPreviusApplication); $inbox->newRow($Fields, $sUsrUid, $isSelfService);
} }
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
} catch (exception $e) { } catch (exception $e) {

View File

@@ -822,7 +822,7 @@ class Derivation
$arrayApplicationData2["REMOVED_LIST"] = $removeList; $arrayApplicationData2["REMOVED_LIST"] = $removeList;
$inbox = new ListInbox(); $inbox = new ListInbox();
$inbox->newRow($arrayApplicationData2, $arrayApplicationData["CURRENT_USER_UID"], false, array(), (($arrayNextDelegationData["TAS_ASSIGN_TYPE"] == "SELF_SERVICE")? true : false)); $inbox->newRow($arrayApplicationData2, $arrayApplicationData["CURRENT_USER_UID"], (($arrayNextDelegationData["TAS_ASSIGN_TYPE"] == "SELF_SERVICE")? true : false));
} }
} }
} }
@@ -1405,9 +1405,14 @@ class Derivation
//if there are subprocess to create //if there are subprocess to create
if (isset( $aSP )) { if (isset( $aSP )) {
//Check if is Selfservice the task in the subprocess
$isSelfservice = false;
if (empty($aSP['USR_UID'])) {
$isSelfservice = true;
}
//Create the new case in the sub-process //Create the new case in the sub-process
// set the initial date to null the time its created //Set the initial date to null the time its created
$aNewCase = $this->case->startCase( $aSP['TAS_UID'], $aSP['USR_UID'], true, $appFields); $aNewCase = $this->case->startCase( $aSP['TAS_UID'], $aSP['USR_UID'], true, $appFields, $isSelfservice);
$taskNextDel = TaskPeer::retrieveByPK($aSP["TAS_UID"]); //Sub-Process $taskNextDel = TaskPeer::retrieveByPK($aSP["TAS_UID"]); //Sub-Process

View File

@@ -28,6 +28,7 @@ class pmDynaform
private $dataSources = null; private $dataSources = null;
private $databaseProviders = null; private $databaseProviders = null;
private $propertiesToExclude = array(); private $propertiesToExclude = array();
public static $prefixs = array("@@", "@#", "@%", "@?", "@$", "@=");
public function __construct($fields = array()) public function __construct($fields = array())
{ {
@@ -194,7 +195,7 @@ class pmDynaform
$fn($json, $key, $value); $fn($json, $key, $value);
} }
//set properties from trigger //set properties from trigger
$prefixs = array("@@", "@#", "@%", "@?", "@$", "@="); $prefixs = self::$prefixs;
if (is_string($value) && in_array(substr($value, 0, 2), $prefixs)) { if (is_string($value) && in_array(substr($value, 0, 2), $prefixs)) {
$triggerValue = substr($value, 2); $triggerValue = substr($value, 2);
if (isset($this->fields["APP_DATA"][$triggerValue])) { if (isset($this->fields["APP_DATA"][$triggerValue])) {

View File

@@ -2439,7 +2439,8 @@ class workspaceTools
CLI::logging("> Completed table LIST_PARTICIPATED_HISTORY\n"); CLI::logging("> Completed table LIST_PARTICIPATED_HISTORY\n");
} }
public function regenerateListParticipatedLast(){ public function regenerateListParticipatedLast()
{
$this->initPropel(true); $this->initPropel(true);
$query = 'INSERT INTO ' . $this->dbName . '.LIST_PARTICIPATED_LAST $query = 'INSERT INTO ' . $this->dbName . '.LIST_PARTICIPATED_LAST
( (
@@ -2478,45 +2479,74 @@ class workspaceTools
ACV.APP_PRO_TITLE, ACV.APP_PRO_TITLE,
ACV.APP_TAS_TITLE, ACV.APP_TAS_TITLE,
ACV.APP_STATUS, ACV.APP_STATUS,
PRE_USR.USR_UID AS DEL_PREVIOUS_USR_UID, DEL_PREVIOUS_USR_UID,
PRE_USR.USR_USERNAME AS DEL_PREVIOUS_USR_USERNAME, IFNULL(PRE_USR.USR_USERNAME, CUR_USR.USR_USERNAME) AS DEL_PREVIOUS_USR_USERNAME,
PRE_USR.USR_FIRSTNAME AS DEL_PREVIOUS_USR_FIRSTNAME, IFNULL(PRE_USR.USR_FIRSTNAME, CUR_USR.USR_FIRSTNAME) AS DEL_PREVIOUS_USR_USERNAME,
PRE_USR.USR_LASTNAME AS DEL_PREVIOUS_USR_LASTNAME, IFNULL(PRE_USR.USR_LASTNAME, CUR_USR.USR_LASTNAME) AS DEL_PREVIOUS_USR_USERNAME,
CUR_USR.USR_USERNAME AS DEL_CURRENT_USR_USERNAME, CUR_USR.USR_USERNAME AS DEL_CURRENT_USR_USERNAME,
CUR_USR.USR_FIRSTNAME AS DEL_CURRENT_USR_FIRSTNAME, CUR_USR.USR_FIRSTNAME AS DEL_CURRENT_USR_FIRSTNAME,
CUR_USR.USR_LASTNAME AS DEL_CURRENT_USR_LASTNAME, CUR_USR.USR_LASTNAME AS DEL_CURRENT_USR_LASTNAME,
ACV.DEL_DELEGATE_DATE AS DEL_DELEGATE_DATE, ACV.DEL_DELEGATE_DATE AS DEL_DELEGATE_DATE,
ACV.DEL_INIT_DATE AS DEL_INIT_DATE, ACV.DEL_INIT_DATE AS DEL_INIT_DATE,
ACV.DEL_TASK_DUE_DATE AS DEL_DUE_DATE, ACV.DEL_TASK_DUE_DATE AS DEL_DUE_DATE,
CURR_USER_ACV.APP_TAS_TITLE AS DEL_CURRENT_TAS_TITLE, ACV.APP_TAS_TITLE AS DEL_CURRENT_TAS_TITLE,
ACV.DEL_PRIORITY, ACV.DEL_PRIORITY,
ACV.DEL_THREAD_STATUS ACV.DEL_THREAD_STATUS
FROM FROM
(
SELECT
CASE WHEN ACV1.PREVIOUS_USR_UID = \'\' AND ACV1.DEL_INDEX = 1
THEN ACV1.USR_UID
ELSE ACV1.PREVIOUS_USR_UID END AS DEL_PREVIOUS_USR_UID,
ACV1.*
FROM ' . $this->dbName . '.APP_CACHE_VIEW ACV1
JOIN
(SELECT (SELECT
*, MAX(ACV_INT.DEL_INDEX) MAX_DEL_INDEX ACV_INT.APP_UID,
MAX(ACV_INT.DEL_INDEX) MAX_DEL_INDEX
FROM FROM
' . $this->dbName . '.APP_CACHE_VIEW ACV_INT ' . $this->dbName . '.APP_CACHE_VIEW ACV_INT
GROUP BY ACV_INT.APP_UID , ACV_INT.USR_UID) ACV GROUP BY
INNER JOIN ACV_INT.USR_UID,
(SELECT ACV_INT.APP_UID
ACV.APP_UID, ACV.USR_UID, ACV.APP_TAS_TITLE, ACV.PREVIOUS_USR_UID, ACV.DEL_INDEX ) ACV2
FROM ON ACV2.APP_UID = ACV1.APP_UID AND ACV2.MAX_DEL_INDEX = ACV1.DEL_INDEX
APP_CACHE_VIEW ACV ) ACV
INNER JOIN LEFT JOIN ' . $this->dbName . '.USERS PRE_USR ON ACV.PREVIOUS_USR_UID = PRE_USR.USR_UID
(SELECT LEFT JOIN ' . $this->dbName . '.USERS CUR_USR ON ACV.USR_UID = CUR_USR.USR_UID';
ACV_INT.APP_UID, MAX(ACV_INT.DEL_INDEX) DEL_INDEX
FROM
'.$this->dbName.'.APP_CACHE_VIEW ACV_INT
GROUP BY ACV_INT.APP_UID) LAST_ACV ON LAST_ACV.APP_UID = ACV.APP_UID
AND LAST_ACV.DEL_INDEX = ACV.DEL_INDEX) CURR_USER_ACV ON CURR_USER_ACV.APP_UID = ACV.APP_UID
LEFT JOIN
'.$this->dbName.'.USERS PRE_USR ON CURR_USER_ACV.PREVIOUS_USR_UID = PRE_USR.USR_UID
LEFT JOIN
'.$this->dbName.'.USERS CUR_USR ON CURR_USER_ACV.USR_UID = CUR_USR.USR_UID
';
$con = Propel::getConnection("workflow"); $con = Propel::getConnection("workflow");
$stmt = $con->createStatement(); $stmt = $con->createStatement();
$stmt->executeQuery($query); $stmt->executeQuery($query);
CLI::logging("> Inserted data into table LIST_PARTICIPATED_LAST\n");
$query = 'UPDATE ' . $this->dbName . '.LIST_PARTICIPATED_LAST LPL, (
SELECT
TASK.TAS_TITLE,
CUR_USER.APP_UID,
USERS.USR_UID,
USERS.USR_USERNAME,
USERS.USR_FIRSTNAME,
USERS.USR_LASTNAME
FROM (
SELECT
APP_UID,
TAS_UID,
DEL_INDEX,
USR_UID
FROM ' . $this->dbName . '.APP_DELEGATION
WHERE DEL_LAST_INDEX = 1
) CUR_USER
LEFT JOIN ' . $this->dbName . '.USERS ON CUR_USER.USR_UID = USERS.USR_UID
LEFT JOIN ' . $this->dbName . '.TASK ON CUR_USER.TAS_UID = TASK.TAS_UID) USERS_VALUES
SET
LPL.DEL_CURRENT_USR_USERNAME = USERS_VALUES.USR_USERNAME,
LPL.DEL_CURRENT_USR_FIRSTNAME = USERS_VALUES.USR_FIRSTNAME,
LPL.DEL_CURRENT_USR_LASTNAME = USERS_VALUES.USR_LASTNAME,
LPL.DEL_CURRENT_TAS_TITLE = USERS_VALUES.TAS_TITLE
WHERE LPL.APP_UID = USERS_VALUES.APP_UID';
$con = Propel::getConnection("workflow");
$stmt = $con->createStatement();
CLI::logging("> Updating the current users data on table LIST_PARTICIPATED_LAST\n");
$stmt->executeQuery($query);
CLI::logging("> Completed table LIST_PARTICIPATED_LAST\n"); CLI::logging("> Completed table LIST_PARTICIPATED_LAST\n");
} }

View File

@@ -216,7 +216,20 @@ class ListInbox extends BaseListInbox
} }
} }
public function newRow ($data, $delPreviusUsrUid, $isInitSubprocess = false, $dataPreviusApplication = array(), $isSelfService = false) /**
* Define the variables before created the row
*
* This method is used before create the new data
* we completed the information about some variables
* for create the record
*
* @param array $data
* @param string $delPreviusUsrUid Uid from the user previous
* @param boolean $isSelfService this value define if the case is Unassigned
* @return void
*
*/
public function newRow ($data, $delPreviusUsrUid, $isSelfService = false)
{ {
$removeList = true; $removeList = true;
if (isset($data['REMOVED_LIST'])) { if (isset($data['REMOVED_LIST'])) {

View File

@@ -99,7 +99,7 @@ class ListUnassigned extends BaseListUnassigned
public function newRow ($data, $delPreviusUsrUid) public function newRow ($data, $delPreviusUsrUid)
{ {
$data['DEL_PREVIOUS_USR_UID'] = $delPreviusUsrUid; $data['DEL_PREVIOUS_USR_UID'] = $delPreviusUsrUid;
$data['DEL_DUE_DATE'] = $data['DEL_TASK_DUE_DATE']; $data['DEL_DUE_DATE'] = isset($data['DEL_TASK_DUE_DATE']) ? $data['DEL_TASK_DUE_DATE'] : '';
$criteria = new Criteria(); $criteria = new Criteria();
$criteria->addSelectColumn( ApplicationPeer::APP_NUMBER ); $criteria->addSelectColumn( ApplicationPeer::APP_NUMBER );

View File

@@ -1,4 +1,5 @@
<?php <?php
sleep(1); sleep(1);
global $RBAC; global $RBAC;
if ($RBAC->userCanAccess('PM_FACTORY') == 1) { if ($RBAC->userCanAccess('PM_FACTORY') == 1) {
@@ -25,13 +26,24 @@ if ( $RBAC->userCanAccess('PM_FACTORY') == 1) {
} }
} }
if ($_FILES['form']['error'] == "0") { $fileName = $_FILES['form']['name'];
G::uploadFile( $_FILES['form']['tmp_name'], $sDirectory, $_FILES['form']['name'] ); $canUploadPhpFile = true;
$msg = "Uploaded (" . (round( (filesize( $sDirectory . $_FILES['form']['name'] ) / 1024) * 10 ) / 10) . " kb)"; $extension = pathinfo($fileName, PATHINFO_EXTENSION);
if (\Bootstrap::getDisablePhpUploadExecution() === 1 && $extension === 'php') {
$message = \G::LoadTranslation('THE_UPLOAD_OF_PHP_FILES_WAS_DISABLED');
\Bootstrap::registerMonologPhpUploadExecution('phpUpload', 550, $message, $fileName);
$canUploadPhpFile = false;
}
if ($_FILES['form']['error'] == "0" && $canUploadPhpFile) {
G::uploadFile($_FILES['form']['tmp_name'], $sDirectory, $fileName);
$msg = "Uploaded (" . (round((filesize($sDirectory . $fileName) / 1024) * 10) / 10) . " kb)";
$result = 1; $result = 1;
//echo $sDirectory.$_FILES['form']['name'];
} else { } else {
$msg = "Failed"; $msg = "Failed";
if ($canUploadPhpFile === false) {
$msg = $message;
}
$result = 0; $result = 0;
} }

View File

@@ -1,5 +1,5 @@
<?php <?php
ini_set( "soap.wsdl_cache_enabled", "0" ); //disabling WSDL cache ini_set("soap.wsdl_cache_enabled", 0); //disabling WSDL cache
define( 'WEB_SERVICE_VERSION', '2.0' ); define( 'WEB_SERVICE_VERSION', '2.0' );
@@ -1240,7 +1240,10 @@ function claimCase($params)
return $res; return $res;
} }
$server = new SoapServer($wsdl); $options = array(
'cache_wsdl' => WSDL_CACHE_NONE
);
$server = new SoapServer($wsdl, $options);
$server->addFunction("Login"); $server->addFunction("Login");
$server->addFunction("ProcessList"); $server->addFunction("ProcessList");

View File

@@ -1,14 +1,14 @@
<?php <?php
$filewsdl = PATH_METHODS . 'services' . PATH_SEP . 'pmos2.wsdl'; $filewsdl = PATH_METHODS . 'services' . PATH_SEP . 'pmos2.wsdl';
$content = file_get_contents($filewsdl); $content = file_get_contents($filewsdl);
$lang = defined( 'SYS_LANG' ) ? SYS_LANG : 'en';
$http = (isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http'; $http = G::is_https() ? 'https' : 'http';
$endpoint = $http . '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/sys' . SYS_SYS . '/' . $lang . '/classic/services/soap2'; $port = $_SERVER['SERVER_PORT'] === '80' ? '' : ':' . $_SERVER['SERVER_PORT'];
$lang = defined('SYS_LANG') ? SYS_LANG : 'en';
$endpoint = $http . '://' . $_SERVER['SERVER_NAME'] . $port . '/sys' . SYS_SYS . '/' . $lang . '/neoclassic/services/soap2';
$content = str_replace("___SOAP_ADDRESS___", $endpoint, $content); $content = str_replace("___SOAP_ADDRESS___", $endpoint, $content);
header("Content-Type: application/xml;"); header("Content-Type: application/xml;");
print $content; print $content;

View File

@@ -1698,19 +1698,29 @@ class Cases
if (isset($field['type'])) { if (isset($field['type'])) {
if ($field['type'] != 'form') { if ($field['type'] != 'form') {
if (isset($field['name']) && isset($appData[$field['name']])) { foreach ($field as &$val) {
if (is_string($val) && in_array(substr($val, 0, 2), \pmDynaform::$prefixs)) {
$val = substr($val, 2);
}
}
foreach ($appData as $key => $valueKey) {
if (in_array($key, $field, true) != false) {
$keyname = array_search($key, $field);
if (isset($field['dataType']) && $field['dataType'] != 'grid') { if (isset($field['dataType']) && $field['dataType'] != 'grid') {
$caseVariable[$field['name']] = $appData[$field['name']]; $caseVariable[$field[$keyname]] = $appData[$field[$keyname]];
if (isset($appData[$field['name'] . '_label'])) { if (isset($appData[$field[$keyname] . '_label'])) {
$caseVariable[$field['name'] . '_label'] = $appData[$field['name'] . '_label']; $caseVariable[$field[$keyname] . '_label'] = $appData[$field[$keyname] . '_label'];
} else { } else {
$caseVariable[$field['name'] . '_label'] = ''; $caseVariable[$field[$keyname] . '_label'] = '';
} }
} else { } else {
$caseVariable[$field['name']] = $appData[$field['name']]; $caseVariable[$field[$keyname]] = $appData[$field[$keyname]];
}
break;
} }
} }
} else { } else {
$caseVariableAux = $this->__getFieldsAndValuesByDynaFormAndAppData($field, $appData, $caseVariable); $caseVariableAux = $this->__getFieldsAndValuesByDynaFormAndAppData($field, $appData, $caseVariable);
$caseVariable = array_merge($caseVariable, $caseVariableAux); $caseVariable = array_merge($caseVariable, $caseVariableAux);

View File

@@ -84,12 +84,13 @@ class FilesManager
} }
} }
foreach ($aFiles as $aFile) { foreach ($aFiles as $aFile) {
$arrayFileUid = $this->getFileManagerUid($sDirectory.$aFile['FILE']); $arrayFileUid = $this->getFileManagerUid($sDirectory.$aFile['FILE'], $aFile['FILE']);
$fcontent = ""; $fcontent = "";
if ($getContent === true) { if ($getContent === true) {
$fcontent = file_get_contents($sDirectory . $aFile['FILE']); $fcontent = file_get_contents($sDirectory . $aFile['FILE']);
} }
$fileUid = $arrayFileUid["PRF_UID"]; $fileUid = isset($arrayFileUid["PRF_UID"]) ? $arrayFileUid["PRF_UID"] : '';
$derivationScreen = isset($arrayFileUid["DERIVATION_SCREEN_TPL"]) ? true : false;
if ($fileUid != null) { if ($fileUid != null) {
$oProcessFiles = \ProcessFilesPeer::retrieveByPK($fileUid); $oProcessFiles = \ProcessFilesPeer::retrieveByPK($fileUid);
$editable = $oProcessFiles->getPrfEditable(); $editable = $oProcessFiles->getPrfEditable();
@@ -107,7 +108,8 @@ class FilesManager
'prf_editable' => $editable, 'prf_editable' => $editable,
'prf_create_date' => $oProcessFiles->getPrfCreateDate(), 'prf_create_date' => $oProcessFiles->getPrfCreateDate(),
'prf_update_date' => $oProcessFiles->getPrfUpdateDate(), 'prf_update_date' => $oProcessFiles->getPrfUpdateDate(),
'prf_content' => $fcontent); 'prf_content' => $fcontent,
'prf_derivation_screen' => $derivationScreen);
} else { } else {
$extention = end(explode(".", $aFile['FILE'])); $extention = end(explode(".", $aFile['FILE']));
if ($extention == 'docx' || $extention == 'doc' || $extention == 'html' || $extention == 'php' || $extention == 'jsp' if ($extention == 'docx' || $extention == 'doc' || $extention == 'html' || $extention == 'php' || $extention == 'jsp'
@@ -125,7 +127,8 @@ class FilesManager
'prf_editable' => $editable, 'prf_editable' => $editable,
'prf_create_date' => '', 'prf_create_date' => '',
'prf_update_date' => '', 'prf_update_date' => '',
'prf_content' => $fcontent); 'prf_content' => $fcontent,
'prf_derivation_screen' => false);
} }
} }
return $aTheFiles; return $aTheFiles;
@@ -389,13 +392,14 @@ class FilesManager
} }
/** /**
* Get data of unique ids of a file * Get data of unique ids of a file and if the template is used in a derivation screen
* *
* @param string $path * @param string $path
* @param string $fileName the name of template
* *
* return array * return array
*/ */
public function getFileManagerUid($path) public function getFileManagerUid($path, $fileName = '')
{ {
try { try {
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
@@ -406,11 +410,25 @@ class FilesManager
$baseName2 = $path[count($path)-2]."/".$path[count($path)-1]; $baseName2 = $path[count($path)-2]."/".$path[count($path)-1];
$criteria = new \Criteria("workflow"); $criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_UID); $criteria->addSelectColumn(\ProcessFilesPeer::PRF_UID);
$criteria->addSelectColumn(\ProcessPeer::PRO_DERIVATION_SCREEN_TPL);
$criteria->addSelectColumn(\TaskPeer::TAS_DERIVATION_SCREEN_TPL);
$criteria->addJoin(\ProcessFilesPeer::PRO_UID, \ProcessPeer::PRO_UID);
$criteria->addJoin(\ProcessPeer::PRO_UID, \TaskPeer::PRO_UID);
$criteria->add( $criteria->getNewCriterion( \ProcessFilesPeer::PRF_PATH, '%' . $baseName . '%', \Criteria::LIKE )->addOr( $criteria->getNewCriterion( \ProcessFilesPeer::PRF_PATH, '%' . $baseName2 . '%', \Criteria::LIKE ))); $criteria->add( $criteria->getNewCriterion( \ProcessFilesPeer::PRF_PATH, '%' . $baseName . '%', \Criteria::LIKE )->addOr( $criteria->getNewCriterion( \ProcessFilesPeer::PRF_PATH, '%' . $baseName2 . '%', \Criteria::LIKE )));
$rsCriteria = \ProcessFilesPeer::doSelectRS($criteria); $rsCriteria = \ProcessFilesPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC); $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$rsCriteria->next(); $row = array();
return $rsCriteria->getRow(); while ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
if (!empty($row['PRO_DERIVATION_SCREEN_TPL']) && $row['PRO_DERIVATION_SCREEN_TPL'] == $fileName) {
$row['DERIVATION_SCREEN_TPL'] = true;
return $row;
} elseif (!empty($row['TAS_DERIVATION_SCREEN_TPL']) && $row['TAS_DERIVATION_SCREEN_TPL'] == $fileName) {
$row['DERIVATION_SCREEN_TPL'] = true;
return $row;
}
}
return $row;
} catch (\Exception $e) { } catch (\Exception $e) {
throw $e; throw $e;
} }

View File

@@ -68,19 +68,12 @@ class Light
$task->setFormatFieldNameInUppercase(false); $task->setFormatFieldNameInUppercase(false);
$task->setArrayParamException(array("taskUid" => "act_uid", "stepUid" => "step_uid")); $task->setArrayParamException(array("taskUid" => "act_uid", "stepUid" => "step_uid"));
$webEntryEvent = new \ProcessMaker\BusinessModel\WebEntryEvent();
$arrayWebEntryEvent = array();
$allWebEntryEvents = $webEntryEvent->getAllWebEntryEvents();
foreach ($allWebEntryEvents as $webEntryEvents) {
$arrayWebEntryEvent[] = $webEntryEvents["ACT_UID"];
}
$step = new \ProcessMaker\Services\Api\Project\Activity\Step(); $step = new \ProcessMaker\Services\Api\Project\Activity\Step();
$response = array(); $response = array();
foreach ($processList as $key => $processInfo) { foreach ($processList as $key => $processInfo) {
$tempTreeChildren = array (); $tempTreeChildren = array ();
foreach ($processList[$key] as $keyChild => $processInfoChild) { foreach ($processList[$key] as $keyChild => $processInfoChild) {
if (!in_array($processInfoChild['uid'], $arrayWebEntryEvent) && in_array($processInfoChild['pro_uid'], $bpmnProjects)) { if (in_array($processInfoChild['pro_uid'], $bpmnProjects)) {
$tempTreeChild['text'] = $keyChild; //ellipsis ( $keyChild, 50 ); $tempTreeChild['text'] = $keyChild; //ellipsis ( $keyChild, 50 );
$tempTreeChild['processId'] = $processInfoChild['pro_uid']; $tempTreeChild['processId'] = $processInfoChild['pro_uid'];
$tempTreeChild['taskId'] = $processInfoChild['uid']; $tempTreeChild['taskId'] = $processInfoChild['uid'];

View File

@@ -16,55 +16,40 @@
<script src="/js/jquery/jquery-1.3.2.min.js" type="text/javascript"></script> <script src="/js/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="/js/jquery/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script> <script src="/js/jquery/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/jquery/ajaxupload.3.6.js"></script> <script type="text/javascript" src="/js/jquery/ajaxupload.3.6.js"></script>
<script type= "text/javascript"> <script type= "text/javascript">
var cClient = window.parent.getBrowserClient(); var cClient = window.parent.getBrowserClient();
$(document).ready(function () { $(document).ready(function () {
/* example 1 */
var button = $('#button1'), interval; var button = $('#button1'), interval;
new AjaxUpload(button, { new AjaxUpload(button, {
action: 'processes_doUpload', // I disabled uploads in this example for security reasons action: 'processes_doUpload', // I disabled uploads in this example for security reasons
//action: 'upload.htm',
name: 'form', name: 'form',
onSubmit: function (file, ext) { onSubmit: function (file, ext) {
if (cClient.browser != 'msie') { if (cClient.browser != 'msie') {
$("#uxmsg").html('Uploading...'); $("#uxmsg").html('Uploading...');
$("#uxmsg").fadeIn(2000); $("#uxmsg").fadeIn(2000);
//this.disable();
$('#button1').attr('disabled', true); $('#button1').attr('disabled', true);
} else { } else {
// document.getElementById("uxfiles").style.display = 'block';
//$("#uxmsg").html('Uploading....');
document.getElementById("uxfiles").innerHTML = 'Uploading...'; document.getElementById("uxfiles").innerHTML = 'Uploading...';
//document.getElementById("uxfiles").style.display = 'block';
} }
if (cClient.browser != 'msie') { if (cClient.browser != 'msie') {
interval = window.setInterval(function () { interval = window.setInterval(function () {
var text = button.text(); var text = button.text();
if (text.length < 13) { if (text.length < 13) {
button.text(text + '.'); button.text(text + '.');
} else { } else {
button.text('Uploading'); button.text('Uploading');
} }
}, 200); }, 200);
} }
}, },
onComplete: function (file, response) { onComplete: function (file, response) {
parent.xReaload(); parent.xReaload();
if (file.length > 24) {
if(file.length>24) file = file.substr(0,24) + '..'; file = file.substr(0, 24) + '..';
}
resp = eval("(" + response + ")"); resp = eval("(" + response + ")");
xcolor = resp.result? 'green': red; xcolor = resp.result ? 'green' : 'red';
if (cClient.browser != 'msie') { if (cClient.browser != 'msie') {
$("#uxmsg").fadeOut(1500, function () { $("#uxmsg").fadeOut(1500, function () {
$("#uxmsg").fadeIn(1100); $("#uxmsg").fadeIn(1100);
@@ -72,24 +57,14 @@ $(document).ready(function(){
}); });
} else { } else {
document.getElementById("uxfiles").innerHTML = '<font color=black>' + file + '</font> <font color=' + xcolor + '>' + resp.msg + '<font>'; document.getElementById("uxfiles").innerHTML = '<font color=black>' + file + '</font> <font color=' + xcolor + '>' + resp.msg + '<font>';
// document.getElementById("uxfiles").style.display = 'block';
} }
button.text('Upload++'); button.text('Upload++');
window.clearInterval(interval); window.clearInterval(interval);
document.getElementById('button1').disabled = false; document.getElementById('button1').disabled = false;
$('#button1').attr('disabled', false); $('#button1').attr('disabled', false);
//alert(document.getElementById('button1').id);
//parent.xReaload();
//setTimeout('xclear()', 4000);
} }
}); });
}); });
var xclear = function () { var xclear = function () {
if (cClient.browser != 'msie') { if (cClient.browser != 'msie') {
$("#uxmsg").fadeOut(1500); $("#uxmsg").fadeOut(1500);
@@ -97,8 +72,6 @@ var xclear = function(){
$("#uxfiles").html(''); $("#uxfiles").html('');
} }
} }
</script> </script>
</head> </head>
<body> <body>

View File

@@ -96,16 +96,34 @@ function ws_parser($result) {
return $rows; return $rows;
} }
function ws_open() { /**
* Initiates a connection using the SoapClient object, to start a web services
* session in ProcessMaker.
*
* @global type $sessionId
* @global SoapClient $client
* @return int
* @throws Exception
*/
function ws_open()
{
global $sessionId; global $sessionId;
global $client; global $client;
$endpoint = WS_WSDL_URL; $endpoint = WS_WSDL_URL;
$sessionId = ''; $sessionId = '';
$client = new SoapClient( $streamContext = stream_context_create(array(
$endpoint, 'ssl' => array(
['stream_context' => stream_context_create(['ssl' => ['verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true]])] 'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
))
); );
$options = array(
"cache_wsdl" => WSDL_CACHE_NONE,
"stream_context" => $streamContext
);
$client = new SoapClient($endpoint, $options);
$user = WS_USER_ID; $user = WS_USER_ID;
$pass = WS_USER_PASS; $pass = WS_USER_PASS;