Merged in feature/HOR-4479 (pull request #6467)

HOR-4479

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Roly
2018-05-21 13:34:12 +00:00
committed by Julio Cesar Laura Avendaño
8 changed files with 2199 additions and 64 deletions

View File

@@ -1,64 +1,67 @@
#!/usr/bin/env php
<?php
//***************** Operating Systems parameters **************************
if ( PHP_OS == 'WINNT' )
if (PHP_OS == 'WINNT')
define('PATH_SEP', '\\');
else
else
define('PATH_SEP', '/');
//***************** Defining the Home Directory *********************************
if(isset($_SERVER['PWD'])) {
$docuroot = explode ( PATH_SEP , $_SERVER['PWD'] );
} else {
$docuroot = explode ( PATH_SEP , realpath(dirname(__FILE__) . '/../../workflow/engine/'));
}
array_pop($docuroot);
$pathhome = implode( PATH_SEP, $docuroot );
if (isset($_SERVER['PWD'])) {
$docuroot = explode(PATH_SEP, $_SERVER['PWD']);
} else {
$docuroot = explode(PATH_SEP, realpath(dirname(__FILE__) . '/../../workflow/engine/'));
}
array_pop($docuroot);
$pathhome = implode(PATH_SEP, $docuroot);
//try to find automatically the trunk directory where are placed the RBAC and Gulliver directories
//in a normal installation you don't need to change it.
array_pop($docuroot);
$pathTrunk = implode( PATH_SEP, $docuroot );
array_pop($docuroot);
$pathOutTrunk = implode( PATH_SEP, $docuroot );
// to do: check previous algorith for Windows $pathTrunk = "c:/home/";
//try to find automatically the trunk directory where are placed the RBAC and Gulliver directories
//in a normal installation you don't need to change it.
array_pop($docuroot);
$pathTrunk = implode(PATH_SEP, $docuroot);
array_pop($docuroot);
$pathOutTrunk = implode(PATH_SEP, $docuroot);
// to do: check previous algorith for Windows $pathTrunk = "c:/home/";
define('PATH_HOME', $pathhome . PATH_SEP);
define('PATH_TRUNK', $pathTrunk . PATH_SEP);
define('PATH_OUTTRUNK', $pathOutTrunk . PATH_SEP);
define('PATH_HOME', $pathhome . PATH_SEP );
define('PATH_TRUNK', $pathTrunk . PATH_SEP );
define('PATH_OUTTRUNK', $pathOutTrunk . PATH_SEP );
//***************** include the main config file ******************************
$gulliverInstalled = PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths_installed.php';
if (file_exists( $gulliverInstalled )) {
$gulliverInstalled = PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths_installed.php';
if (file_exists($gulliverInstalled)) {
require_once ( $gulliverInstalled );
}
}
$gulliverConfig = PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php';
$gulliverConfig = PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php';
// project exists?
if (file_exists( $gulliverConfig )) {
// project exists?
if (file_exists($gulliverConfig)) {
require_once ( $gulliverConfig );
}
else {
printf( "Unable to find %s file\n", $gulliverConfig); exit(255);
}
// Get the platform name (should be 'linux', 'windows', etc)
$svrOS = strtolower(reset(explode(' ',php_uname('s'))));
$defines = $pathhome . PATH_SEP . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'defines.php';
} else {
printf("Unable to find %s file\n", $gulliverConfig);
exit(255);
}
if ($svrOS === "windows" && file_exists($defines))
// Get the platform name (should be 'linux', 'windows', etc)
$explode = explode(' ', php_uname('s'));
$svrOS = strtolower(reset($explode));
$defines = $pathhome . PATH_SEP . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'defines.php';
if ($svrOS === "windows" && file_exists($defines))
require_once ( $defines );
ini_set('display_errors','off');
ini_set('error_reporting', E_ERROR);
if (!is_dir( PATH_THIRDPARTY )) {
print "Unable to find Thirdparty libraries\n"; exit(255);
}
ini_set('display_errors', 'off');
ini_set('error_reporting', E_ERROR);
if (!is_dir( PATH_GULLIVER_BIN )) {
print "Unable to find bin Gulliver libraries\n"; exit(255);
}
if (!is_dir(PATH_THIRDPARTY)) {
print "Unable to find Thirdparty libraries\n";
exit(255);
}
include ( PATH_GULLIVER_BIN . 'gulliver.php');
if (!is_dir(PATH_GULLIVER_BIN)) {
print "Unable to find bin Gulliver libraries\n";
exit(255);
}
include ( PATH_GULLIVER_BIN . 'gulliver.php');

View File

@@ -0,0 +1,19 @@
<?php
require_once 'classes/model/om/BaseAppDataChangeLog.php';
/**
* Skeleton subclass for representing a row from the 'APP_DATA_CHANGE_LOG' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package classes.model
*/
class AppDataChangeLog extends BaseAppDataChangeLog {
} // AppDataChangeLog

View File

@@ -0,0 +1,23 @@
<?php
// include base peer class
require_once 'classes/model/om/BaseAppDataChangeLogPeer.php';
// include object class
include_once 'classes/model/AppDataChangeLog.php';
/**
* Skeleton subclass for performing query and update operations on the 'APP_DATA_CHANGE_LOG' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @package classes.model
*/
class AppDataChangeLogPeer extends BaseAppDataChangeLogPeer {
} // AppDataChangeLogPeer

View File

@@ -0,0 +1,98 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'APP_DATA_CHANGE_LOG' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class AppDataChangeLogMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.AppDataChangeLogMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('APP_DATA_CHANGE_LOG');
$tMap->setPhpName('AppDataChangeLog');
$tMap->setUseIdGenerator(true);
$tMap->addPrimaryKey('CHANGE_LOG_ID', 'ChangeLogId', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('DATE', 'Date', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addColumn('PRO_ID', 'ProId', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addColumn('TAS_ID', 'TasId', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addColumn('USR_ID', 'UsrId', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addColumn('DYN_ID', 'DynId', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addColumn('SOURCE_ID', 'SourceId', 'string', CreoleTypes::VARCHAR, false, 32);
$tMap->addColumn('ST_TYPE', 'StType', 'string', CreoleTypes::VARCHAR, false, 32);
$tMap->addColumn('DATA', 'Data', 'string', CreoleTypes::LONGVARCHAR, true, null);
$tMap->addColumn('SOURCE_TO_SAVE', 'SourceToSave', 'string', CreoleTypes::VARCHAR, false, 32);
$tMap->addColumn('SKIN', 'Skin', 'string', CreoleTypes::VARCHAR, false, 32);
$tMap->addColumn('LANGUAGE', 'Language', 'string', CreoleTypes::VARCHAR, false, 32);
} // doBuild()
} // AppDataChangeLogMapBuilder

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1089,9 +1089,6 @@
<rule name="maxLength" value="10" message="Report table connection can be no larger than ${value} in size"/>
<rule name="required" message="Report table connection is required."/>
</validator>
<!--<validator column="REP_TAB_CREATE_DATE">
<rule name="required" message="Report table creation date is required." />
</validator>-->
<validator column="REP_TAB_STATUS">
<rule name="validValues" value="ACTIVE|INACTIVE" message="Please select a valid status."/>
<rule name="required" message="Report table status is required."/>
@@ -3001,18 +2998,6 @@
<column name="SCH_DEL_USER_PASS" type="VARCHAR" size="100" required="true"/>
<column name="SCH_DEL_USER_UID" type="VARCHAR" size="100" required="true"/>
<column name="SCH_NAME" type="VARCHAR" size="100" required="true"/>
<!--
<column name="SCH_PROGRAM" type="VARCHAR" size="100" required="true">
<vendor type="mysql">
<parameter name="Field" value="SCH_PROGRAM"/>
<parameter name="Type" value="varchar(100)"/>
<parameter name="Null" value="NO"/>
<parameter name="Key" value=""/>
<parameter name="Default" value=""/>
<parameter name="Extra" value=""/>
</vendor>
</column>
//-->
<column name="PRO_UID" type="VARCHAR" size="32" required="true" default=""/>
<column name="TAS_UID" type="VARCHAR" size="32" required="true" default=""/>
<column name="SCH_TIME_NEXT_RUN" type="TIMESTAMP" required="true"/>
@@ -3446,8 +3431,8 @@
</table>
<!--
OAUTH TABLES DEFINITION
-->
OAUTH TABLES DEFINITION
-->
<table name="OAUTH_ACCESS_TOKENS">
<vendor type="mysql">
<parameter name="Name" value="OAUTH_ACCESS_TOKENS"/>
@@ -3566,8 +3551,8 @@
</table>
<!--
BPMN TABLES DEFINITION
-->
BPMN TABLES DEFINITION
-->
<table name="BPMN_PROJECT">
<vendor type="mysql">
<parameter name="Name" value="BPMN_PROJECT"/>
@@ -5754,4 +5739,52 @@
<column name="PLUGIN_TASK_EXTENDED_PROPERTIES" type="LONGVARCHAR"/>
<column name="PLUGIN_ATTRIBUTES" type="LONGVARCHAR"/>
</table>
<table name="APP_DATA_CHANGE_LOG" idMethod="native">
<vendor type="mysql">
<parameter name="Name" value="APP_DATA_CHANGE_LOG"/>
<parameter name="Engine" value="InnoDB"/>
<parameter name="Version" value="10"/>
<parameter name="Row_format" value="Dynamic"/>
<parameter name="Data_free" value="0"/>
<parameter name="Auto_increment" value=""/>
<parameter name="Check_time" value=""/>
<parameter name="Collation" value="utf8_general_ci"/>
<parameter name="Checksum" value=""/>
<parameter name="Create_options" value=""/>
<parameter name="Comment" value="Change log"/>
</vendor>
<column name="CHANGE_LOG_ID" type="INTEGER" required="true" autoIncrement="true" unique="true" primaryKey="true"/>
<column name="DATE" type="TIMESTAMP" required="false"/>
<column name="APP_NUMBER" type="INTEGER" default="0" required="false"/>
<column name="DEL_INDEX" type="INTEGER" default="0" required="false"/>
<column name="PRO_ID" type="INTEGER" default="0" required="false"/>
<column name="TAS_ID" type="INTEGER" default="0" required="false"/>
<column name="USR_ID" type="INTEGER" default="0" required="false"/>
<column name="DYN_ID" type="INTEGER" default="0" required="false"/>
<column name="SOURCE_ID" type="VARCHAR" size="32" default="" required="false"/>
<column name="ST_TYPE" type="VARCHAR" size="32" default="" required="false"/>
<column name="DATA" type="LONGVARCHAR" required="true"/>
<column name="SOURCE_TO_SAVE" type="VARCHAR" size="32" default="" required="false"/>
<column name="SKIN" type="VARCHAR" size="32" default="" required="false"/>
<column name="LANGUAGE" type="VARCHAR" size="32" default="" required="false"/>
<index name="indexAppNumber">
<index-column name="APP_NUMBER"/>
</index>
<index name="indexDelIndex">
<index-column name="DEL_INDEX"/>
</index>
<index name="indexProId">
<index-column name="PRO_ID"/>
</index>
<index name="indexTasId">
<index-column name="TAS_ID"/>
</index>
<index name="indexUsrId">
<index-column name="USR_ID"/>
</index>
<index name="indexDynId">
<index-column name="DYN_ID"/>
</index>
</table>
</database>

View File

@@ -3192,5 +3192,36 @@ CREATE TABLE `PLUGINS_REGISTRY`
`PLUGIN_ATTRIBUTES` MEDIUMTEXT,
PRIMARY KEY (`PR_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Details of plugins registry';
#-----------------------------------------------------------------------------
#-- APP_DATA_CHANGE_LOG
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS `APP_DATA_CHANGE_LOG`;
CREATE TABLE `APP_DATA_CHANGE_LOG`
(
`CHANGE_LOG_ID` INTEGER NOT NULL AUTO_INCREMENT,
`DATE` DATETIME,
`APP_NUMBER` INTEGER default 0,
`DEL_INDEX` INTEGER default 0,
`PRO_ID` INTEGER default 0,
`TAS_ID` INTEGER default 0,
`USR_ID` INTEGER default 0,
`DYN_ID` INTEGER default 0,
`SOURCE_ID` VARCHAR(32) default '',
`ST_TYPE` VARCHAR(32) default '',
`DATA` MEDIUMTEXT NOT NULL,
`SOURCE_TO_SAVE` VARCHAR(32) default '',
`SKIN` VARCHAR(32) default '',
`LANGUAGE` VARCHAR(32) default '',
PRIMARY KEY (`CHANGE_LOG_ID`),
KEY `indexAppNumber`(`APP_NUMBER`),
KEY `indexDelIndex`(`DEL_INDEX`),
KEY `indexProId`(`PRO_ID`),
KEY `indexTasId`(`TAS_ID`),
KEY `indexUsrId`(`USR_ID`),
KEY `indexDynId`(`DYN_ID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Change log';
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;