Merge branch 'master' of bitbucket.org:colosa/processmaker into PM-939
This commit is contained in:
@@ -142,7 +142,6 @@ class Derivation
|
|||||||
|
|
||||||
$arrayNextTask = array();
|
$arrayNextTask = array();
|
||||||
$arrayNextTaskDefault = array();
|
$arrayNextTaskDefault = array();
|
||||||
$i = 0;
|
|
||||||
|
|
||||||
//SELECT *
|
//SELECT *
|
||||||
//FROM APP_DELEGATION AS A
|
//FROM APP_DELEGATION AS A
|
||||||
@@ -211,18 +210,17 @@ class Derivation
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($flagContinue) {
|
if ($flagContinue) {
|
||||||
$arrayNextTask[++$i] = $this->prepareInformationTask($arrayRouteData);
|
$arrayNextTask[] = $this->prepareInformationTask($arrayRouteData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($arrayNextTask) == 0 && count($arrayNextTaskDefault) > 0) {
|
if (count($arrayNextTask) == 0 && count($arrayNextTaskDefault) > 0) {
|
||||||
$arrayNextTask[++$i] = $this->prepareInformationTask($arrayNextTaskDefault);
|
$arrayNextTask[] = $this->prepareInformationTask($arrayNextTaskDefault);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Check Task GATEWAYTOGATEWAY
|
//Check Task GATEWAYTOGATEWAY
|
||||||
$arrayNextTaskBk = $arrayNextTask;
|
$arrayNextTaskBk = $arrayNextTask;
|
||||||
$arrayNextTask = array();
|
$arrayNextTask = array();
|
||||||
$i = 0;
|
|
||||||
|
|
||||||
foreach ($arrayNextTaskBk as $value) {
|
foreach ($arrayNextTaskBk as $value) {
|
||||||
$arrayNextTaskData = $value;
|
$arrayNextTaskData = $value;
|
||||||
@@ -231,17 +229,23 @@ class Derivation
|
|||||||
$arrayAux = $this->prepareInformation($arrayData, $arrayNextTaskData["NEXT_TASK"]["TAS_UID"]);
|
$arrayAux = $this->prepareInformation($arrayData, $arrayNextTaskData["NEXT_TASK"]["TAS_UID"]);
|
||||||
|
|
||||||
foreach ($arrayAux as $value2) {
|
foreach ($arrayAux as $value2) {
|
||||||
$arrayNextTask[++$i] = $value2;
|
$arrayNextTask[] = $value2;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$arrayNextTask[++$i] = $arrayNextTaskData;
|
$arrayNextTask[] = $arrayNextTaskData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//1. There is no rule
|
//1. There is no rule
|
||||||
if (count($arrayNextTask) == 0) {
|
if (count($arrayNextTask) == 0) {
|
||||||
|
$oProcess = new Process();
|
||||||
|
$oProcessFieds = $oProcess->Load( $_SESSION['PROCESS'] );
|
||||||
|
if(isset($oProcessFieds['PRO_BPMN']) && $oProcessFieds['PRO_BPMN'] == 1){
|
||||||
|
throw new Exception(G::LoadTranslation("ID_NO_DERIVATION_BPMN_RULE"));
|
||||||
|
}else{
|
||||||
throw new Exception(G::LoadTranslation("ID_NO_DERIVATION_RULE"));
|
throw new Exception(G::LoadTranslation("ID_NO_DERIVATION_RULE"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Return
|
//Return
|
||||||
return $arrayNextTask;
|
return $arrayNextTask;
|
||||||
|
|||||||
@@ -326,6 +326,8 @@ class Process extends BaseProcess
|
|||||||
}
|
}
|
||||||
|
|
||||||
$aFields['PRO_DYNAFORMS'] = @unserialize( $aFields['PRO_DYNAFORMS'] );
|
$aFields['PRO_DYNAFORMS'] = @unserialize( $aFields['PRO_DYNAFORMS'] );
|
||||||
|
//Check if is BPMN process
|
||||||
|
$aFields['PRO_BPMN'] = $this->isBpmnProcess($ProUid);
|
||||||
|
|
||||||
return $aFields;
|
return $aFields;
|
||||||
} else {
|
} else {
|
||||||
@@ -1009,5 +1011,21 @@ class Process extends BaseProcess
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Check is the Process is BPMN.
|
||||||
|
*
|
||||||
|
* @param string $ProUid the uid of the Prolication
|
||||||
|
* @return int 1 if is BPMN process or 0 if a Normal process
|
||||||
|
*/
|
||||||
|
public function isBpmnProcess($proUid){
|
||||||
|
$c = new Criteria("workflow");
|
||||||
|
$c->add(BpmnProcessPeer::PRJ_UID, $proUid);
|
||||||
|
$res = BpmnProcessPeer::doSelect($c);
|
||||||
|
if( sizeof($res) == 0 ){
|
||||||
|
return 0;
|
||||||
|
}else{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class ListParticipatedLastMapBuilder
|
|||||||
|
|
||||||
$tMap->addColumn('APP_TAS_TITLE', 'AppTasTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
$tMap->addColumn('APP_TAS_TITLE', 'AppTasTitle', 'string', CreoleTypes::VARCHAR, true, 255);
|
||||||
|
|
||||||
$tMap->addColumn('APP_STATUS', 'AppStatus', 'string', CreoleTypes::VARCHAR, true, 20);
|
$tMap->addColumn('APP_STATUS', 'AppStatus', 'string', CreoleTypes::VARCHAR, false, 20);
|
||||||
|
|
||||||
$tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
|
$tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null);
|
||||||
|
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
|
|||||||
return $this->flo_position;
|
return $this->flo_position;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Set the value of [flo_uid] column.
|
* Set the value of [flo_uid] column.
|
||||||
*
|
*
|
||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
|
|||||||
@@ -4015,7 +4015,7 @@
|
|||||||
<column name="APP_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
<column name="APP_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||||
<column name="APP_PRO_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
<column name="APP_PRO_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||||
<column name="APP_TAS_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
<column name="APP_TAS_TITLE" type="VARCHAR" size="255" required="true" default=""/>
|
||||||
<column name="APP_STATUS" type="VARCHAR" size="20" required="true" default="0"/>
|
<column name="APP_STATUS" type="VARCHAR" size="20" required="false" default="0"/>
|
||||||
<column name="DEL_INDEX" type="INTEGER" required="true" default="0"/>
|
<column name="DEL_INDEX" type="INTEGER" required="true" default="0"/>
|
||||||
<column name="DEL_PREVIOUS_USR_UID" type="VARCHAR" size="32" default=""/>
|
<column name="DEL_PREVIOUS_USR_UID" type="VARCHAR" size="32" default=""/>
|
||||||
<column name="DEL_PREVIOUS_USR_USERNAME" type="VARCHAR" size="100" default=""/>
|
<column name="DEL_PREVIOUS_USR_USERNAME" type="VARCHAR" size="100" default=""/>
|
||||||
|
|||||||
@@ -2263,7 +2263,7 @@ CREATE TABLE `LIST_PARTICIPATED_LAST`
|
|||||||
`APP_TITLE` VARCHAR(255) default '' NOT NULL,
|
`APP_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||||
`APP_PRO_TITLE` VARCHAR(255) default '' NOT NULL,
|
`APP_PRO_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||||
`APP_TAS_TITLE` VARCHAR(255) default '' NOT NULL,
|
`APP_TAS_TITLE` VARCHAR(255) default '' NOT NULL,
|
||||||
`APP_STATUS` VARCHAR(20) default '0' NOT NULL,
|
`APP_STATUS` VARCHAR(20) default '0',
|
||||||
`DEL_INDEX` INTEGER default 0 NOT NULL,
|
`DEL_INDEX` INTEGER default 0 NOT NULL,
|
||||||
`DEL_PREVIOUS_USR_UID` VARCHAR(32) default '',
|
`DEL_PREVIOUS_USR_UID` VARCHAR(32) default '',
|
||||||
`DEL_PREVIOUS_USR_USERNAME` VARCHAR(100) default '',
|
`DEL_PREVIOUS_USR_USERNAME` VARCHAR(100) default '',
|
||||||
|
|||||||
@@ -1026,7 +1026,13 @@ try {
|
|||||||
}
|
}
|
||||||
//Add content content step - End
|
//Add content content step - End
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
//Check if the process is BPMN
|
||||||
|
if(isset($oProcessFieds['PRO_BPMN']) && $oProcessFieds['PRO_BPMN'] == 1){
|
||||||
|
G::SendTemporalMessage( G::LoadTranslation( 'ID_BPMN_PROCESS_DEF_PROBLEM' ), 'error', 'string', 3, 100 );
|
||||||
|
}else{
|
||||||
G::SendTemporalMessage( G::LoadTranslation( 'ID_PROCESS_DEF_PROBLEM' ), 'error', 'string', 3, 100 );
|
G::SendTemporalMessage( G::LoadTranslation( 'ID_PROCESS_DEF_PROBLEM' ), 'error', 'string', 3, 100 );
|
||||||
|
}
|
||||||
|
|
||||||
$aMessage = array ();
|
$aMessage = array ();
|
||||||
$aMessage['MESSAGE'] = $e->getMessage();
|
$aMessage['MESSAGE'] = $e->getMessage();
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
|
|||||||
@@ -476,6 +476,8 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
function newProcess(params)
|
function newProcess(params)
|
||||||
{
|
{
|
||||||
|
if (winDesigner)
|
||||||
|
winDesigner.close();
|
||||||
params = typeof params == 'undefined' ? {type:'classicProject'} : params;
|
params = typeof params == 'undefined' ? {type:'classicProject'} : params;
|
||||||
|
|
||||||
// TODO this variable have hardcoded labels, it must be changed on the future
|
// TODO this variable have hardcoded labels, it must be changed on the future
|
||||||
@@ -589,6 +591,8 @@ function saveProcess()
|
|||||||
"../designer?prj_uid="+resp.result.PRO_UID,
|
"../designer?prj_uid="+resp.result.PRO_UID,
|
||||||
'winDesigner'
|
'winDesigner'
|
||||||
);
|
);
|
||||||
|
Ext.getCmp('newProjectWin').close();
|
||||||
|
processesGrid.store.reload();
|
||||||
} else {
|
} else {
|
||||||
PMExt.error( _('ID_FAILED'), _('PROCESS_ALREADY_OPENED'));
|
PMExt.error( _('ID_FAILED'), _('PROCESS_ALREADY_OPENED'));
|
||||||
}
|
}
|
||||||
@@ -1163,6 +1167,11 @@ importProcessExistProcess = function()
|
|||||||
|
|
||||||
importProcess = function()
|
importProcess = function()
|
||||||
{
|
{
|
||||||
|
if (winDesigner) {
|
||||||
|
winDesigner.close();
|
||||||
|
if (!winDesigner.closed)
|
||||||
|
return;
|
||||||
|
}
|
||||||
var processFileType = importProcessGlobal.processFileType;
|
var processFileType = importProcessGlobal.processFileType;
|
||||||
var processFileTypeTitle = (processFileType == "pm") ? "" : " " + processFileType;
|
var processFileTypeTitle = (processFileType == "pm") ? "" : " " + processFileType;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user