Merge branch 'master' of bitbucket.org:colosa/processmaker into PM-939
This commit is contained in:
@@ -142,7 +142,6 @@ class Derivation
|
||||
|
||||
$arrayNextTask = array();
|
||||
$arrayNextTaskDefault = array();
|
||||
$i = 0;
|
||||
|
||||
//SELECT *
|
||||
//FROM APP_DELEGATION AS A
|
||||
@@ -211,18 +210,17 @@ class Derivation
|
||||
}
|
||||
|
||||
if ($flagContinue) {
|
||||
$arrayNextTask[++$i] = $this->prepareInformationTask($arrayRouteData);
|
||||
$arrayNextTask[] = $this->prepareInformationTask($arrayRouteData);
|
||||
}
|
||||
}
|
||||
|
||||
if (count($arrayNextTask) == 0 && count($arrayNextTaskDefault) > 0) {
|
||||
$arrayNextTask[++$i] = $this->prepareInformationTask($arrayNextTaskDefault);
|
||||
$arrayNextTask[] = $this->prepareInformationTask($arrayNextTaskDefault);
|
||||
}
|
||||
|
||||
//Check Task GATEWAYTOGATEWAY
|
||||
$arrayNextTaskBk = $arrayNextTask;
|
||||
$arrayNextTask = array();
|
||||
$i = 0;
|
||||
|
||||
foreach ($arrayNextTaskBk as $value) {
|
||||
$arrayNextTaskData = $value;
|
||||
@@ -231,16 +229,22 @@ class Derivation
|
||||
$arrayAux = $this->prepareInformation($arrayData, $arrayNextTaskData["NEXT_TASK"]["TAS_UID"]);
|
||||
|
||||
foreach ($arrayAux as $value2) {
|
||||
$arrayNextTask[++$i] = $value2;
|
||||
$arrayNextTask[] = $value2;
|
||||
}
|
||||
} else {
|
||||
$arrayNextTask[++$i] = $arrayNextTaskData;
|
||||
$arrayNextTask[] = $arrayNextTaskData;
|
||||
}
|
||||
}
|
||||
|
||||
//1. There is no rule
|
||||
if (count($arrayNextTask) == 0) {
|
||||
throw new Exception(G::LoadTranslation("ID_NO_DERIVATION_RULE"));
|
||||
$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"));
|
||||
}
|
||||
}
|
||||
|
||||
//Return
|
||||
|
||||
@@ -326,6 +326,8 @@ class Process extends BaseProcess
|
||||
}
|
||||
|
||||
$aFields['PRO_DYNAFORMS'] = @unserialize( $aFields['PRO_DYNAFORMS'] );
|
||||
//Check if is BPMN process
|
||||
$aFields['PRO_BPMN'] = $this->isBpmnProcess($ProUid);
|
||||
|
||||
return $aFields;
|
||||
} else {
|
||||
@@ -1009,5 +1011,21 @@ class Process extends BaseProcess
|
||||
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_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);
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $flo_position = 0;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @var BpmnProject
|
||||
*/
|
||||
protected $aBpmnProject;
|
||||
@@ -365,7 +365,7 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Get the [flo_position] column value.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getFloPosition()
|
||||
@@ -374,7 +374,7 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
|
||||
return $this->flo_position;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Set the value of [flo_uid] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
@@ -780,7 +780,7 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
|
||||
|
||||
/**
|
||||
* Set the value of [flo_position] column.
|
||||
*
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return void
|
||||
*/
|
||||
@@ -794,9 +794,9 @@ abstract class BaseBpmnFlow extends BaseObject implements Persistent
|
||||
}
|
||||
|
||||
if ($this->flo_position !== $v || $v === 0) {
|
||||
$this->flo_position = $v;
|
||||
$this->modifiedColumns[] = BpmnFlowPeer::FLO_POSITION;
|
||||
}
|
||||
$this->flo_position = $v;
|
||||
$this->modifiedColumns[] = BpmnFlowPeer::FLO_POSITION;
|
||||
}
|
||||
|
||||
} // setFloPosition()
|
||||
|
||||
|
||||
@@ -4015,7 +4015,7 @@
|
||||
<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_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_PREVIOUS_USR_UID" type="VARCHAR" size="32" 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_PRO_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_PREVIOUS_USR_UID` VARCHAR(32) default '',
|
||||
`DEL_PREVIOUS_USR_USERNAME` VARCHAR(100) default '',
|
||||
|
||||
@@ -1026,7 +1026,13 @@ try {
|
||||
}
|
||||
//Add content content step - End
|
||||
} catch (Exception $e) {
|
||||
G::SendTemporalMessage( G::LoadTranslation( 'ID_PROCESS_DEF_PROBLEM' ), 'error', 'string', 3, 100 );
|
||||
//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 );
|
||||
}
|
||||
|
||||
$aMessage = array ();
|
||||
$aMessage['MESSAGE'] = $e->getMessage();
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
@@ -476,6 +476,8 @@ Ext.onReady(function(){
|
||||
|
||||
function newProcess(params)
|
||||
{
|
||||
if (winDesigner)
|
||||
winDesigner.close();
|
||||
params = typeof params == 'undefined' ? {type:'classicProject'} : params;
|
||||
|
||||
// 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,
|
||||
'winDesigner'
|
||||
);
|
||||
Ext.getCmp('newProjectWin').close();
|
||||
processesGrid.store.reload();
|
||||
} else {
|
||||
PMExt.error( _('ID_FAILED'), _('PROCESS_ALREADY_OPENED'));
|
||||
}
|
||||
@@ -1163,6 +1167,11 @@ importProcessExistProcess = function()
|
||||
|
||||
importProcess = function()
|
||||
{
|
||||
if (winDesigner) {
|
||||
winDesigner.close();
|
||||
if (!winDesigner.closed)
|
||||
return;
|
||||
}
|
||||
var processFileType = importProcessGlobal.processFileType;
|
||||
var processFileTypeTitle = (processFileType == "pm") ? "" : " " + processFileType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user