Merge branch 'master' into michelangelo
Conflicts: .travis.yml
This commit is contained in:
@@ -340,21 +340,22 @@ class G
|
||||
if ($file == $dirName . '/.' || $file == $dirName . '/..') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (is_dir( $file )) {
|
||||
G::rm_dir( $file );
|
||||
|
||||
if (strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN') {
|
||||
$dirNameWin = str_replace( '/', '\\', $dirName );
|
||||
exec( 'DEL /F /S /Q ' . $dirNameWin . '', $res );
|
||||
exec( 'RD /S /Q ' . $dirNameWin . '', $res );
|
||||
} else {
|
||||
@rmdir( $file );
|
||||
}
|
||||
|
||||
} else {
|
||||
@unlink( $file );
|
||||
}
|
||||
}
|
||||
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === "WIN") {
|
||||
$dirName = str_replace("/", "\\", $dirName);
|
||||
|
||||
exec("DEL /F /S /Q " . $dirName . "", $res);
|
||||
exec("RD /S /Q " . $dirName . "", $res);
|
||||
} else {
|
||||
@rmdir($dirName);
|
||||
}
|
||||
} else {
|
||||
@unlink( $dirName );
|
||||
}
|
||||
|
||||
@@ -665,37 +665,6 @@ class classwsBaseTest extends PHPUnit_Framework_TestCase
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers wsBase::importProcessFromLibrary
|
||||
* @todo Implement testimportProcessFromLibrary().
|
||||
*/
|
||||
public function testimportProcessFromLibrary()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('importProcessFromLibrary', $methods ), 'exists method importProcessFromLibrary' );
|
||||
$r = new ReflectionMethod('wsBase', 'importProcessFromLibrary');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'processId');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'version');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'importOption');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'usernameLibrary');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'passwordLibrary');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers wsBase::getCaseNotes
|
||||
* @todo Implement testgetCaseNotes().
|
||||
|
||||
@@ -2940,137 +2940,6 @@ class wsBase
|
||||
* @param string passwordLibrary : The password to obtain access to the ProcessMaker library.
|
||||
* @return $eturns will return an object
|
||||
*/
|
||||
public function importProcessFromLibrary ($processId, $version = '', $importOption = '', $usernameLibrary = '', $passwordLibrary = '')
|
||||
{
|
||||
try {
|
||||
G::LoadClass( 'processes' );
|
||||
//$versionReq = $_GET['v'];
|
||||
//. (isset($_GET['s']) ? '&s=' . $_GET['s'] : '')
|
||||
$ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
$oProcesses = new Processes();
|
||||
$oProcesses->ws_open_public();
|
||||
$oProcess = $oProcesses->ws_processGetData( $processId );
|
||||
|
||||
if ($oProcess->status_code != 0) {
|
||||
throw (new Exception( $oProcess->message ));
|
||||
}
|
||||
|
||||
$privacy = $oProcess->privacy;
|
||||
|
||||
$strSession = '';
|
||||
|
||||
if ($privacy != 'FREE') {
|
||||
global $sessionId;
|
||||
$antSession = $sessionId;
|
||||
$oProcesses->ws_open( $usernameLibrary, $passwordLibrary );
|
||||
$strSession = "&s=" . $sessionId;
|
||||
$sessionId = $antSession;
|
||||
}
|
||||
|
||||
//downloading the file
|
||||
$localPath = PATH_DOCUMENT . 'input' . PATH_SEP;
|
||||
G::mk_dir( $localPath );
|
||||
$newfilename = G::GenerateUniqueId() . '.pm';
|
||||
|
||||
$downloadUrl = PML_DOWNLOAD_URL . '?id=' . $processId . $strSession;
|
||||
|
||||
$oProcess = new Processes();
|
||||
$oProcess->downloadFile( $downloadUrl, $localPath, $newfilename );
|
||||
|
||||
//getting the ProUid from the file recently downloaded
|
||||
$oData = $oProcess->getProcessData( $localPath . $newfilename );
|
||||
|
||||
if (is_null( $oData )) {
|
||||
$data['DOWNLOAD_URL'] = $downloadUrl;
|
||||
$data['LOCAL_PATH'] = $localPath;
|
||||
$data['NEW_FILENAME'] = $newfilename;
|
||||
|
||||
throw new Exception( G::loadTranslation( 'ID_ERROR_URL_PROCESS_INVALID', SYS_LANG, $data ) );
|
||||
}
|
||||
|
||||
$sProUid = $oData->process['PRO_UID'];
|
||||
$oData->process['PRO_UID_OLD'] = $sProUid;
|
||||
|
||||
//if the process exists, we need to check the $importOption to and re-import if the user wants,
|
||||
if ($oProcess->processExists( $sProUid )) {
|
||||
//Update the current Process, overwriting all tasks and steps
|
||||
if ($importOption == 1) {
|
||||
$oProcess->updateProcessFromData( $oData, $localPath . $newfilename );
|
||||
//delete the xmlform cache
|
||||
|
||||
|
||||
if (file_exists( PATH_OUTTRUNK . 'compiled' . PATH_SEP . 'xmlform' . PATH_SEP . $sProUid )) {
|
||||
$oDirectory = dir( PATH_OUTTRUNK . 'compiled' . PATH_SEP . 'xmlform' . PATH_SEP . $sProUid );
|
||||
|
||||
while ($sObjectName = $oDirectory->read()) {
|
||||
if (($sObjectName != '.') && ($sObjectName != '..')) {
|
||||
$strAux = PATH_OUTTRUNK . 'compiled' . PATH_SEP . 'xmlform' . PATH_SEP;
|
||||
$strAux = $strAux . $sProUid . PATH_SEP . $sObjectName;
|
||||
|
||||
unlink( $strAux );
|
||||
}
|
||||
}
|
||||
|
||||
$oDirectory->close();
|
||||
}
|
||||
|
||||
$sNewProUid = $sProUid;
|
||||
}
|
||||
|
||||
//Disable current Process and create a new version of the Process
|
||||
if ($importOption == 2) {
|
||||
$oProcess->disablePreviousProcesses( $sProUid );
|
||||
$sNewProUid = $oProcess->getUnusedProcessGUID();
|
||||
$oProcess->setProcessGuid( $oData, $sNewProUid );
|
||||
$oProcess->setProcessParent( $oData, $sProUid );
|
||||
$oData->process['PRO_TITLE'] = "New - " . $oData->process['PRO_TITLE'] . ' - ' . date( 'M d, H:i' );
|
||||
$oProcess->renewAll( $oData );
|
||||
$oProcess->createProcessFromData( $oData, $localPath . $newfilename );
|
||||
}
|
||||
|
||||
//Create a completely new Process without change the current Process
|
||||
if ($importOption == 3) {
|
||||
//krumo ($oData); die;
|
||||
$sNewProUid = $oProcess->getUnusedProcessGUID();
|
||||
$oProcess->setProcessGuid( $oData, $sNewProUid );
|
||||
|
||||
$strAux = "Copy of - " . $oData->process['PRO_TITLE'] . ' - ' . date( 'M d, H:i' );
|
||||
|
||||
$oData->process['PRO_TITLE'] = $strAux;
|
||||
$oProcess->renewAll( $oData );
|
||||
$oProcess->createProcessFromData( $oData, $localPath . $newfilename );
|
||||
}
|
||||
|
||||
if ($importOption != 1 && $importOption != 2 && $importOption != 3) {
|
||||
throw new Exception( G::loadTranslation( 'ID_PROCESS_ALREADY_IN_SYSTEM' ) );
|
||||
}
|
||||
}
|
||||
|
||||
//finally, creating the process if the process doesn't exist
|
||||
if (! $oProcess->processExists( $processId )) {
|
||||
$oProcess->createProcessFromData( $oData, $localPath . $newfilename );
|
||||
}
|
||||
|
||||
//show the info after the imported process
|
||||
$oProcess = new Processes();
|
||||
$oProcess->ws_open_public();
|
||||
$processData = $oProcess->ws_processGetData( $processId );
|
||||
|
||||
$result->status_code = 0;
|
||||
$result->message = G::loadTranslation( 'ID_COMMAND_EXECUTED_SUCCESSFULLY' );
|
||||
$result->timestamp = date( 'Y-m-d H:i:s' );
|
||||
$result->processId = $processId;
|
||||
$result->processTitle = $processData->title;
|
||||
$result->category = (isset( $processData->category ) ? $processData->category : '');
|
||||
$result->version = $processData->version;
|
||||
|
||||
return $result;
|
||||
} catch (Exception $e) {
|
||||
$result = new wsResponse( 100, $e->getMessage() );
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCaseNotes ($applicationID, $userUid = '')
|
||||
{
|
||||
|
||||
@@ -104,6 +104,29 @@ class Content extends BaseContent
|
||||
return ($defaultLang);
|
||||
}
|
||||
|
||||
/*
|
||||
* Change the value of all records
|
||||
* @param string $ConCategory
|
||||
* @param string $ConParent
|
||||
* @param string $ConId
|
||||
* @param string $ConValue
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
public function updateEqualValue ($ConCategory, $ConParent, $ConId, $ConValue)
|
||||
{
|
||||
$con = Propel::getConnection('workflow');
|
||||
$c1 = new Criteria('workflow');
|
||||
$c1->add(ContentPeer::CON_CATEGORY, $ConCategory);
|
||||
$c1->add(ContentPeer::CON_PARENT, $ConParent);
|
||||
$c1->add(ContentPeer::CON_ID, $ConId);
|
||||
|
||||
// update set
|
||||
$c2 = new Criteria('workflow');
|
||||
$c2->add(ContentPeer::CON_VALUE, $ConValue);
|
||||
BasePeer::doUpdate($c1, $c2, $con);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the content row and the Save automatically the row for the destination language
|
||||
* @param string $ConCategory
|
||||
@@ -174,25 +197,27 @@ class Content extends BaseContent
|
||||
|
||||
if (is_null( $con )) {
|
||||
$con = new Content();
|
||||
$con->setConCategory( $ConCategory );
|
||||
if ($con->getConParent() != $ConParent) {
|
||||
$con->setConParent( $ConParent );
|
||||
}
|
||||
$con->setConId( $ConId );
|
||||
$con->setConLang( $ConLang );
|
||||
$con->setConValue( $ConValue );
|
||||
if ($con->validate()) {
|
||||
$res = $con->save();
|
||||
return $res;
|
||||
} else {
|
||||
$e = new Exception( "Error in addcontent, the row $ConCategory, $ConParent, $ConId, $ConLang is not Valid" );
|
||||
throw ($e);
|
||||
}
|
||||
} else {
|
||||
if ($con->getConParent() == $ConParent && $con->getConCategory() == $ConCategory && $con->getConValue() == $ConValue && $con->getConLang() == $ConLang && $con->getConId() == $ConId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$con->setConCategory( $ConCategory );
|
||||
if ($con->getConParent() != $ConParent) {
|
||||
$con->setConParent( $ConParent );
|
||||
}
|
||||
$con->setConId( $ConId );
|
||||
$con->setConLang( $ConLang );
|
||||
$con->setConValue( $ConValue );
|
||||
if ($con->validate()) {
|
||||
$res = $con->save();
|
||||
return $res;
|
||||
} else {
|
||||
$e = new Exception( "Error in addcontent, the row $ConCategory, $ConParent, $ConId, $ConLang is not Valid" );
|
||||
throw ($e);
|
||||
}
|
||||
Content::updateEqualValue( $ConCategory, $ConParent, $ConId, $ConValue );
|
||||
return true;
|
||||
} catch (Exception $e) {
|
||||
throw ($e);
|
||||
}
|
||||
|
||||
@@ -173,13 +173,16 @@ class StepTrigger extends BaseStepTrigger
|
||||
}
|
||||
}
|
||||
|
||||
public function getNextPosition ($sStepUID, $sType)
|
||||
public function getNextPosition ($sStepUID, $sType, $sTaskId = '')
|
||||
{
|
||||
try {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( '(COUNT(*) + 1) AS POSITION' );
|
||||
$oCriteria->add( StepTriggerPeer::STEP_UID, $sStepUID );
|
||||
$oCriteria->add( StepTriggerPeer::ST_TYPE, $sType );
|
||||
if ($sTaskId != '') {
|
||||
$oCriteria->add( StepTriggerPeer::TAS_UID , $sTaskId );
|
||||
}
|
||||
$oDataset = StepTriggerPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
@@ -190,6 +193,44 @@ class StepTrigger extends BaseStepTrigger
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param type $sStepUID
|
||||
* @param type $sTaskUID
|
||||
* @param type $sType
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function orderPosition ($sStepUID, $sTaskUID, $sType)
|
||||
{
|
||||
try {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( StepTriggerPeer::STEP_UID, $sStepUID );
|
||||
$oCriteria->add( StepTriggerPeer::TAS_UID, $sTaskUID );
|
||||
$oCriteria->add( StepTriggerPeer::ST_TYPE, $sType );
|
||||
$oCriteria->addAscendingOrderByColumn(StepTriggerPeer::ST_POSITION);
|
||||
$oDataset = StepTriggerPeer::doSelectRS( $oCriteria );
|
||||
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
if ((int)$aRow['ST_POSITION'] > 1 ) {
|
||||
$rowNro = 1;
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$oStep = StepTriggerPeer::retrieveByPK( $aRow['STEP_UID'], $aRow['TAS_UID'], $aRow['TRI_UID'], $aRow['ST_TYPE'] );
|
||||
$oStep->setStPosition( $rowNro );
|
||||
$oStep->save();
|
||||
$oDataset->next();
|
||||
$rowNro++;
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception $oException) {
|
||||
throw $oException;
|
||||
}
|
||||
}
|
||||
|
||||
public function reOrder ($sStepUID, $sTaskUID, $sType, $iPosition)
|
||||
{
|
||||
try {
|
||||
@@ -199,6 +240,7 @@ class StepTrigger extends BaseStepTrigger
|
||||
$oCriteria->add( StepTriggerPeer::ST_TYPE, $sType );
|
||||
$oCriteria->add( StepTriggerPeer::ST_POSITION, $iPosition, '>' );
|
||||
$oDataset = StepTriggerPeer::doSelectRS( $oCriteria );
|
||||
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
|
||||
@@ -219,7 +219,7 @@ function downloadDoc($alfrescoServerUrl, $pathFile, $pathFolder, $user, $pwd, $m
|
||||
$alfresco_url = "$alfrescoServerUrl" . PATH_SEP . "s" . PATH_SEP . "cmis" . PATH_SEP . "p" . PATH_SEP . $mainFolder . PATH_SEP . "$pathFile";
|
||||
$alfresco_exec = RestClient::get($alfresco_url, $user, $pwd, 'application/atom+xml');
|
||||
$sXmlArray = $alfresco_exec->getResponse();
|
||||
$sXmlArray = eregi_replace("[\n|\r|\n\r]", '', $sXmlArray);
|
||||
$sXmlArray = preg_replace("[\n|\r|\n\r]", '', $sXmlArray);
|
||||
$xmlObject = simplexml_load_string((string) $sXmlArray);
|
||||
|
||||
if (!isset($xmlObject->content)) {
|
||||
@@ -231,7 +231,7 @@ function downloadDoc($alfrescoServerUrl, $pathFile, $pathFolder, $user, $pwd, $m
|
||||
$linkContent = (string) $xmlObject->content->attributes()->src;
|
||||
$alfresco_exec = RestClient::get($linkContent, $user, $pwd, 'application/atom+xml');
|
||||
$sXmlArray = $alfresco_exec->getResponse();
|
||||
$content = eregi_replace("[\n|\r|\n\r]", '', $sXmlArray);
|
||||
$content = preg_replace("[\n|\r|\n\r]", '', $sXmlArray);
|
||||
|
||||
if ('/' != substr($pathFolder, -1)) {
|
||||
$pathFolder .= '/';
|
||||
|
||||
@@ -35,8 +35,8 @@ class Installer extends Controller
|
||||
|
||||
public function index ($httpData)
|
||||
{
|
||||
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
||||
if ($partnerFlag){
|
||||
|
||||
if ((strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') && (file_exists($this->path_shared . 'partner.info'))){
|
||||
$this->includeExtJS( 'installer/stopInstall');
|
||||
$this->setView( 'installer/mainStopInstall' );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
@@ -986,7 +986,7 @@ function uploadDocument()
|
||||
Ext.getCmp("uploadform").getForm().submit({
|
||||
//reset: true,
|
||||
reset: false,
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success: function(form, action) {
|
||||
|
||||
datastore.reload();
|
||||
@@ -1741,7 +1741,7 @@ function newFolder()
|
||||
Ext.getCmp("simpleform").getForm().submit({
|
||||
//reset: true,
|
||||
reset: false,
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success: function(form, action) {
|
||||
statusBarMessage(action.result.message, false, true);
|
||||
try{
|
||||
|
||||
@@ -58,7 +58,7 @@ function array_sort ($array, $on, $order = SORT_ASC, $query = '')
|
||||
|
||||
|
||||
$appUid = isset( $_POST['application'] ) ? $_POST['application'] : '';
|
||||
// $processUid = isset($_POST['process']) ? $_POST['process'] : '';
|
||||
//$processUid = isset($_POST['process']) ? $_POST['process'] : '';
|
||||
$TaskUid = isset( $_POST['task'] ) ? $_POST['task'] : '';
|
||||
$sReassignFromUser = isset( $_POST['currentUser'] ) ? $_POST['currentUser'] : '';
|
||||
|
||||
@@ -71,12 +71,82 @@ $aUsersInvolved = Array();
|
||||
|
||||
$ConfEnv = $oConf->getFormats();
|
||||
$rows = $oCases->getUsersToReassign($TaskUid, $sReassignFromUser);
|
||||
|
||||
foreach($rows as $row) {
|
||||
$flagSupervisors = false;
|
||||
foreach ($rows as $row) {
|
||||
$sCaseUser = G::getFormatUserList( $ConfEnv['format'], $row );
|
||||
$aUsersInvolved[] = array ('userUid' => $row['USR_UID'], 'userFullname' => $sCaseUser);
|
||||
if ($row['USR_UID'] == $_SESSION['USER_LOGGED']) {
|
||||
$flagSupervisors = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$flagSupervisors) {
|
||||
G::LoadClass('application');
|
||||
$application = new Application();
|
||||
$appData = $application->Load($appUid);
|
||||
|
||||
$aResp =array();
|
||||
$sProcessUID =$appData ['PRO_UID'];
|
||||
|
||||
// Users
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::PU_UID);
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::USR_UID);
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::PRO_UID);
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_EMAIL);
|
||||
$oCriteria->addJoin(ProcessUserPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
|
||||
$oCriteria->add(ProcessUserPeer::PU_TYPE, 'SUPERVISOR');
|
||||
$oCriteria->add(ProcessUserPeer::PRO_UID, $sProcessUID);
|
||||
$oCriteria->add(ProcessUserPeer::USR_UID, $_SESSION['USER_LOGGED']);
|
||||
$oCriteria->addAscendingOrderByColumn(UsersPeer::USR_FIRSTNAME);
|
||||
$oDataset = ProcessUserPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$flagSupervisors = false;
|
||||
|
||||
if ($oDataset->next()) {
|
||||
$aRow = $oDataset->getRow();
|
||||
$supervisors = G::getFormatUserList( $ConfEnv['format'], $aRow );
|
||||
$aUsersInvolved[] = array ('userUid' => $aRow['USR_UID'], 'userFullname' => $supervisors);
|
||||
$flagSupervisors = true;
|
||||
}
|
||||
|
||||
if (!$flagSupervisors) {
|
||||
// Groups
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::PU_UID);
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::USR_UID);
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::PRO_UID);
|
||||
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_UID);
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_EMAIL);
|
||||
|
||||
$oCriteria->addJoin(ProcessUserPeer::USR_UID, GroupUserPeer::GRP_UID, Criteria::LEFT_JOIN);
|
||||
$oCriteria->addJoin(GroupUserPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
|
||||
|
||||
$oCriteria->add(ProcessUserPeer::PU_TYPE, 'GROUP_SUPERVISOR');
|
||||
$oCriteria->add(ProcessUserPeer::PRO_UID, $sProcessUID);
|
||||
$oCriteria->add(GroupUserPeer::USR_UID, $_SESSION['USER_LOGGED']);
|
||||
|
||||
$oDataset = ProcessUserPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
if ($oDataset->next()) {
|
||||
$aRow = $oDataset->getRow();
|
||||
$supervisors = G::getFormatUserList( $ConfEnv['format'], $aRow );
|
||||
$aUsersInvolved[] = array ('userUid' => $aRow['USR_UID'], 'userFullname' => $supervisors);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// $oTmp = new stdClass();
|
||||
// $oTmp->items = $aUsersInvolved;
|
||||
$result = array ();
|
||||
|
||||
@@ -740,30 +740,7 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="importProcessFromLibraryRequest">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="sessionId" type="xs:string"/>
|
||||
<xs:element name="processId" type="xs:string"/>
|
||||
<xs:element name="version" minOccurs="0" type="xs:string"/>
|
||||
<xs:element name="importOption" minOccurs="0" type="xs:string"/>
|
||||
<xs:element name="usernameLibrary" minOccurs="0" type="xs:string"/>
|
||||
<xs:element name="passwordLibrary" minOccurs="0" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="importProcessFromLibraryResponse">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="status_code" type="xs:integer"/>
|
||||
<xs:element name="message" type="xs:string"/>
|
||||
<xs:element name="processId" minOccurs="0" type="xs:string"/>
|
||||
<xs:element name="processTitle" minOccurs="0" type="xs:string"/>
|
||||
<xs:element name="category" minOccurs="0" type="xs:string"/>
|
||||
<xs:element name="version" minOccurs="0" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:complexType name="getCaseNotesStruct">
|
||||
<xs:sequence>
|
||||
<xs:element name="full_name" type="xs:string"/>
|
||||
@@ -1085,12 +1062,6 @@
|
||||
<message name="removeDocumentResponse">
|
||||
<part name="parameters" element="xs0:removeDocumentResponse"/>
|
||||
</message>
|
||||
<message name="importProcessFromLibraryRequest">
|
||||
<part name="parameters" element="xs0:importProcessFromLibraryRequest"/>
|
||||
</message>
|
||||
<message name="importProcessFromLibraryResponse">
|
||||
<part name="parameters" element="xs0:importProcessFromLibraryResponse"/>
|
||||
</message>
|
||||
<message name="getCaseNotesRequest">
|
||||
<part name="parameters" element="xs0:getCaseNotesRequest"/>
|
||||
</message>
|
||||
@@ -1264,10 +1235,6 @@
|
||||
<input message="xs0:removeDocumentRequest"/>
|
||||
<output message="xs0:removeDocumentResponse"/>
|
||||
</operation>
|
||||
<operation name="importProcessFromLibrary">
|
||||
<input message="xs0:importProcessFromLibraryRequest"/>
|
||||
<output message="xs0:importProcessFromLibraryResponse"/>
|
||||
</operation>
|
||||
<operation name="getCaseNotes">
|
||||
<input message="xs0:getCaseNotesRequest"/>
|
||||
<output message="xs0:getCaseNotesResponse"/>
|
||||
@@ -1597,15 +1564,6 @@
|
||||
<soap12:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="importProcessFromLibrary">
|
||||
<soap12:operation soapAction="urn:importProcessFromLibrary" soapActionRequired="true" style="document"/>
|
||||
<input>
|
||||
<soap12:body use="literal"/>
|
||||
</input>
|
||||
<output>
|
||||
<soap12:body use="literal"/>
|
||||
</output>
|
||||
</operation>
|
||||
<operation name="getCaseNotes">
|
||||
<soap12:operation soapAction="urn:getCaseNotes" soapActionRequired="true" style="document"/>
|
||||
<input>
|
||||
|
||||
@@ -1026,20 +1026,6 @@ function systemInformation ($params)
|
||||
return $res;
|
||||
}
|
||||
|
||||
function importProcessFromLibrary ($params)
|
||||
{
|
||||
$vsResult = isValidSession( $params->sessionId );
|
||||
|
||||
if ($vsResult->status_code !== 0) {
|
||||
return $vsResult;
|
||||
}
|
||||
|
||||
$ws = new wsBase();
|
||||
$res = $ws->importProcessFromLibrary( $params->processId, $params->version, $params->importOption, $params->usernameLibrary, $params->passwordLibrary );
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
function getCaseNotes ($params)
|
||||
{
|
||||
$vsResult = isValidSession( $params->sessionId );
|
||||
@@ -1258,7 +1244,6 @@ $server->addFunction("TaskList");
|
||||
$server->addFunction("TaskCase");
|
||||
$server->addFunction("ReassignCase");
|
||||
$server->addFunction("systemInformation");
|
||||
$server->addFunction("importProcessFromLibrary");
|
||||
$server->addFunction("removeUserFromGroup");
|
||||
$server->addFunction("getCaseNotes");
|
||||
$server->addFunction("deleteCase");
|
||||
|
||||
@@ -63,6 +63,10 @@ try {
|
||||
$oProcessMap = new ProcessMap();
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$oStepTrigger = new StepTrigger();
|
||||
$oStepTrigger->orderPosition( $aData['sStep'], $_SESSION['TASK'], $aData['sType']);
|
||||
|
||||
if ($aData['sType'] == 'BEFORE') {
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'steps/triggersBefore_List', $oProcessMap->getStepTriggersCriteria( $aData['sStep'], $_SESSION['TASK'], $aData['sType'] ), array ('STEP' => $aData['sStep']) );
|
||||
} else {
|
||||
@@ -114,12 +118,16 @@ try {
|
||||
}
|
||||
break;
|
||||
case 'assignTrigger':
|
||||
$aFields = array ('STEP_UID' => $aData['STEP_UID'],'TAS_UID' => $_SESSION['TASK'],'TRI_UID' => $aData['TRI_UID'],'ST_TYPE' => $aData['ST_TYPE']
|
||||
$aFields = array (
|
||||
'STEP_UID' => $aData['STEP_UID'],
|
||||
'TAS_UID' => $_SESSION['TASK'],
|
||||
'TRI_UID' => $aData['TRI_UID'],
|
||||
'ST_TYPE' => $aData['ST_TYPE']
|
||||
);
|
||||
$oStepTrigger = new StepTrigger();
|
||||
$oStepTrigger->create( $aFields );
|
||||
$aFields['ST_CONDITION'] = $aData['ST_CONDITION'];
|
||||
$aFields['ST_POSITION'] = ($oStepTrigger->getNextPosition( $aData['STEP_UID'], $aData['ST_TYPE'] ) - 1);
|
||||
$aFields['ST_POSITION'] = ($oStepTrigger->getNextPosition( $aData['STEP_UID'], $aData['ST_TYPE'], $_SESSION['TASK'] ) - 1 );
|
||||
$oStepTrigger->update( $aFields );
|
||||
break;
|
||||
case 'editTriggerCondition':
|
||||
|
||||
@@ -254,7 +254,7 @@ Ext.onReady(function() {
|
||||
panelRightTop.getForm().submit({
|
||||
url : '../adminProxy/uploadImage',
|
||||
waitMsg : _('ID_LOADING'),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success : function(form, o) {
|
||||
obj = Ext.util.JSON.decode(o.response.responseText);
|
||||
if (obj.failed == '0' && obj.uploaded != '0') {
|
||||
|
||||
@@ -230,7 +230,7 @@ function saveSettings()
|
||||
Ext.getCmp('frm').getForm().submit( {
|
||||
url : '../adminProxy/saveSystemConf',
|
||||
waitMsg : _('ID_SAVING_PROCESS'),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
timeout : 36000,
|
||||
success : function(obj, resp) {
|
||||
//nothing to do
|
||||
|
||||
@@ -297,7 +297,7 @@ Ext.onReady(function(){
|
||||
}
|
||||
function saveAuthSources(){
|
||||
formAuthSourceE.getForm().submit({
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
url: '../adminProxy/saveAuthSources',
|
||||
params: {
|
||||
// action : 'tryit',
|
||||
|
||||
@@ -94,7 +94,7 @@ var cboxAuthSourse = new Ext.form.ComboBox({
|
||||
window.location = 'authSources_New?AUTH_SOURCE_PROVIDER='+formAuthSourceOptoins.getForm().findField('AUTH_SOURCE_PROVIDER').getValue();
|
||||
return false;*/
|
||||
formAuthSourceOptoins.getForm().submit({
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
url: '../adminProxy/testingOption',
|
||||
params: {
|
||||
action : 'test',
|
||||
|
||||
@@ -317,7 +317,7 @@ Ext.onReady(function(){
|
||||
}
|
||||
function TestSite(){
|
||||
formAuthSource.getForm().submit({
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
url: '../adminProxy/saveAuthSources',
|
||||
params: {
|
||||
// action : 'tryit',
|
||||
|
||||
@@ -1122,7 +1122,7 @@ Ext.onReady(function(){
|
||||
unpauseDate = unpauseDate.format('Y-m-d');
|
||||
|
||||
Ext.getCmp('unpauseFrm').getForm().submit({
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
url:'ajaxListener',
|
||||
method : 'post',
|
||||
params : {
|
||||
|
||||
@@ -411,7 +411,7 @@ DuplicateGroupName = function(){
|
||||
//Save New Group
|
||||
SaveNewGroup = function(){
|
||||
newForm.getForm().submit({
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success: function(f,a){
|
||||
CloseWindow(); //Hide popup widow
|
||||
newForm.getForm().reset(); //Set empty form to next use
|
||||
@@ -469,7 +469,7 @@ SaveEditGroupAction = function(){
|
||||
//Save Edit Group
|
||||
SaveEditGroup = function(){
|
||||
editForm.getForm().submit({
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success: function(f,a){
|
||||
CloseWindow(); //Hide popup widow
|
||||
DoSearch(); //Reload store grid
|
||||
|
||||
@@ -296,7 +296,7 @@ Login.submit = function()
|
||||
|
||||
Login.form.getForm().submit({
|
||||
method: 'POST',
|
||||
waitTitle: '',
|
||||
waitTitle: " ",
|
||||
//waitMsg: 'Verifying User...',
|
||||
success: function(form, action)
|
||||
{
|
||||
|
||||
@@ -141,7 +141,7 @@ Ext.onReady(function(){
|
||||
uploader.getForm().submit({
|
||||
url: 'outputdocs_Ajax?action=setTemplateFile',
|
||||
waitMsg: _('ID_UPLOADING_FILE'),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success: function (o, resp) {
|
||||
w.close();
|
||||
|
||||
|
||||
@@ -536,7 +536,7 @@ ImportPMTableCSV = function(){
|
||||
uploader.getForm().submit({
|
||||
url : '../pmTablesProxy/importCSV',
|
||||
waitMsg : _('ID_UPLOADING_FILE'),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success : function(o, resp){
|
||||
w.close();
|
||||
infoGrid.store.reload();
|
||||
|
||||
@@ -545,7 +545,7 @@ ImportPMTable = function(){
|
||||
uploader.getForm().submit({
|
||||
url: 'pmTablesProxy/import',
|
||||
waitMsg: _('ID_UPLOADING_FILE'),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success: function(o, resp){
|
||||
var result = Ext.util.JSON.decode(resp.response.responseText);
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ SaveNewCategory = function(){
|
||||
if (resp){
|
||||
viewport.getEl().mask(_('ID_PROCESSING'));
|
||||
newForm.getForm().submit({
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success: function(f,a){
|
||||
viewport.getEl().unmask();
|
||||
CloseWindow(); //Hide popup widow
|
||||
@@ -381,7 +381,7 @@ UpdateCategory = function(){
|
||||
if (resp){
|
||||
viewport.getEl().mask(_('ID_PROCESSING'));
|
||||
editForm.getForm().submit({
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success: function(f,a){
|
||||
viewport.getEl().unmask();
|
||||
CloseWindow(); //Hide popup widow
|
||||
|
||||
@@ -503,7 +503,7 @@ function saveProcess()
|
||||
Ext.getCmp('newProcessForm').getForm().submit( {
|
||||
url : '../processProxy/saveProcess',
|
||||
waitMsg : _('ID_SAVING_PROCESS'),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
timeout : 36000,
|
||||
success : function(obj, resp) {
|
||||
location.href = 'processes_Map?PRO_UID='+resp.result.PRO_UID;
|
||||
@@ -791,7 +791,7 @@ importProcessExistGroup = function()
|
||||
uploader.getForm().submit({
|
||||
url : 'processes_Import_Ajax',
|
||||
waitMsg : _('ID_UPLOADING_PROCESS_FILE'),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success : function(o, resp) {
|
||||
var resp_ = Ext.util.JSON.decode(resp.response.responseText);
|
||||
var sNewProUid = resp_.sNewProUid;
|
||||
@@ -920,7 +920,7 @@ importProcessExistProcess = function()
|
||||
uploader.getForm().submit({
|
||||
url : 'processes_Import_Ajax',
|
||||
waitMsg : _('ID_UPLOADING_PROCESS_FILE'),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success: function(o, resp) {
|
||||
var resp_ = Ext.util.JSON.decode(resp.response.responseText);
|
||||
var sNewProUid = resp_.sNewProUid;
|
||||
@@ -1025,7 +1025,7 @@ importProcess = function()
|
||||
uploader.getForm().submit({
|
||||
url : 'processes_Import_Ajax',
|
||||
waitMsg : _('ID_UPLOADING_PROCESS_FILE'),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success : function(o, resp) {
|
||||
|
||||
var resp_ = Ext.util.JSON.decode(resp.response.responseText);
|
||||
|
||||
@@ -440,7 +440,7 @@ SaveNewRole = function(){
|
||||
if (resp.success){
|
||||
viewport.getEl().mask(_('ID_PROCESSING'));
|
||||
newForm.getForm().submit({
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success: function(f,a){
|
||||
viewport.getEl().unmask();
|
||||
CloseWindow(); //Hide popup widow
|
||||
@@ -494,7 +494,7 @@ UpdateRole = function(){
|
||||
if (resp.success){
|
||||
viewport.getEl().mask(_('ID_PROCESSING'));
|
||||
editForm.getForm().submit({
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success: function(f,a){
|
||||
viewport.getEl().unmask();
|
||||
CloseWindow(); //Hide popup widow
|
||||
|
||||
@@ -76,7 +76,7 @@ function clearCache () {
|
||||
Ext.getCmp('frmCache').getForm().submit({
|
||||
url : 'clearCompiledAjax',
|
||||
waitMsg : _('ID_SAVING_PROCESS'),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
timeout : 36000,
|
||||
success : function(obj, resp) {
|
||||
message = '';
|
||||
|
||||
@@ -275,7 +275,7 @@ Ext.onReady(function() {
|
||||
formSettings.getForm().submit({
|
||||
url : 'environmentSettingsAjax?request=save&r=' + Math.random(),
|
||||
waitMsg : _('ID_SAVING_ENVIRONMENT_SETTINGS')+'...',
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
timeout : 36000,
|
||||
success : function(res, req) {
|
||||
PMExt.notify(_('ID_PM_ENV_SETTINGS_TITLE'), req.result.msg);
|
||||
|
||||
@@ -103,7 +103,7 @@ function saveSettings()
|
||||
Ext.getCmp('frm').getForm().submit( {
|
||||
url : 'loginSettingsAjax?request=saveSettings',
|
||||
waitMsg : _('ID_SAVING_PROCESS'),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
timeout : 36000,
|
||||
success : function(obj, resp) {
|
||||
//nothing to do
|
||||
|
||||
@@ -151,7 +151,7 @@ Ext.onReady(function(){
|
||||
action : 'test'
|
||||
},
|
||||
waitMsg : _('ID_NEW_SITE_TESTING'),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
timeout : 3600,
|
||||
success: function(f,a){
|
||||
nwTitle =formNewSite.getForm().findField('NW_TITLE').getValue();
|
||||
|
||||
@@ -67,7 +67,7 @@ function saveOption()
|
||||
Ext.getCmp('frmHeart').getForm().submit( {
|
||||
url : 'processHeartBeatAjax?action=saveOption',
|
||||
waitMsg : _('ID_SAVING_PROCESS'),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
timeout : 36000,
|
||||
success : function(obj, resp) {
|
||||
//nothing to do
|
||||
|
||||
@@ -523,7 +523,7 @@ newSkin = function(){
|
||||
Ext.getCmp("newform").getForm().submit({
|
||||
//reset: true,
|
||||
reset: false,
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success: function(form, action) {
|
||||
|
||||
store.reload();
|
||||
@@ -648,7 +648,7 @@ importSkin = function(){
|
||||
Ext.getCmp("uploadform").getForm().submit({
|
||||
//reset: true,
|
||||
reset: false,
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success: function(form, action) {
|
||||
|
||||
store.reload();
|
||||
|
||||
@@ -309,7 +309,7 @@ function saveNew()
|
||||
Ext.getCmp('formNew').getForm().submit( {
|
||||
url : 'ajaxListener?action=save&id'+id+'&label='+label,
|
||||
waitMsg : _('ID_SAVING'),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
timeout : 36000,
|
||||
success : function(obj, resp) {
|
||||
Ext.getCmp('grid').store.reload();
|
||||
|
||||
@@ -1051,7 +1051,7 @@ function userFrmEditSubmit()
|
||||
USR_CITY : global.IS_UID
|
||||
},
|
||||
waitMsg : _("ID_SAVING"),
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
timeout : 36000,
|
||||
success : function (obj, resp) {
|
||||
if (!infoMode) {
|
||||
|
||||
@@ -586,7 +586,7 @@ RefreshGroups = function(){
|
||||
SaveChangesAuthForm = function(){
|
||||
viewport.getEl().mask(_('ID_PROCESSING'));
|
||||
authForm.getForm().submit({
|
||||
waitTitle : "",
|
||||
waitTitle : " ",
|
||||
success: function(f,a){
|
||||
LoadAuthForm();
|
||||
viewport.getEl().unmask();
|
||||
|
||||
@@ -103,7 +103,6 @@
|
||||
$t->is( $methods[18] , 'taskCaseResponse taskCase(taskCaseRequest $parameters)' , 'taskCase');
|
||||
$t->is( $methods[19] , 'systemInformationResponse systemInformation(systemInformationRequest $parameters)', 'systemInformation');
|
||||
$t->is( $methods[20] , 'triggerListResponse triggerList(triggerListRequest $parameters)' , 'triggerList');
|
||||
$t->is( $methods[21] , 'importProcessFromLibraryResponse importProcessFromLibrary(importProcessFromLibraryRequest $parameters)' , 'importProcessFromLibraryRequest');
|
||||
|
||||
$t->diag('--------------- defined WSDL types --------------------' );
|
||||
|
||||
@@ -159,8 +158,6 @@
|
||||
$type47 = "struct triggerListRequest {\n string sessionId;\n}";
|
||||
$type48 = "struct triggerListStruct {\n string guid;\n string name;\n string processId;\n}";
|
||||
$type49 = "struct triggerListResponse {\n triggerListStruct triggers;\n}";
|
||||
$type50 = "struct importProcessFromLibraryRequest {\n string sessionId;\n string processId;\n string version;\n string importOption;\n string usernameLibrary;\n string passwordLibrary;\n}";
|
||||
$type51 = "struct importProcessFromLibraryResponse {\n integer status_code;\n string message;\n string processId;\n string processTitle;\n string category;\n string version;\n}";
|
||||
|
||||
$t->is( $types[0 ] , $type0 , 'login ' );
|
||||
$t->is( $types[1 ] , $type1 , 'loginResponse ' );
|
||||
@@ -256,17 +253,6 @@
|
||||
if ( $foundProcess ) {
|
||||
$t->is( $foundProcess, true, 'Sequential Process is present in this Workspace');
|
||||
}
|
||||
else {
|
||||
$res = ws_importProcessFromLibrary ( PROCESS_UID_LIBRARY , '' );
|
||||
if ( $res->status_code == 0 ) {
|
||||
$t->is( $res->status_code, 0, 'Process imported from Library successfully');
|
||||
$t->diag( ' processTitle ' . $res->processTitle );
|
||||
$t->diag( ' category ' . $res->category );
|
||||
$t->diag( ' version ' . $res->version );
|
||||
}
|
||||
else
|
||||
throw ( new Exception ( $res->message . ". Process '". PROCESS_UID ."' ") );
|
||||
}
|
||||
|
||||
//checking the groupList
|
||||
$groups = ws_groupList() ;
|
||||
@@ -504,9 +490,3 @@
|
||||
$res = ws_getCaseInfo ($caseId, $delIndex);
|
||||
$t->is( $res->status_code , 0 , 'ws_getCaseInfo status_code = 0');
|
||||
$t->is( $res->caseStatus , 'COMPLETED' , 'ws_getCaseInfo caseStatus = ' . $res->caseStatus );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -46,17 +46,6 @@
|
||||
if ( $foundProcess ) {
|
||||
$t->is( $foundProcess, true, 'Process for' .$uidName[1]. 'is present in this Workspace');
|
||||
}
|
||||
else {
|
||||
$res = ws_importProcessFromLibrary ( $process_uid_library , '' , 3, PML_USER_ID, PML_USER_PASS );
|
||||
if ( $res->status_code == 0 ) {
|
||||
$t->is( $res->status_code, 0, 'Process imported from Library successfully');
|
||||
$t->diag( ' processTitle ' . $res->processTitle );
|
||||
$t->diag( ' category ' . $res->category );
|
||||
$t->diag( ' version ' . $res->version );
|
||||
}
|
||||
else
|
||||
throw ( new Exception ( $res->message . ". Process '". $uid_Process ."' ") );
|
||||
}
|
||||
|
||||
}
|
||||
//creating an user, if this user exists just skip this lines
|
||||
@@ -343,4 +332,3 @@
|
||||
$t->is( $foundUser2, true, 'user2 is present in Group employees');
|
||||
$t->is( $foundUser3, true, 'user3 is present in Group finance');
|
||||
|
||||
|
||||
@@ -616,24 +616,6 @@ function ws_systemInformation() {
|
||||
return $result;
|
||||
}
|
||||
|
||||
function ws_importProcessFromLibrary($processId, $version = '', $importOption = '', $usernameLibrary = '', $passwordLibrary = '') {
|
||||
global $sessionId;
|
||||
global $client;
|
||||
|
||||
$params = array (
|
||||
'sessionId' => $sessionId,
|
||||
'processId' => $processId,
|
||||
'version' => $version,
|
||||
'importOption' => $importOption,
|
||||
'usernameLibrary' => $usernameLibrary,
|
||||
'passwordLibrary' => $passwordLibrary
|
||||
);
|
||||
$result = $client->__SoapCall('importProcessFromLibrary', array (
|
||||
$params
|
||||
));
|
||||
return $result;
|
||||
}
|
||||
|
||||
function ws_InputDocumentList($caseId) {
|
||||
global $sessionId;
|
||||
global $client;
|
||||
|
||||
Reference in New Issue
Block a user