Merged in develop (pull request #7127)
Update with develop Approved-by: Paula Quispe <paula.quispe@processmaker.com>
This commit is contained in:
@@ -53,7 +53,7 @@ $factory->state(\ProcessMaker\Model\Delegation::class, 'foreign_keys', function
|
||||
'DEL_TASK_DUE_DATE' => $faker->dateTime(),
|
||||
'DEL_RISK_DATE' => $faker->dateTime(),
|
||||
'USR_ID' => $user->USR_ID,
|
||||
'PRO_ID' => $process->id,
|
||||
'PRO_ID' => $process->PRO_ID,
|
||||
'TAS_ID' => $task->TAS_ID,
|
||||
'DEL_DATA' => ''
|
||||
];
|
||||
|
||||
@@ -4,10 +4,26 @@
|
||||
* Model factory for a dynaform.
|
||||
*/
|
||||
use Faker\Generator as Faker;
|
||||
use ProcessMaker\Model\Dynaform;
|
||||
use ProcessMaker\Model\Process;
|
||||
|
||||
$factory->define(Dynaform::class, function(Faker $faker) {
|
||||
$factory->define(\ProcessMaker\Model\Dynaform::class, function(Faker $faker) {
|
||||
$date = $faker->dateTime();
|
||||
return [
|
||||
'DYN_UID' => G::generateUniqueID(),
|
||||
'DYN_ID' => $faker->unique()->numberBetween(1, 10000),
|
||||
'DYN_TITLE' => $faker->sentence(2),
|
||||
'DYN_DESCRIPTION' => $faker->sentence(5),
|
||||
'PRO_UID' => G::generateUniqueID(),
|
||||
'DYN_TYPE' => 'xmlform',
|
||||
'DYN_FILENAME' => '',
|
||||
'DYN_CONTENT' => '',
|
||||
'DYN_LABEL' => '',
|
||||
'DYN_VERSION' => 2,
|
||||
'DYN_UPDATE_DATE' => $date->format('Y-m-d H:i:s'),
|
||||
];
|
||||
});
|
||||
// Create a dynaform with the foreign keys
|
||||
$factory->state(\ProcessMaker\Model\Dynaform::class, 'foreign_keys', function (Faker $faker) {
|
||||
$date = $faker->dateTime();
|
||||
return [
|
||||
'DYN_UID' => G::generateUniqueID(),
|
||||
@@ -26,3 +42,22 @@ $factory->define(Dynaform::class, function(Faker $faker) {
|
||||
'DYN_UPDATE_DATE' => $date->format('Y-m-d H:i:s'),
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
// Create a dynaform with translations defined: ["es", "es-Es"]
|
||||
$factory->state(\ProcessMaker\Model\Dynaform::class, 'translations', function (Faker $faker) {
|
||||
$date = $faker->dateTime();
|
||||
return [
|
||||
'DYN_UID' => G::generateUniqueID(),
|
||||
'DYN_ID' => $faker->unique()->numberBetween(1, 10000),
|
||||
'DYN_TITLE' => $faker->sentence(2),
|
||||
'DYN_DESCRIPTION' => $faker->sentence(5),
|
||||
'PRO_UID' => G::generateUniqueID(),
|
||||
'DYN_TYPE' => 'xmlform',
|
||||
'DYN_FILENAME' => '',
|
||||
'DYN_CONTENT' => '',
|
||||
'DYN_LABEL' => '{"es":{"Project-Id-Version":"PM 4.0.1","POT-Creation-Date":"","PO-Revision-Date":"2019-09-11 12:02-0400","Last-Translator":"Colosa <colosa@colosa.com>","Language-Team":"Colosa Developers Team <developers@colosa.com>","MIME-Version":"1.0","Content-Type":"text\/plain; charset=utf-8","Content-Transfer_Encoding":"8bit","X-Poedit-SourceCharset":"utf-8","Content-Transfer-Encoding":"8bit","File-Name":"Test-v2.es.po","X-Generator":"Poedit 1.8.11","X-Poedit-Language":"en","X-Poedit-Country":".","Labels":[{"msgid":"Test without dependent fields","msgstr":"Ejemplo sin campos dependientes"},{"msgid":"Incident Type:","msgstr":"Tipo de incidente:"},{"msgid":"- Select -","msgstr":"- Seleccionar -"},{"msgid":"Incident Sub Type:","msgstr":"Sub tipo de incidente:"},{"msgid":"Test with dependent fields","msgstr":"Ejemplo con campos dependientes"},{"msgid":"Health\/Safety","msgstr":"Salud\/Seguridad"},{"msgid":"Environment","msgstr":"Ambiente"},{"msgid":"Fatality","msgstr":"Ambiente"},{"msgid":"Lost Time Injury","msgstr":"Ambiente"},{"msgid":"Environment","msgstr":"Ambiente"},{"msgid":"Medical Treatment Injury","msgstr":"Lesiones de tratamiento m\u00e9dico"},{"msgid":"Chemical\/Substance Spill","msgstr":"Derrame qu\u00edmico \/ de sustancias"},{"msgid":"Fire\/Explosion","msgstr":"Fuego\/Explosion"},{"msgid":"Offsite Release","msgstr":"Lanzamiento fuera del sitio"}]},"es-Es":{"Project-Id-Version":"PM 4.0.1","POT-Creation-Date":"","PO-Revision-Date":"2019-09-11 12:02-0400","Last-Translator":"Colosa <colosa@colosa.com>","Language-Team":"Colosa Developers Team <developers@colosa.com>","MIME-Version":"1.0","Content-Type":"text\/plain; charset=utf-8","Content-Transfer_Encoding":"8bit","X-Poedit-SourceCharset":"utf-8","Content-Transfer-Encoding":"8bit","File-Name":"Test-v2.es-Es.po","X-Generator":"Poedit 1.8.11","X-Poedit-Language":"en","X-Poedit-Country":".","Labels":[{"msgid":"Test without dependent fields","msgstr":"Ejemplo sin campos dependientes"},{"msgid":"Incident Type:","msgstr":"Tipo de incidente:"},{"msgid":"- Select -","msgstr":"- Seleccionar -"},{"msgid":"Incident Sub Type:","msgstr":"Sub tipo de incidente:"},{"msgid":"Test with dependent fields","msgstr":"Ejemplo con campos dependientes"},{"msgid":"Health\/Safety","msgstr":"Salud\/Seguridad"},{"msgid":"Environment","msgstr":"Ambiente"},{"msgid":"Fatality","msgstr":"Ambiente"},{"msgid":"Lost Time Injury","msgstr":"Ambiente"},{"msgid":"Environment","msgstr":"Ambiente"},{"msgid":"Medical Treatment Injury","msgstr":"Lesiones de tratamiento m\u00e9dico"},{"msgid":"Chemical\/Substance Spill","msgstr":"Derrame qu\u00edmico \/ de sustancias"},{"msgid":"Fire\/Explosion","msgstr":"Fuego\/Explosion"},{"msgid":"Offsite Release","msgstr":"Lanzamiento fuera del sitio"}]}}',
|
||||
'DYN_VERSION' => 2,
|
||||
'DYN_UPDATE_DATE' => $date->format('Y-m-d H:i:s'),
|
||||
];
|
||||
});
|
||||
@@ -5,57 +5,66 @@
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
$factory->define(\ProcessMaker\Model\Process::class, function(Faker $faker) {
|
||||
/**
|
||||
* @todo Determine if we need more base columns populated
|
||||
*/
|
||||
$process = [
|
||||
// Return with default values
|
||||
return [
|
||||
'PRO_UID' => G::generateUniqueID(),
|
||||
'PRO_ID' => $faker->unique()->numberBetween(1, 200000),
|
||||
'PRO_TITLE' => $faker->sentence(3),
|
||||
'PRO_DESCRIPTION' => $faker->paragraph(3),
|
||||
'PRO_CREATE_USER' => '00000000000000000000000000000001',
|
||||
'PRO_DYNAFORMS' => '',
|
||||
'PRO_ITEE' => 1,
|
||||
'PRO_STATUS' => 'ACTIVE'
|
||||
'PRO_STATUS' => 'ACTIVE',
|
||||
'PRO_STATUS_ID' => 1,
|
||||
'PRO_TYPE_PROCESS' => 'PUBLIC',
|
||||
'PRO_UPDATE_DATE' => $faker->dateTime(),
|
||||
'PRO_CREATE_DATE' => $faker->dateTime(),
|
||||
'PRO_CATEGORY' => '',
|
||||
];
|
||||
|
||||
$task1 = factory(\ProcessMaker\Model\Task::class)
|
||||
->create([
|
||||
'PRO_UID' => $process['PRO_UID'],
|
||||
'TAS_START'=>'TRUE'
|
||||
]);
|
||||
|
||||
$task2 = factory(\ProcessMaker\Model\Task::class)
|
||||
->create([
|
||||
'PRO_UID' => $process['PRO_UID'],
|
||||
]);
|
||||
|
||||
//routes
|
||||
factory(\ProcessMaker\Model\Route::class)
|
||||
->create([
|
||||
'PRO_UID' => $process['PRO_UID'],
|
||||
'TAS_UID' => $task2['TAS_UID'],
|
||||
'ROU_NEXT_TASK' => '-1',
|
||||
]);
|
||||
|
||||
factory(\ProcessMaker\Model\Route::class)
|
||||
->create([
|
||||
'PRO_UID' => $process['PRO_UID'],
|
||||
'TAS_UID' => $task1['TAS_UID'],
|
||||
'ROU_NEXT_TASK' => $task2['TAS_UID']
|
||||
]);
|
||||
|
||||
//User assignments
|
||||
factory(\ProcessMaker\Model\TaskUser::class)
|
||||
->create([
|
||||
'TAS_UID' => $task1['TAS_UID'],
|
||||
'USR_UID' => \ProcessMaker\Model\User::all()->random()->USR_UID
|
||||
]);
|
||||
|
||||
factory(\ProcessMaker\Model\TaskUser::class)
|
||||
->create([
|
||||
'TAS_UID' => $task2['TAS_UID'],
|
||||
'USR_UID' => \ProcessMaker\Model\User::all()->random()->USR_UID
|
||||
]);
|
||||
|
||||
return $process;
|
||||
});
|
||||
|
||||
// Create a process with the foreign keys
|
||||
$factory->state(\ProcessMaker\Model\Process::class, 'foreign_keys', function (Faker $faker) {
|
||||
$user = factory(\ProcessMaker\Model\User::class)->create();
|
||||
return [
|
||||
'PRO_UID' => G::generateUniqueID(),
|
||||
'PRO_ID' => $faker->unique()->numberBetween(1, 200000),
|
||||
'PRO_TITLE' => $faker->sentence(3),
|
||||
'PRO_DESCRIPTION' => $faker->paragraph(3),
|
||||
'PRO_CREATE_USER' => $user->USR_UID,
|
||||
'PRO_DYNAFORMS' => '',
|
||||
'PRO_ITEE' => 1,
|
||||
'PRO_STATUS' => 'ACTIVE',
|
||||
'PRO_STATUS_ID' => 1,
|
||||
'PRO_TYPE_PROCESS' => 'PUBLIC',
|
||||
'PRO_UPDATE_DATE' => $faker->dateTime(),
|
||||
'PRO_CREATE_DATE' => $faker->dateTime(),
|
||||
'PRO_CATEGORY' => '',
|
||||
];
|
||||
});
|
||||
|
||||
// Create a process related to the flow designer
|
||||
$factory->state(\ProcessMaker\Model\Process::class, 'flow', function (Faker $faker) {
|
||||
// Create values in the foreign key relations
|
||||
$user = factory(\ProcessMaker\Model\User::class)->create();
|
||||
$process = [
|
||||
'PRO_UID' => G::generateUniqueID(),
|
||||
'PRO_ID' => $faker->unique()->numberBetween(1, 200000),
|
||||
'PRO_TITLE' => $faker->sentence(3),
|
||||
'PRO_DESCRIPTION' => $faker->paragraph(3),
|
||||
'PRO_CREATE_USER' => $user->USR_UID,
|
||||
'PRO_DYNAFORMS' => '',
|
||||
'PRO_ITEE' => 1,
|
||||
'PRO_STATUS' => 'ACTIVE',
|
||||
'PRO_STATUS_ID' => 1,
|
||||
'PRO_TYPE_PROCESS' => 'PUBLIC',
|
||||
'PRO_UPDATE_DATE' => $faker->dateTime(),
|
||||
'PRO_CREATE_DATE' => $faker->dateTime(),
|
||||
'PRO_CATEGORY' => '',
|
||||
];
|
||||
// Create a task related to this process
|
||||
$task = factory(\ProcessMaker\Model\Task::class)->create([
|
||||
'PRO_UID' => $process->PRO_UID,
|
||||
'PRO_ID' => $process->PRO_ID,
|
||||
]);
|
||||
});
|
||||
@@ -8,6 +8,7 @@ use Faker\Generator as Faker;
|
||||
$factory->define(\ProcessMaker\Model\Task::class, function(Faker $faker) {
|
||||
return [
|
||||
'PRO_UID' => G::generateUniqueID(),
|
||||
'PRO_ID' => $faker->unique()->numberBetween(),
|
||||
'TAS_UID' => G::generateUniqueID(),
|
||||
'TAS_ID' => $faker->unique()->numberBetween(),
|
||||
'TAS_TITLE' => $faker->sentence(2),
|
||||
@@ -33,10 +34,10 @@ $factory->define(\ProcessMaker\Model\Task::class, function(Faker $faker) {
|
||||
|
||||
// Create a delegation with the foreign keys
|
||||
$factory->state(\ProcessMaker\Model\Task::class, 'foreign_keys', function (Faker $faker) {
|
||||
$process = factory(\ProcessMaker\Model\Process::class)->create();
|
||||
return [
|
||||
'PRO_UID' => function() {
|
||||
return $process = factory(\ProcessMaker\Model\Process::class)->create();
|
||||
},
|
||||
'PRO_UID' => $process->PRO_UID,
|
||||
'PRO_ID' => $process->PRO_ID,
|
||||
'TAS_UID' => G::generateUniqueID(),
|
||||
'TAS_ID' => $faker->unique()->numberBetween(1, 200000),
|
||||
'TAS_TITLE' => $faker->sentence(2),
|
||||
|
||||
@@ -544,6 +544,7 @@ class WebApplication
|
||||
|
||||
config(['app.timezone' => TIME_ZONE]);
|
||||
|
||||
// Define the language
|
||||
Bootstrap::setLanguage();
|
||||
|
||||
Bootstrap::LoadTranslationObject((defined("SYS_LANG")) ? SYS_LANG : "en");
|
||||
|
||||
@@ -1,28 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* defaultAjax.php
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
/*NEXT LINE: Runs any configuration defined to be executed before dependent fields recalc*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
@@ -30,8 +6,6 @@ if (isset($_SESSION['CURRENT_PAGE_INITILIZATION'])) {
|
||||
eval($_SESSION['CURRENT_PAGE_INITILIZATION']);
|
||||
}
|
||||
|
||||
|
||||
// $json=new Services_JSON();
|
||||
if (!defined('XMLFORM_AJAX_PATH')) {
|
||||
define('XMLFORM_AJAX_PATH', PATH_XMLFORM);
|
||||
}
|
||||
@@ -63,11 +37,11 @@ $G_FORM->values = isset($_SESSION[$G_FORM->id]) ? $_SESSION[$G_FORM->id] : array
|
||||
$newValues = (Bootstrap::json_decode(urlDecode(stripslashes($_POST['fields']))));
|
||||
|
||||
if (isset($_POST['grid'])) {
|
||||
$_POST['row'] = (int)$_POST['row'];
|
||||
$_POST['row'] = (int) $_POST['row'];
|
||||
$aAux = array();
|
||||
|
||||
foreach ($newValues as $sKey => $newValue) {
|
||||
$newValue = (array)$newValue;
|
||||
$newValue = (array) $newValue;
|
||||
$aKeys = array_keys($newValue);
|
||||
if (count($aKeys) > 0) {
|
||||
$aValues = array();
|
||||
@@ -88,7 +62,7 @@ if (count($newValues) > 1 && isset($_POST['grid'])) {
|
||||
for ($r2 = 1; $r2 <= $_POST['row']; $r2++) {
|
||||
foreach ($values as $class => $value) {
|
||||
if ($class == $_POST['grid']) {
|
||||
$value = (array)$value;
|
||||
$value = (array) $value;
|
||||
$arrayK = $value[$r2];
|
||||
foreach ($arrayK as $key2 => $val) {
|
||||
$fieldBase[$r2][$key2] = is_array($val) ? $val[$key2] : $val;
|
||||
@@ -107,7 +81,7 @@ if (count($newValues) > 1 && isset($_POST['grid'])) {
|
||||
$dependentFields = array();
|
||||
$aux = array();
|
||||
for ($r = 0; $r < count($newValues); $r++) {
|
||||
$newValues[$r] = (array)$newValues[$r];
|
||||
$newValues[$r] = (array) $newValues[$r];
|
||||
$G_FORM->setValues($newValues[$r]);
|
||||
//Search dependent fields
|
||||
foreach ($newValues[$r] as $k => $v) {
|
||||
@@ -117,7 +91,11 @@ for ($r = 0; $r < count($newValues); $r++) {
|
||||
} else {
|
||||
foreach ($v[$_POST['row']] as $k1 => $v1) {
|
||||
$myDependentFields = subDependencies($k1, $G_FORM, $aux, $_POST['grid']);
|
||||
$_SESSION[$G_FORM->id][$_POST['grid']][$_POST['row']][$k1] = $v1;
|
||||
$_SESSION[$G_FORM->id][$_POST['grid']] = [
|
||||
$_POST['row'] => [
|
||||
$k1 => $v1
|
||||
]
|
||||
];
|
||||
$G_FORM->values[$_POST['grid']][$_POST['row']][$k1] = $v1;
|
||||
}
|
||||
}
|
||||
@@ -142,12 +120,12 @@ $G_FORM->values = $newForm;
|
||||
$arrayFieldSubDependent = array();
|
||||
|
||||
if (isset($_POST["grid"])) {
|
||||
$arrayField = (array)(Bootstrap::json_decode(urlDecode(stripslashes($_POST["fields"]))));
|
||||
$arrayField = (array) (Bootstrap::json_decode(urlDecode(stripslashes($_POST["fields"]))));
|
||||
$arrayDependentField = array();
|
||||
$ereg = null;
|
||||
|
||||
foreach ($arrayField as $fieldData) {
|
||||
$arrayAux = (array)($fieldData);
|
||||
$arrayAux = (array) ($fieldData);
|
||||
|
||||
foreach ($arrayAux as $index => $value) {
|
||||
$ereg = $ereg . (($ereg != null) ? "|" : null) . $index; //Concatenate field
|
||||
@@ -185,7 +163,7 @@ if (isset($_POST["grid"])) {
|
||||
//Completed all fields of the grid
|
||||
if (isset($_POST["grid"]) && isset($_POST["gridField"])) {
|
||||
//Completed all fields of the grid
|
||||
$arrayGridField = (array)(Bootstrap::json_decode(urldecode(stripslashes($_POST["gridField"]))));
|
||||
$arrayGridField = (array) (Bootstrap::json_decode(urldecode(stripslashes($_POST["gridField"]))));
|
||||
|
||||
foreach ($arrayGridField as $index => $value) {
|
||||
$G_FORM->values[$_POST["grid"]][$_POST["row"]][$index] = $value;
|
||||
|
||||
@@ -2616,22 +2616,37 @@ class Bootstrap
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Language
|
||||
* Set Language defined in HTTP_ACCEPT_LANGUAGE
|
||||
* Only will accept if the language defined exist in the list of Admin > Settings > Language
|
||||
*
|
||||
* @link https://wiki.processmaker.com/3.2/Languages#Installing_the_PO_File
|
||||
*/
|
||||
public static function setLanguage()
|
||||
{
|
||||
$acceptLanguage = isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])?$_SERVER['HTTP_ACCEPT_LANGUAGE']:'en';
|
||||
$acceptLanguage = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : 'en';
|
||||
$langServer = $acceptLanguage;
|
||||
if (!defined('SYS_LANG')) {
|
||||
$Translations = new \Translation;
|
||||
$Translations = new Translation;
|
||||
// Get the translation uploaded in the system
|
||||
$translationsTable = $Translations->getTranslationEnvironments();
|
||||
$inLang = false;
|
||||
foreach ($translationsTable as $locale) {
|
||||
if ($locale['LOCALE'] == $acceptLanguage) {
|
||||
// Check if the language used was uploaded in the Language
|
||||
// The languages can defined like this : en, en-US (language-localization)
|
||||
// We need to validate if the language exist it does not matter the localization
|
||||
$langServer = $locale['LOCALE'];
|
||||
$language = explode('-', $langServer);
|
||||
$language = head($language);
|
||||
if ($language === $acceptLanguage) {
|
||||
$inLang = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$lang = $inLang?$acceptLanguage:'en';
|
||||
// Overwriting the language defined in the server
|
||||
// Example 1. Accept-Language = pt and langServer = pt-BR, result SYS_LANG = pt-BR
|
||||
// Example 2. Accept-Language = pt and langServer = pt, result SYS_LANG = pt
|
||||
// Example 3. Accept-Language = it and langServer = NONE, result SYS_LANG = en
|
||||
$lang = ($inLang) ? $langServer : 'en';
|
||||
define("SYS_LANG", $lang);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
<filter>
|
||||
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="false">
|
||||
<directory suffix=".php">./gulliver</directory>
|
||||
<directory suffix=".php">./workflow/engine/classes</directory>
|
||||
<directory suffix=".php">./workflow/engine/src</directory>
|
||||
</whitelist>
|
||||
|
||||
@@ -54,6 +54,8 @@ define('PATH_HTML', PATH_HOME . 'public_html/');
|
||||
define('PATH_SMARTY_C', PATH_TRUNK . '/shared/compiled/smarty/c');
|
||||
define('PATH_SMARTY_CACHE', PATH_TRUNK . '/shared/compiled/smarty/cache');
|
||||
define('PATH_THIRDPARTY', PATH_TRUNK . '/thirdparty/');
|
||||
define("URL_KEY", 'c0l0s40pt1mu59r1m3');
|
||||
define("PATH_XMLFORM", PATH_CORE . "xmlform" . PATH_SEP);
|
||||
|
||||
// Set Time Zone
|
||||
$_SESSION['__SYSTEM_UTC_TIME_ZONE__'] = (int) (env('MAIN_SYSTEM_UTC_TIME_ZONE', 'workflow')) == 1;
|
||||
|
||||
6440
tests/resources/GranularImporterTest.json
Normal file
6440
tests/resources/GranularImporterTest.json
Normal file
File diff suppressed because it is too large
Load Diff
1347
tests/resources/p1normal-1.pmx
Normal file
1347
tests/resources/p1normal-1.pmx
Normal file
File diff suppressed because it is too large
Load Diff
156
tests/resources/p1normalWithException-1.pmx
Normal file
156
tests/resources/p1normalWithException-1.pmx
Normal file
@@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ProcessMaker-Project version="3.0">
|
||||
<metadata>
|
||||
<meta key="vendor_version"><![CDATA[(Branch bugfix/PMC-138)]]></meta>
|
||||
<meta key="vendor_version_code">Michelangelo</meta>
|
||||
<meta key="export_timestamp">1571948720</meta>
|
||||
<meta key="export_datetime"><![CDATA[2019-10-24T20:25:20+00:00]]></meta>
|
||||
<meta key="export_server_addr"><![CDATA[172.16.3.67:8091]]></meta>
|
||||
<meta key="export_server_os">Linux</meta>
|
||||
<meta key="export_server_php_version">70132</meta>
|
||||
<meta key="workspace">workflow</meta>
|
||||
<meta key="name">p1normalWithException</meta>
|
||||
<meta key="uid">8881455415db208a91cf144066685122</meta>
|
||||
</metadata>
|
||||
<definition class="BPMN">
|
||||
<table name="ACTIVITY"/>
|
||||
<table name="ARTIFACT"/>
|
||||
<table name="BOUND"/>
|
||||
<table name="DATA"/>
|
||||
<table name="DIAGRAM">
|
||||
<record>
|
||||
<dia_uid>8820979315db208a91fd6c8053956230</dia_uid>
|
||||
<prj_uid>8881455415db208a91cf144066685122</prj_uid>
|
||||
<dia_name>p1normalWithException</dia_name>
|
||||
<dia_is_closable>0</dia_is_closable>
|
||||
</record>
|
||||
</table>
|
||||
<table name="DOCUMENTATION"/>
|
||||
<table name="EVENT"/>
|
||||
<table name="EXTENSION"/>
|
||||
<table name="FLOW"/>
|
||||
<table name="GATEWAY"/>
|
||||
<table name="LANE"/>
|
||||
<table name="LANESET"/>
|
||||
<table name="PARTICIPANT"/>
|
||||
<table name="PROCESS">
|
||||
<record>
|
||||
<pro_uid>3930204045db208a92004a9028237855</pro_uid>
|
||||
<prj_uid>8881455415db208a91cf144066685122</prj_uid>
|
||||
<dia_uid>8820979315db208a91fd6c8053956230</dia_uid>
|
||||
<pro_name>p1normalWithException</pro_name>
|
||||
<pro_type>NONE</pro_type>
|
||||
<pro_is_executable>0</pro_is_executable>
|
||||
<pro_is_closed>0</pro_is_closed>
|
||||
<pro_is_subprocess>0</pro_is_subprocess>
|
||||
</record>
|
||||
</table>
|
||||
<table name="PROJECT">
|
||||
<record>
|
||||
<prj_uid>8881455415db208a91cf144066685122</prj_uid>
|
||||
<prj_name>p1normalWithException</prj_name>
|
||||
<prj_description></prj_description>
|
||||
<prj_target_namespace></prj_target_namespace>
|
||||
<prj_expresion_language></prj_expresion_language>
|
||||
<prj_type_language></prj_type_language>
|
||||
<prj_exporter></prj_exporter>
|
||||
<prj_exporter_version></prj_exporter_version>
|
||||
<prj_create_date><![CDATA[2019-10-24 20:25:13]]></prj_create_date>
|
||||
<prj_update_date></prj_update_date>
|
||||
<prj_author>6089564115db1b5c1377263061626288</prj_author>
|
||||
<prj_author_version></prj_author_version>
|
||||
<prj_original_source></prj_original_source>
|
||||
</record>
|
||||
</table>
|
||||
</definition>
|
||||
<definition class="workflow">
|
||||
<table name="process">
|
||||
<record>
|
||||
<pro_uid>8881455415db208a91cf144066685122</pro_uid>
|
||||
<pro_title>p1normalWithException</pro_title>
|
||||
<pro_description></pro_description>
|
||||
<pro_parent>8881455415db208a91cf144066685122</pro_parent>
|
||||
<pro_time>1</pro_time>
|
||||
<pro_timeunit>DAYS</pro_timeunit>
|
||||
<pro_status>ACTIVE</pro_status>
|
||||
<pro_status_id>1</pro_status_id>
|
||||
<pro_type_day></pro_type_day>
|
||||
<pro_type>NORMAL</pro_type>
|
||||
<pro_assignment>FALSE</pro_assignment>
|
||||
<pro_show_map>0</pro_show_map>
|
||||
<pro_show_message>0</pro_show_message>
|
||||
<pro_subprocess>0</pro_subprocess>
|
||||
<pro_tri_create></pro_tri_create>
|
||||
<pro_tri_open></pro_tri_open>
|
||||
<pro_tri_deleted></pro_tri_deleted>
|
||||
<pro_tri_canceled></pro_tri_canceled>
|
||||
<pro_tri_paused></pro_tri_paused>
|
||||
<pro_tri_reassigned></pro_tri_reassigned>
|
||||
<pro_tri_unpaused></pro_tri_unpaused>
|
||||
<pro_type_process>PUBLIC</pro_type_process>
|
||||
<pro_show_delegate>0</pro_show_delegate>
|
||||
<pro_show_dynaform>0</pro_show_dynaform>
|
||||
<pro_category></pro_category>
|
||||
<pro_sub_category></pro_sub_category>
|
||||
<pro_industry>0</pro_industry>
|
||||
<pro_update_date></pro_update_date>
|
||||
<pro_create_date><![CDATA[2019-10-24 20:25:13]]></pro_create_date>
|
||||
<pro_create_user>6089564115db1b5c1377263061626288</pro_create_user>
|
||||
<pro_height>5000</pro_height>
|
||||
<pro_width>10000</pro_width>
|
||||
<pro_title_x>0</pro_title_x>
|
||||
<pro_title_y>0</pro_title_y>
|
||||
<pro_debug>0</pro_debug>
|
||||
<pro_dynaforms></pro_dynaforms>
|
||||
<pro_derivation_screen_tpl></pro_derivation_screen_tpl>
|
||||
<pro_cost>0</pro_cost>
|
||||
<pro_unit_cost></pro_unit_cost>
|
||||
<pro_itee>1</pro_itee>
|
||||
<pro_action_done></pro_action_done>
|
||||
<category_id>0</category_id>
|
||||
<pro_category_label>No Category</pro_category_label>
|
||||
<pro_bpmn>1</pro_bpmn>
|
||||
</record>
|
||||
</table>
|
||||
<table name="tasks"/>
|
||||
<table name="routes"/>
|
||||
<table name="lanes"/>
|
||||
<table name="gateways"/>
|
||||
<table name="inputs"/>
|
||||
<table name="outputs"/>
|
||||
<table name="dynaforms"/>
|
||||
<table name="steps"/>
|
||||
<table name="triggers"/>
|
||||
<table name="taskusers"/>
|
||||
<table name="groupwfs"/>
|
||||
<table name="steptriggers"/>
|
||||
<table name="dbconnections"/>
|
||||
<table name="reportTables"/>
|
||||
<table name="reportTablesVars"/>
|
||||
<table name="stepSupervisor"/>
|
||||
<table name="objectPermissions"/>
|
||||
<table name="subProcess"/>
|
||||
<table name="caseTracker"/>
|
||||
<table name="caseTrackerObject"/>
|
||||
<table name="stage"/>
|
||||
<table name="fieldCondition"/>
|
||||
<table name="event"/>
|
||||
<table name="caseScheduler"/>
|
||||
<table name="processCategory"/>
|
||||
<table name="taskExtraProperties"/>
|
||||
<table name="processUser"/>
|
||||
<table name="processVariables"/>
|
||||
<table name="webEntry"/>
|
||||
<table name="webEntryEvent"/>
|
||||
<table name="messageType"/>
|
||||
<table name="messageTypeVariable"/>
|
||||
<table name="messageEventDefinition"/>
|
||||
<table name="scriptTask"/>
|
||||
<table name="timerEvent"/>
|
||||
<table name="emailEvent"/>
|
||||
<table name="filesManager"/>
|
||||
<table name="abeConfiguration"/>
|
||||
<table name="elementTask"/>
|
||||
</definition>
|
||||
<workflow-files/>
|
||||
</ProcessMaker-Project>
|
||||
457
tests/resources/p1normalWithoutTitle-1.pmx
Normal file
457
tests/resources/p1normalWithoutTitle-1.pmx
Normal file
@@ -0,0 +1,457 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ProcessMaker-Project version="3.0">
|
||||
<metadata>
|
||||
<meta key="vendor_version"><![CDATA[(Branch bugfix/PMC-138)]]></meta>
|
||||
<meta key="vendor_version_code">Michelangelo</meta>
|
||||
<meta key="export_timestamp">1571952775</meta>
|
||||
<meta key="export_datetime"><![CDATA[2019-10-24T21:32:55+00:00]]></meta>
|
||||
<meta key="export_server_addr"><![CDATA[172.16.3.67:8091]]></meta>
|
||||
<meta key="export_server_os">Linux</meta>
|
||||
<meta key="export_server_php_version">70132</meta>
|
||||
<meta key="workspace">workflow</meta>
|
||||
<meta key="name">p1normalWithoutTitle</meta>
|
||||
<meta key="uid">2478934075db21861883091023775646</meta>
|
||||
</metadata>
|
||||
<definition class="BPMN">
|
||||
<table name="ACTIVITY">
|
||||
<record>
|
||||
<act_uid>8121252905db218785abec1096943718</act_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<pro_uid>9720974155db218618a7ea7026775087</pro_uid>
|
||||
<act_name>Task 1</act_name>
|
||||
<act_type>TASK</act_type>
|
||||
<act_is_for_compensation>0</act_is_for_compensation>
|
||||
<act_start_quantity>1</act_start_quantity>
|
||||
<act_completion_quantity>0</act_completion_quantity>
|
||||
<act_task_type>EMPTY</act_task_type>
|
||||
<act_implementation></act_implementation>
|
||||
<act_instantiate>0</act_instantiate>
|
||||
<act_script_type></act_script_type>
|
||||
<act_script></act_script>
|
||||
<act_loop_type>EMPTY</act_loop_type>
|
||||
<act_test_before>0</act_test_before>
|
||||
<act_loop_maximum>0</act_loop_maximum>
|
||||
<act_loop_condition>0</act_loop_condition>
|
||||
<act_loop_cardinality>0</act_loop_cardinality>
|
||||
<act_loop_behavior>0</act_loop_behavior>
|
||||
<act_is_adhoc>0</act_is_adhoc>
|
||||
<act_is_collapsed>0</act_is_collapsed>
|
||||
<act_completion_condition>0</act_completion_condition>
|
||||
<act_ordering>0</act_ordering>
|
||||
<act_cancel_remaining_instances>1</act_cancel_remaining_instances>
|
||||
<act_protocol>0</act_protocol>
|
||||
<act_method>0</act_method>
|
||||
<act_is_global>0</act_is_global>
|
||||
<act_referer>0</act_referer>
|
||||
<act_default_flow>0</act_default_flow>
|
||||
<act_master_diagram>0</act_master_diagram>
|
||||
<bou_uid>8364747905db218785b7404015959810</bou_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<element_uid>8121252905db218785abec1096943718</element_uid>
|
||||
<bou_element>4784291195db21862519f69041420620</bou_element>
|
||||
<bou_element_type>bpmnActivity</bou_element_type>
|
||||
<bou_x>180</bou_x>
|
||||
<bou_y>79</bou_y>
|
||||
<bou_width>150</bou_width>
|
||||
<bou_height>75</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
</table>
|
||||
<table name="ARTIFACT"/>
|
||||
<table name="BOUND">
|
||||
<record>
|
||||
<bou_uid>2283183075db218786549c5095832051</bou_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<element_uid>4205250135db2187864df85018323241</element_uid>
|
||||
<bou_element>4784291195db21862519f69041420620</bou_element>
|
||||
<bou_element_type>bpmnEvent</bou_element_type>
|
||||
<bou_x>378</bou_x>
|
||||
<bou_y>100</bou_y>
|
||||
<bou_width>33</bou_width>
|
||||
<bou_height>33</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
<record>
|
||||
<bou_uid>7810988885db21878637855082875408</bou_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<element_uid>9473649565db2187862a5f7053654507</element_uid>
|
||||
<bou_element>4784291195db21862519f69041420620</bou_element>
|
||||
<bou_element_type>bpmnEvent</bou_element_type>
|
||||
<bou_x>100</bou_x>
|
||||
<bou_y>100</bou_y>
|
||||
<bou_width>33</bou_width>
|
||||
<bou_height>33</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
<record>
|
||||
<bou_uid>8364747905db218785b7404015959810</bou_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<element_uid>8121252905db218785abec1096943718</element_uid>
|
||||
<bou_element>4784291195db21862519f69041420620</bou_element>
|
||||
<bou_element_type>bpmnActivity</bou_element_type>
|
||||
<bou_x>180</bou_x>
|
||||
<bou_y>79</bou_y>
|
||||
<bou_width>150</bou_width>
|
||||
<bou_height>75</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
</table>
|
||||
<table name="DATA"/>
|
||||
<table name="DIAGRAM">
|
||||
<record>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<dia_name>p1normalWithoutTitle</dia_name>
|
||||
<dia_is_closable>0</dia_is_closable>
|
||||
</record>
|
||||
</table>
|
||||
<table name="DOCUMENTATION"/>
|
||||
<table name="EVENT">
|
||||
<record>
|
||||
<evn_uid>4205250135db2187864df85018323241</evn_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<pro_uid>9720974155db218618a7ea7026775087</pro_uid>
|
||||
<evn_name></evn_name>
|
||||
<evn_type>END</evn_type>
|
||||
<evn_marker>EMPTY</evn_marker>
|
||||
<evn_is_interrupting>1</evn_is_interrupting>
|
||||
<evn_attached_to></evn_attached_to>
|
||||
<evn_cancel_activity>0</evn_cancel_activity>
|
||||
<evn_activity_ref></evn_activity_ref>
|
||||
<evn_wait_for_completion>0</evn_wait_for_completion>
|
||||
<evn_error_name></evn_error_name>
|
||||
<evn_error_code></evn_error_code>
|
||||
<evn_escalation_name></evn_escalation_name>
|
||||
<evn_escalation_code></evn_escalation_code>
|
||||
<evn_condition></evn_condition>
|
||||
<evn_message></evn_message>
|
||||
<evn_operation_name></evn_operation_name>
|
||||
<evn_operation_implementation_ref></evn_operation_implementation_ref>
|
||||
<evn_time_date></evn_time_date>
|
||||
<evn_time_cycle></evn_time_cycle>
|
||||
<evn_time_duration></evn_time_duration>
|
||||
<evn_behavior>THROW</evn_behavior>
|
||||
<bou_uid>2283183075db218786549c5095832051</bou_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<element_uid>4205250135db2187864df85018323241</element_uid>
|
||||
<bou_element>4784291195db21862519f69041420620</bou_element>
|
||||
<bou_element_type>bpmnEvent</bou_element_type>
|
||||
<bou_x>378</bou_x>
|
||||
<bou_y>100</bou_y>
|
||||
<bou_width>33</bou_width>
|
||||
<bou_height>33</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
<record>
|
||||
<evn_uid>9473649565db2187862a5f7053654507</evn_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<pro_uid>9720974155db218618a7ea7026775087</pro_uid>
|
||||
<evn_name></evn_name>
|
||||
<evn_type>START</evn_type>
|
||||
<evn_marker>EMPTY</evn_marker>
|
||||
<evn_is_interrupting>1</evn_is_interrupting>
|
||||
<evn_attached_to></evn_attached_to>
|
||||
<evn_cancel_activity>0</evn_cancel_activity>
|
||||
<evn_activity_ref></evn_activity_ref>
|
||||
<evn_wait_for_completion>0</evn_wait_for_completion>
|
||||
<evn_error_name></evn_error_name>
|
||||
<evn_error_code></evn_error_code>
|
||||
<evn_escalation_name></evn_escalation_name>
|
||||
<evn_escalation_code></evn_escalation_code>
|
||||
<evn_condition></evn_condition>
|
||||
<evn_message>LEAD</evn_message>
|
||||
<evn_operation_name></evn_operation_name>
|
||||
<evn_operation_implementation_ref></evn_operation_implementation_ref>
|
||||
<evn_time_date></evn_time_date>
|
||||
<evn_time_cycle></evn_time_cycle>
|
||||
<evn_time_duration></evn_time_duration>
|
||||
<evn_behavior>CATCH</evn_behavior>
|
||||
<bou_uid>7810988885db21878637855082875408</bou_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<element_uid>9473649565db2187862a5f7053654507</element_uid>
|
||||
<bou_element>4784291195db21862519f69041420620</bou_element>
|
||||
<bou_element_type>bpmnEvent</bou_element_type>
|
||||
<bou_x>100</bou_x>
|
||||
<bou_y>100</bou_y>
|
||||
<bou_width>33</bou_width>
|
||||
<bou_height>33</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
</table>
|
||||
<table name="EXTENSION"/>
|
||||
<table name="FLOW">
|
||||
<record>
|
||||
<flo_uid>1154017545db21878680728046544809</flo_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<flo_type>SEQUENCE</flo_type>
|
||||
<flo_name> </flo_name>
|
||||
<flo_element_origin>9473649565db2187862a5f7053654507</flo_element_origin>
|
||||
<flo_element_origin_type>bpmnEvent</flo_element_origin_type>
|
||||
<flo_element_origin_port>0</flo_element_origin_port>
|
||||
<flo_element_dest>8121252905db218785abec1096943718</flo_element_dest>
|
||||
<flo_element_dest_type>bpmnActivity</flo_element_dest_type>
|
||||
<flo_element_dest_port>0</flo_element_dest_port>
|
||||
<flo_is_inmediate>1</flo_is_inmediate>
|
||||
<flo_condition></flo_condition>
|
||||
<flo_x1>133</flo_x1>
|
||||
<flo_y1>117</flo_y1>
|
||||
<flo_x2>180</flo_x2>
|
||||
<flo_y2>117</flo_y2>
|
||||
<flo_state><![CDATA[[{"x":133,"y":117},{"x":180,"y":117}]]]></flo_state>
|
||||
<flo_position>1</flo_position>
|
||||
</record>
|
||||
<record>
|
||||
<flo_uid>4538701885db21878683a20080373564</flo_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<flo_type>SEQUENCE</flo_type>
|
||||
<flo_name> </flo_name>
|
||||
<flo_element_origin>8121252905db218785abec1096943718</flo_element_origin>
|
||||
<flo_element_origin_type>bpmnActivity</flo_element_origin_type>
|
||||
<flo_element_origin_port>0</flo_element_origin_port>
|
||||
<flo_element_dest>4205250135db2187864df85018323241</flo_element_dest>
|
||||
<flo_element_dest_type>bpmnEvent</flo_element_dest_type>
|
||||
<flo_element_dest_port>0</flo_element_dest_port>
|
||||
<flo_is_inmediate>1</flo_is_inmediate>
|
||||
<flo_condition></flo_condition>
|
||||
<flo_x1>331</flo_x1>
|
||||
<flo_y1>117</flo_y1>
|
||||
<flo_x2>378</flo_x2>
|
||||
<flo_y2>117</flo_y2>
|
||||
<flo_state><![CDATA[[{"x":331,"y":117},{"x":378,"y":117}]]]></flo_state>
|
||||
<flo_position>1</flo_position>
|
||||
</record>
|
||||
</table>
|
||||
<table name="GATEWAY"/>
|
||||
<table name="LANE"/>
|
||||
<table name="LANESET"/>
|
||||
<table name="PARTICIPANT"/>
|
||||
<table name="PROCESS">
|
||||
<record>
|
||||
<pro_uid>9720974155db218618a7ea7026775087</pro_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<pro_name>p1normalWithoutTitle</pro_name>
|
||||
<pro_type>NONE</pro_type>
|
||||
<pro_is_executable>0</pro_is_executable>
|
||||
<pro_is_closed>0</pro_is_closed>
|
||||
<pro_is_subprocess>0</pro_is_subprocess>
|
||||
</record>
|
||||
</table>
|
||||
<table name="PROJECT">
|
||||
<record>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<prj_name>p1normalWithoutTitle</prj_name>
|
||||
<prj_description></prj_description>
|
||||
<prj_target_namespace></prj_target_namespace>
|
||||
<prj_expresion_language></prj_expresion_language>
|
||||
<prj_type_language></prj_type_language>
|
||||
<prj_exporter></prj_exporter>
|
||||
<prj_exporter_version></prj_exporter_version>
|
||||
<prj_create_date><![CDATA[2019-10-24 21:32:17]]></prj_create_date>
|
||||
<prj_update_date><![CDATA[2019-10-24 21:32:46]]></prj_update_date>
|
||||
<prj_author>00000000000000000000000000000001</prj_author>
|
||||
<prj_author_version></prj_author_version>
|
||||
<prj_original_source></prj_original_source>
|
||||
</record>
|
||||
</table>
|
||||
</definition>
|
||||
<definition class="workflow">
|
||||
<table name="process">
|
||||
<record>
|
||||
<pro_uid>2478934075db21861883091023775646</pro_uid>
|
||||
<pro_title>p1normalWithoutTitle</pro_title>
|
||||
<pro_description></pro_description>
|
||||
<pro_parent>2478934075db21861883091023775646</pro_parent>
|
||||
<pro_time>1</pro_time>
|
||||
<pro_timeunit>DAYS</pro_timeunit>
|
||||
<pro_status>ACTIVE</pro_status>
|
||||
<pro_status_id>1</pro_status_id>
|
||||
<pro_type_day></pro_type_day>
|
||||
<pro_type>NORMAL</pro_type>
|
||||
<pro_assignment>FALSE</pro_assignment>
|
||||
<pro_show_map>0</pro_show_map>
|
||||
<pro_show_message>0</pro_show_message>
|
||||
<pro_subprocess>0</pro_subprocess>
|
||||
<pro_tri_create></pro_tri_create>
|
||||
<pro_tri_open></pro_tri_open>
|
||||
<pro_tri_deleted></pro_tri_deleted>
|
||||
<pro_tri_canceled></pro_tri_canceled>
|
||||
<pro_tri_paused></pro_tri_paused>
|
||||
<pro_tri_reassigned></pro_tri_reassigned>
|
||||
<pro_tri_unpaused></pro_tri_unpaused>
|
||||
<pro_type_process>PUBLIC</pro_type_process>
|
||||
<pro_show_delegate>0</pro_show_delegate>
|
||||
<pro_show_dynaform>0</pro_show_dynaform>
|
||||
<pro_category></pro_category>
|
||||
<pro_sub_category></pro_sub_category>
|
||||
<pro_industry>0</pro_industry>
|
||||
<pro_update_date><![CDATA[2019-10-24 21:32:46]]></pro_update_date>
|
||||
<pro_create_date><![CDATA[2019-10-24 21:32:17]]></pro_create_date>
|
||||
<pro_create_user>00000000000000000000000000000001</pro_create_user>
|
||||
<pro_height>5000</pro_height>
|
||||
<pro_width>10000</pro_width>
|
||||
<pro_title_x>0</pro_title_x>
|
||||
<pro_title_y>0</pro_title_y>
|
||||
<pro_debug>0</pro_debug>
|
||||
<pro_dynaforms></pro_dynaforms>
|
||||
<pro_derivation_screen_tpl></pro_derivation_screen_tpl>
|
||||
<pro_cost>0</pro_cost>
|
||||
<pro_unit_cost></pro_unit_cost>
|
||||
<pro_itee>1</pro_itee>
|
||||
<pro_action_done><![CDATA[a:1:{i:0;s:41:"GATEWAYTOGATEWAY_DELETE_CORRUPTED_RECORDS";}]]></pro_action_done>
|
||||
<category_id>0</category_id>
|
||||
<pro_category_label>No Category</pro_category_label>
|
||||
<pro_bpmn>1</pro_bpmn>
|
||||
</record>
|
||||
</table>
|
||||
<table name="tasks">
|
||||
<record>
|
||||
<pro_uid>2478934075db21861883091023775646</pro_uid>
|
||||
<pro_id>0</pro_id>
|
||||
<tas_uid>8121252905db218785abec1096943718</tas_uid>
|
||||
<tas_title>Task 1</tas_title>
|
||||
<tas_description></tas_description>
|
||||
<tas_def_title></tas_def_title>
|
||||
<tas_def_subject_message></tas_def_subject_message>
|
||||
<tas_def_proc_code></tas_def_proc_code>
|
||||
<tas_def_message></tas_def_message>
|
||||
<tas_def_description></tas_def_description>
|
||||
<tas_type>NORMAL</tas_type>
|
||||
<tas_duration>1</tas_duration>
|
||||
<tas_delay_type></tas_delay_type>
|
||||
<tas_temporizer>0</tas_temporizer>
|
||||
<tas_type_day></tas_type_day>
|
||||
<tas_timeunit>DAYS</tas_timeunit>
|
||||
<tas_alert>FALSE</tas_alert>
|
||||
<tas_priority_variable></tas_priority_variable>
|
||||
<tas_assign_type>BALANCED</tas_assign_type>
|
||||
<tas_assign_variable><![CDATA[@@SYS_NEXT_USER_TO_BE_ASSIGNED]]></tas_assign_variable>
|
||||
<tas_group_variable></tas_group_variable>
|
||||
<tas_mi_instance_variable><![CDATA[@@SYS_VAR_TOTAL_INSTANCE]]></tas_mi_instance_variable>
|
||||
<tas_mi_complete_variable><![CDATA[@@SYS_VAR_TOTAL_INSTANCES_COMPLETE]]></tas_mi_complete_variable>
|
||||
<tas_assign_location>FALSE</tas_assign_location>
|
||||
<tas_assign_location_adhoc>FALSE</tas_assign_location_adhoc>
|
||||
<tas_transfer_fly>FALSE</tas_transfer_fly>
|
||||
<tas_last_assigned>0</tas_last_assigned>
|
||||
<tas_user>0</tas_user>
|
||||
<tas_can_upload>FALSE</tas_can_upload>
|
||||
<tas_view_upload>FALSE</tas_view_upload>
|
||||
<tas_view_additional_documentation>FALSE</tas_view_additional_documentation>
|
||||
<tas_can_cancel>FALSE</tas_can_cancel>
|
||||
<tas_owner_app>FALSE</tas_owner_app>
|
||||
<stg_uid></stg_uid>
|
||||
<tas_can_pause>FALSE</tas_can_pause>
|
||||
<tas_can_send_message>TRUE</tas_can_send_message>
|
||||
<tas_can_delete_docs>FALSE</tas_can_delete_docs>
|
||||
<tas_self_service>FALSE</tas_self_service>
|
||||
<tas_start>TRUE</tas_start>
|
||||
<tas_to_last_user>FALSE</tas_to_last_user>
|
||||
<tas_send_last_email>FALSE</tas_send_last_email>
|
||||
<tas_derivation>NORMAL</tas_derivation>
|
||||
<tas_posx>180</tas_posx>
|
||||
<tas_posy>79</tas_posy>
|
||||
<tas_width>110</tas_width>
|
||||
<tas_height>60</tas_height>
|
||||
<tas_color></tas_color>
|
||||
<tas_evn_uid></tas_evn_uid>
|
||||
<tas_boundary></tas_boundary>
|
||||
<tas_derivation_screen_tpl></tas_derivation_screen_tpl>
|
||||
<tas_selfservice_timeout>0</tas_selfservice_timeout>
|
||||
<tas_selfservice_time>0</tas_selfservice_time>
|
||||
<tas_selfservice_time_unit></tas_selfservice_time_unit>
|
||||
<tas_selfservice_trigger_uid></tas_selfservice_trigger_uid>
|
||||
<tas_selfservice_execution>EVERY_TIME</tas_selfservice_execution>
|
||||
<tas_not_email_from_format>0</tas_not_email_from_format>
|
||||
<tas_offline>FALSE</tas_offline>
|
||||
<tas_email_server_uid></tas_email_server_uid>
|
||||
<tas_auto_root>FALSE</tas_auto_root>
|
||||
<tas_receive_server_uid></tas_receive_server_uid>
|
||||
<tas_receive_last_email>FALSE</tas_receive_last_email>
|
||||
<tas_receive_email_from_format>0</tas_receive_email_from_format>
|
||||
<tas_receive_message_type>text</tas_receive_message_type>
|
||||
<tas_receive_message_template>alert_message.html</tas_receive_message_template>
|
||||
<tas_receive_subject_message></tas_receive_subject_message>
|
||||
<tas_receive_message></tas_receive_message>
|
||||
<tas_average></tas_average>
|
||||
<tas_sdv></tas_sdv>
|
||||
</record>
|
||||
</table>
|
||||
<table name="routes">
|
||||
<record>
|
||||
<rou_uid>3616902375db2187ea8ff68051664528</rou_uid>
|
||||
<rou_parent>0</rou_parent>
|
||||
<pro_uid>2478934075db21861883091023775646</pro_uid>
|
||||
<tas_uid>8121252905db218785abec1096943718</tas_uid>
|
||||
<rou_next_task>-1</rou_next_task>
|
||||
<rou_case>1</rou_case>
|
||||
<rou_type>SEQUENTIAL</rou_type>
|
||||
<rou_default>0</rou_default>
|
||||
<rou_condition></rou_condition>
|
||||
<rou_to_last_user>FALSE</rou_to_last_user>
|
||||
<rou_optional>FALSE</rou_optional>
|
||||
<rou_send_email>TRUE</rou_send_email>
|
||||
<rou_sourceanchor>1</rou_sourceanchor>
|
||||
<rou_targetanchor>0</rou_targetanchor>
|
||||
<rou_to_port>1</rou_to_port>
|
||||
<rou_from_port>2</rou_from_port>
|
||||
<rou_evn_uid></rou_evn_uid>
|
||||
<gat_uid></gat_uid>
|
||||
</record>
|
||||
</table>
|
||||
<table name="lanes"/>
|
||||
<table name="gateways"/>
|
||||
<table name="inputs"/>
|
||||
<table name="outputs"/>
|
||||
<table name="dynaforms"/>
|
||||
<table name="steps"/>
|
||||
<table name="triggers"/>
|
||||
<table name="taskusers"/>
|
||||
<table name="groupwfs"/>
|
||||
<table name="steptriggers"/>
|
||||
<table name="dbconnections"/>
|
||||
<table name="reportTables"/>
|
||||
<table name="reportTablesVars"/>
|
||||
<table name="stepSupervisor"/>
|
||||
<table name="objectPermissions"/>
|
||||
<table name="subProcess"/>
|
||||
<table name="caseTracker"/>
|
||||
<table name="caseTrackerObject"/>
|
||||
<table name="stage"/>
|
||||
<table name="fieldCondition"/>
|
||||
<table name="event"/>
|
||||
<table name="caseScheduler"/>
|
||||
<table name="processCategory"/>
|
||||
<table name="taskExtraProperties"/>
|
||||
<table name="processUser"/>
|
||||
<table name="processVariables"/>
|
||||
<table name="webEntry"/>
|
||||
<table name="webEntryEvent"/>
|
||||
<table name="messageType"/>
|
||||
<table name="messageTypeVariable"/>
|
||||
<table name="messageEventDefinition"/>
|
||||
<table name="scriptTask"/>
|
||||
<table name="timerEvent"/>
|
||||
<table name="emailEvent"/>
|
||||
<table name="filesManager"/>
|
||||
<table name="abeConfiguration"/>
|
||||
<table name="elementTask"/>
|
||||
</definition>
|
||||
<workflow-files/>
|
||||
</ProcessMaker-Project>
|
||||
458
tests/resources/p1normalWithoutTitle2-1.pmx
Normal file
458
tests/resources/p1normalWithoutTitle2-1.pmx
Normal file
@@ -0,0 +1,458 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ProcessMaker-Project version="3.0">
|
||||
<metadata>
|
||||
<meta key="vendor_version"><![CDATA[(Branch bugfix/PMC-138)]]></meta>
|
||||
<meta key="vendor_version_code">Michelangelo</meta>
|
||||
<meta key="export_timestamp">1571953275</meta>
|
||||
<meta key="export_datetime"><![CDATA[2019-10-24T21:41:15+00:00]]></meta>
|
||||
<meta key="export_server_addr"><![CDATA[172.16.3.67:8091]]></meta>
|
||||
<meta key="export_server_os">Linux</meta>
|
||||
<meta key="export_server_php_version">70132</meta>
|
||||
<meta key="export_version">1</meta>
|
||||
<meta key="workspace">workflow</meta>
|
||||
<meta key="name">p1normalWithoutTitle2</meta>
|
||||
<meta key="uid">2478934075db21861883091023775646</meta>
|
||||
</metadata>
|
||||
<definition class="BPMN">
|
||||
<table name="ACTIVITY">
|
||||
<record>
|
||||
<act_uid>8121252905db218785abec1096943718</act_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<pro_uid>9720974155db218618a7ea7026775087</pro_uid>
|
||||
<act_name>Task 1</act_name>
|
||||
<act_type>TASK</act_type>
|
||||
<act_is_for_compensation>0</act_is_for_compensation>
|
||||
<act_start_quantity>1</act_start_quantity>
|
||||
<act_completion_quantity>0</act_completion_quantity>
|
||||
<act_task_type>EMPTY</act_task_type>
|
||||
<act_implementation></act_implementation>
|
||||
<act_instantiate>0</act_instantiate>
|
||||
<act_script_type></act_script_type>
|
||||
<act_script></act_script>
|
||||
<act_loop_type>EMPTY</act_loop_type>
|
||||
<act_test_before>0</act_test_before>
|
||||
<act_loop_maximum>0</act_loop_maximum>
|
||||
<act_loop_condition>0</act_loop_condition>
|
||||
<act_loop_cardinality>0</act_loop_cardinality>
|
||||
<act_loop_behavior>0</act_loop_behavior>
|
||||
<act_is_adhoc>0</act_is_adhoc>
|
||||
<act_is_collapsed>0</act_is_collapsed>
|
||||
<act_completion_condition>0</act_completion_condition>
|
||||
<act_ordering>0</act_ordering>
|
||||
<act_cancel_remaining_instances>1</act_cancel_remaining_instances>
|
||||
<act_protocol>0</act_protocol>
|
||||
<act_method>0</act_method>
|
||||
<act_is_global>0</act_is_global>
|
||||
<act_referer>0</act_referer>
|
||||
<act_default_flow>0</act_default_flow>
|
||||
<act_master_diagram>0</act_master_diagram>
|
||||
<bou_uid>8364747905db218785b7404015959810</bou_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<element_uid>8121252905db218785abec1096943718</element_uid>
|
||||
<bou_element>4784291195db21862519f69041420620</bou_element>
|
||||
<bou_element_type>bpmnActivity</bou_element_type>
|
||||
<bou_x>180</bou_x>
|
||||
<bou_y>79</bou_y>
|
||||
<bou_width>150</bou_width>
|
||||
<bou_height>75</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
</table>
|
||||
<table name="ARTIFACT"/>
|
||||
<table name="BOUND">
|
||||
<record>
|
||||
<bou_uid>2283183075db218786549c5095832051</bou_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<element_uid>4205250135db2187864df85018323241</element_uid>
|
||||
<bou_element>4784291195db21862519f69041420620</bou_element>
|
||||
<bou_element_type>bpmnEvent</bou_element_type>
|
||||
<bou_x>378</bou_x>
|
||||
<bou_y>100</bou_y>
|
||||
<bou_width>33</bou_width>
|
||||
<bou_height>33</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
<record>
|
||||
<bou_uid>7810988885db21878637855082875408</bou_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<element_uid>9473649565db2187862a5f7053654507</element_uid>
|
||||
<bou_element>4784291195db21862519f69041420620</bou_element>
|
||||
<bou_element_type>bpmnEvent</bou_element_type>
|
||||
<bou_x>100</bou_x>
|
||||
<bou_y>100</bou_y>
|
||||
<bou_width>33</bou_width>
|
||||
<bou_height>33</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
<record>
|
||||
<bou_uid>8364747905db218785b7404015959810</bou_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<element_uid>8121252905db218785abec1096943718</element_uid>
|
||||
<bou_element>4784291195db21862519f69041420620</bou_element>
|
||||
<bou_element_type>bpmnActivity</bou_element_type>
|
||||
<bou_x>180</bou_x>
|
||||
<bou_y>79</bou_y>
|
||||
<bou_width>150</bou_width>
|
||||
<bou_height>75</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
</table>
|
||||
<table name="DATA"/>
|
||||
<table name="DIAGRAM">
|
||||
<record>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<dia_name>p1normalWithoutTitle</dia_name>
|
||||
<dia_is_closable>0</dia_is_closable>
|
||||
</record>
|
||||
</table>
|
||||
<table name="DOCUMENTATION"/>
|
||||
<table name="EVENT">
|
||||
<record>
|
||||
<evn_uid>4205250135db2187864df85018323241</evn_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<pro_uid>9720974155db218618a7ea7026775087</pro_uid>
|
||||
<evn_name></evn_name>
|
||||
<evn_type>END</evn_type>
|
||||
<evn_marker>EMPTY</evn_marker>
|
||||
<evn_is_interrupting>1</evn_is_interrupting>
|
||||
<evn_attached_to></evn_attached_to>
|
||||
<evn_cancel_activity>0</evn_cancel_activity>
|
||||
<evn_activity_ref></evn_activity_ref>
|
||||
<evn_wait_for_completion>0</evn_wait_for_completion>
|
||||
<evn_error_name></evn_error_name>
|
||||
<evn_error_code></evn_error_code>
|
||||
<evn_escalation_name></evn_escalation_name>
|
||||
<evn_escalation_code></evn_escalation_code>
|
||||
<evn_condition></evn_condition>
|
||||
<evn_message></evn_message>
|
||||
<evn_operation_name></evn_operation_name>
|
||||
<evn_operation_implementation_ref></evn_operation_implementation_ref>
|
||||
<evn_time_date></evn_time_date>
|
||||
<evn_time_cycle></evn_time_cycle>
|
||||
<evn_time_duration></evn_time_duration>
|
||||
<evn_behavior>THROW</evn_behavior>
|
||||
<bou_uid>2283183075db218786549c5095832051</bou_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<element_uid>4205250135db2187864df85018323241</element_uid>
|
||||
<bou_element>4784291195db21862519f69041420620</bou_element>
|
||||
<bou_element_type>bpmnEvent</bou_element_type>
|
||||
<bou_x>378</bou_x>
|
||||
<bou_y>100</bou_y>
|
||||
<bou_width>33</bou_width>
|
||||
<bou_height>33</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
<record>
|
||||
<evn_uid>9473649565db2187862a5f7053654507</evn_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<pro_uid>9720974155db218618a7ea7026775087</pro_uid>
|
||||
<evn_name></evn_name>
|
||||
<evn_type>START</evn_type>
|
||||
<evn_marker>EMPTY</evn_marker>
|
||||
<evn_is_interrupting>1</evn_is_interrupting>
|
||||
<evn_attached_to></evn_attached_to>
|
||||
<evn_cancel_activity>0</evn_cancel_activity>
|
||||
<evn_activity_ref></evn_activity_ref>
|
||||
<evn_wait_for_completion>0</evn_wait_for_completion>
|
||||
<evn_error_name></evn_error_name>
|
||||
<evn_error_code></evn_error_code>
|
||||
<evn_escalation_name></evn_escalation_name>
|
||||
<evn_escalation_code></evn_escalation_code>
|
||||
<evn_condition></evn_condition>
|
||||
<evn_message>LEAD</evn_message>
|
||||
<evn_operation_name></evn_operation_name>
|
||||
<evn_operation_implementation_ref></evn_operation_implementation_ref>
|
||||
<evn_time_date></evn_time_date>
|
||||
<evn_time_cycle></evn_time_cycle>
|
||||
<evn_time_duration></evn_time_duration>
|
||||
<evn_behavior>CATCH</evn_behavior>
|
||||
<bou_uid>7810988885db21878637855082875408</bou_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<element_uid>9473649565db2187862a5f7053654507</element_uid>
|
||||
<bou_element>4784291195db21862519f69041420620</bou_element>
|
||||
<bou_element_type>bpmnEvent</bou_element_type>
|
||||
<bou_x>100</bou_x>
|
||||
<bou_y>100</bou_y>
|
||||
<bou_width>33</bou_width>
|
||||
<bou_height>33</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
</table>
|
||||
<table name="EXTENSION"/>
|
||||
<table name="FLOW">
|
||||
<record>
|
||||
<flo_uid>1154017545db21878680728046544809</flo_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<flo_type>SEQUENCE</flo_type>
|
||||
<flo_name> </flo_name>
|
||||
<flo_element_origin>9473649565db2187862a5f7053654507</flo_element_origin>
|
||||
<flo_element_origin_type>bpmnEvent</flo_element_origin_type>
|
||||
<flo_element_origin_port>0</flo_element_origin_port>
|
||||
<flo_element_dest>8121252905db218785abec1096943718</flo_element_dest>
|
||||
<flo_element_dest_type>bpmnActivity</flo_element_dest_type>
|
||||
<flo_element_dest_port>0</flo_element_dest_port>
|
||||
<flo_is_inmediate>1</flo_is_inmediate>
|
||||
<flo_condition></flo_condition>
|
||||
<flo_x1>133</flo_x1>
|
||||
<flo_y1>117</flo_y1>
|
||||
<flo_x2>180</flo_x2>
|
||||
<flo_y2>117</flo_y2>
|
||||
<flo_state><![CDATA[[{"x":133,"y":117},{"x":180,"y":117}]]]></flo_state>
|
||||
<flo_position>1</flo_position>
|
||||
</record>
|
||||
<record>
|
||||
<flo_uid>4538701885db21878683a20080373564</flo_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<flo_type>SEQUENCE</flo_type>
|
||||
<flo_name> </flo_name>
|
||||
<flo_element_origin>8121252905db218785abec1096943718</flo_element_origin>
|
||||
<flo_element_origin_type>bpmnActivity</flo_element_origin_type>
|
||||
<flo_element_origin_port>0</flo_element_origin_port>
|
||||
<flo_element_dest>4205250135db2187864df85018323241</flo_element_dest>
|
||||
<flo_element_dest_type>bpmnEvent</flo_element_dest_type>
|
||||
<flo_element_dest_port>0</flo_element_dest_port>
|
||||
<flo_is_inmediate>1</flo_is_inmediate>
|
||||
<flo_condition></flo_condition>
|
||||
<flo_x1>331</flo_x1>
|
||||
<flo_y1>117</flo_y1>
|
||||
<flo_x2>378</flo_x2>
|
||||
<flo_y2>117</flo_y2>
|
||||
<flo_state><![CDATA[[{"x":331,"y":117},{"x":378,"y":117}]]]></flo_state>
|
||||
<flo_position>1</flo_position>
|
||||
</record>
|
||||
</table>
|
||||
<table name="GATEWAY"/>
|
||||
<table name="LANE"/>
|
||||
<table name="LANESET"/>
|
||||
<table name="PARTICIPANT"/>
|
||||
<table name="PROCESS">
|
||||
<record>
|
||||
<pro_uid>9720974155db218618a7ea7026775087</pro_uid>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<dia_uid>5898396935db218618a4c53034929820</dia_uid>
|
||||
<pro_name>p1normalWithoutTitle2</pro_name>
|
||||
<pro_type>NONE</pro_type>
|
||||
<pro_is_executable>0</pro_is_executable>
|
||||
<pro_is_closed>0</pro_is_closed>
|
||||
<pro_is_subprocess>0</pro_is_subprocess>
|
||||
</record>
|
||||
</table>
|
||||
<table name="PROJECT">
|
||||
<record>
|
||||
<prj_uid>2478934075db21861883091023775646</prj_uid>
|
||||
<prj_name>p1normalWithoutTitle2</prj_name>
|
||||
<prj_description></prj_description>
|
||||
<prj_target_namespace></prj_target_namespace>
|
||||
<prj_expresion_language></prj_expresion_language>
|
||||
<prj_type_language></prj_type_language>
|
||||
<prj_exporter></prj_exporter>
|
||||
<prj_exporter_version></prj_exporter_version>
|
||||
<prj_create_date><![CDATA[2019-10-24 21:32:17]]></prj_create_date>
|
||||
<prj_update_date><![CDATA[2019-10-24 21:32:46]]></prj_update_date>
|
||||
<prj_author>00000000000000000000000000000001</prj_author>
|
||||
<prj_author_version></prj_author_version>
|
||||
<prj_original_source></prj_original_source>
|
||||
</record>
|
||||
</table>
|
||||
</definition>
|
||||
<definition class="workflow">
|
||||
<table name="process">
|
||||
<record>
|
||||
<pro_uid>2478934075db21861883091023775646</pro_uid>
|
||||
<pro_title>p1normalWithoutTitle2</pro_title>
|
||||
<pro_description></pro_description>
|
||||
<pro_parent>2478934075db21861883091023775646</pro_parent>
|
||||
<pro_time>1</pro_time>
|
||||
<pro_timeunit>DAYS</pro_timeunit>
|
||||
<pro_status>ACTIVE</pro_status>
|
||||
<pro_status_id>1</pro_status_id>
|
||||
<pro_type_day></pro_type_day>
|
||||
<pro_type>NORMAL</pro_type>
|
||||
<pro_assignment>FALSE</pro_assignment>
|
||||
<pro_show_map>0</pro_show_map>
|
||||
<pro_show_message>0</pro_show_message>
|
||||
<pro_subprocess>0</pro_subprocess>
|
||||
<pro_tri_create></pro_tri_create>
|
||||
<pro_tri_open></pro_tri_open>
|
||||
<pro_tri_deleted></pro_tri_deleted>
|
||||
<pro_tri_canceled></pro_tri_canceled>
|
||||
<pro_tri_paused></pro_tri_paused>
|
||||
<pro_tri_reassigned></pro_tri_reassigned>
|
||||
<pro_tri_unpaused></pro_tri_unpaused>
|
||||
<pro_type_process>PUBLIC</pro_type_process>
|
||||
<pro_show_delegate>0</pro_show_delegate>
|
||||
<pro_show_dynaform>0</pro_show_dynaform>
|
||||
<pro_category></pro_category>
|
||||
<pro_sub_category></pro_sub_category>
|
||||
<pro_industry>0</pro_industry>
|
||||
<pro_update_date></pro_update_date>
|
||||
<pro_create_date><![CDATA[2019-10-24 21:32:17]]></pro_create_date>
|
||||
<pro_create_user>00000000000000000000000000000001</pro_create_user>
|
||||
<pro_height>5000</pro_height>
|
||||
<pro_width>10000</pro_width>
|
||||
<pro_title_x>0</pro_title_x>
|
||||
<pro_title_y>0</pro_title_y>
|
||||
<pro_debug>0</pro_debug>
|
||||
<pro_dynaforms><![CDATA[a:1:{s:7:"PROCESS";s:0:"";}]]></pro_dynaforms>
|
||||
<pro_derivation_screen_tpl></pro_derivation_screen_tpl>
|
||||
<pro_cost>0</pro_cost>
|
||||
<pro_unit_cost><![CDATA[$]]></pro_unit_cost>
|
||||
<pro_itee>1</pro_itee>
|
||||
<pro_action_done><![CDATA[a:1:{i:0;s:41:"GATEWAYTOGATEWAY_DELETE_CORRUPTED_RECORDS";}]]></pro_action_done>
|
||||
<category_id>0</category_id>
|
||||
<pro_category_label>No Category</pro_category_label>
|
||||
<pro_bpmn>1</pro_bpmn>
|
||||
</record>
|
||||
</table>
|
||||
<table name="tasks">
|
||||
<record>
|
||||
<pro_uid>2478934075db21861883091023775646</pro_uid>
|
||||
<pro_id>0</pro_id>
|
||||
<tas_uid>8121252905db218785abec1096943718</tas_uid>
|
||||
<tas_title>Task 1</tas_title>
|
||||
<tas_description></tas_description>
|
||||
<tas_def_title></tas_def_title>
|
||||
<tas_def_subject_message></tas_def_subject_message>
|
||||
<tas_def_proc_code></tas_def_proc_code>
|
||||
<tas_def_message></tas_def_message>
|
||||
<tas_def_description></tas_def_description>
|
||||
<tas_type>NORMAL</tas_type>
|
||||
<tas_duration>1</tas_duration>
|
||||
<tas_delay_type></tas_delay_type>
|
||||
<tas_temporizer>0</tas_temporizer>
|
||||
<tas_type_day></tas_type_day>
|
||||
<tas_timeunit>DAYS</tas_timeunit>
|
||||
<tas_alert>FALSE</tas_alert>
|
||||
<tas_priority_variable></tas_priority_variable>
|
||||
<tas_assign_type>BALANCED</tas_assign_type>
|
||||
<tas_assign_variable><![CDATA[@@SYS_NEXT_USER_TO_BE_ASSIGNED]]></tas_assign_variable>
|
||||
<tas_group_variable></tas_group_variable>
|
||||
<tas_mi_instance_variable><![CDATA[@@SYS_VAR_TOTAL_INSTANCE]]></tas_mi_instance_variable>
|
||||
<tas_mi_complete_variable><![CDATA[@@SYS_VAR_TOTAL_INSTANCES_COMPLETE]]></tas_mi_complete_variable>
|
||||
<tas_assign_location>FALSE</tas_assign_location>
|
||||
<tas_assign_location_adhoc>FALSE</tas_assign_location_adhoc>
|
||||
<tas_transfer_fly>FALSE</tas_transfer_fly>
|
||||
<tas_last_assigned>0</tas_last_assigned>
|
||||
<tas_user>0</tas_user>
|
||||
<tas_can_upload>FALSE</tas_can_upload>
|
||||
<tas_view_upload>FALSE</tas_view_upload>
|
||||
<tas_view_additional_documentation>FALSE</tas_view_additional_documentation>
|
||||
<tas_can_cancel>FALSE</tas_can_cancel>
|
||||
<tas_owner_app>FALSE</tas_owner_app>
|
||||
<stg_uid></stg_uid>
|
||||
<tas_can_pause>FALSE</tas_can_pause>
|
||||
<tas_can_send_message>TRUE</tas_can_send_message>
|
||||
<tas_can_delete_docs>FALSE</tas_can_delete_docs>
|
||||
<tas_self_service>FALSE</tas_self_service>
|
||||
<tas_start>TRUE</tas_start>
|
||||
<tas_to_last_user>FALSE</tas_to_last_user>
|
||||
<tas_send_last_email>FALSE</tas_send_last_email>
|
||||
<tas_derivation>NORMAL</tas_derivation>
|
||||
<tas_posx>180</tas_posx>
|
||||
<tas_posy>79</tas_posy>
|
||||
<tas_width>110</tas_width>
|
||||
<tas_height>60</tas_height>
|
||||
<tas_color></tas_color>
|
||||
<tas_evn_uid></tas_evn_uid>
|
||||
<tas_boundary></tas_boundary>
|
||||
<tas_derivation_screen_tpl></tas_derivation_screen_tpl>
|
||||
<tas_selfservice_timeout>0</tas_selfservice_timeout>
|
||||
<tas_selfservice_time>0</tas_selfservice_time>
|
||||
<tas_selfservice_time_unit></tas_selfservice_time_unit>
|
||||
<tas_selfservice_trigger_uid></tas_selfservice_trigger_uid>
|
||||
<tas_selfservice_execution>EVERY_TIME</tas_selfservice_execution>
|
||||
<tas_not_email_from_format>0</tas_not_email_from_format>
|
||||
<tas_offline>FALSE</tas_offline>
|
||||
<tas_email_server_uid></tas_email_server_uid>
|
||||
<tas_auto_root>FALSE</tas_auto_root>
|
||||
<tas_receive_server_uid></tas_receive_server_uid>
|
||||
<tas_receive_last_email>FALSE</tas_receive_last_email>
|
||||
<tas_receive_email_from_format>0</tas_receive_email_from_format>
|
||||
<tas_receive_message_type>text</tas_receive_message_type>
|
||||
<tas_receive_message_template>alert_message.html</tas_receive_message_template>
|
||||
<tas_receive_subject_message></tas_receive_subject_message>
|
||||
<tas_receive_message></tas_receive_message>
|
||||
<tas_average></tas_average>
|
||||
<tas_sdv></tas_sdv>
|
||||
</record>
|
||||
</table>
|
||||
<table name="routes">
|
||||
<record>
|
||||
<rou_uid>3616902375db2187ea8ff68051664528</rou_uid>
|
||||
<rou_parent>0</rou_parent>
|
||||
<pro_uid>2478934075db21861883091023775646</pro_uid>
|
||||
<tas_uid>8121252905db218785abec1096943718</tas_uid>
|
||||
<rou_next_task>-1</rou_next_task>
|
||||
<rou_case>1</rou_case>
|
||||
<rou_type>SEQUENTIAL</rou_type>
|
||||
<rou_default>0</rou_default>
|
||||
<rou_condition></rou_condition>
|
||||
<rou_to_last_user>FALSE</rou_to_last_user>
|
||||
<rou_optional>FALSE</rou_optional>
|
||||
<rou_send_email>TRUE</rou_send_email>
|
||||
<rou_sourceanchor>1</rou_sourceanchor>
|
||||
<rou_targetanchor>0</rou_targetanchor>
|
||||
<rou_to_port>1</rou_to_port>
|
||||
<rou_from_port>2</rou_from_port>
|
||||
<rou_evn_uid></rou_evn_uid>
|
||||
<gat_uid></gat_uid>
|
||||
</record>
|
||||
</table>
|
||||
<table name="lanes"/>
|
||||
<table name="gateways"/>
|
||||
<table name="inputs"/>
|
||||
<table name="outputs"/>
|
||||
<table name="dynaforms"/>
|
||||
<table name="steps"/>
|
||||
<table name="triggers"/>
|
||||
<table name="taskusers"/>
|
||||
<table name="groupwfs"/>
|
||||
<table name="steptriggers"/>
|
||||
<table name="dbconnections"/>
|
||||
<table name="reportTables"/>
|
||||
<table name="reportTablesVars"/>
|
||||
<table name="stepSupervisor"/>
|
||||
<table name="objectPermissions"/>
|
||||
<table name="subProcess"/>
|
||||
<table name="caseTracker"/>
|
||||
<table name="caseTrackerObject"/>
|
||||
<table name="stage"/>
|
||||
<table name="fieldCondition"/>
|
||||
<table name="event"/>
|
||||
<table name="caseScheduler"/>
|
||||
<table name="processCategory"/>
|
||||
<table name="taskExtraProperties"/>
|
||||
<table name="processUser"/>
|
||||
<table name="processVariables"/>
|
||||
<table name="webEntry"/>
|
||||
<table name="webEntryEvent"/>
|
||||
<table name="messageType"/>
|
||||
<table name="messageTypeVariable"/>
|
||||
<table name="messageEventDefinition"/>
|
||||
<table name="scriptTask"/>
|
||||
<table name="timerEvent"/>
|
||||
<table name="emailEvent"/>
|
||||
<table name="filesManager"/>
|
||||
<table name="abeConfiguration"/>
|
||||
<table name="elementTask"/>
|
||||
</definition>
|
||||
<workflow-files/>
|
||||
</ProcessMaker-Project>
|
||||
58
tests/resources/p2custom-1-ObjectsToImport.json
Normal file
58
tests/resources/p2custom-1-ObjectsToImport.json
Normal file
@@ -0,0 +1,58 @@
|
||||
[
|
||||
{
|
||||
"id": "PROCESSDEFINITION",
|
||||
"action": "replace"
|
||||
},
|
||||
{
|
||||
"id": "ASSIGNMENTRULES",
|
||||
"action": "replace"
|
||||
},
|
||||
{
|
||||
"id": "VARIABLES",
|
||||
"action": "replace"
|
||||
},
|
||||
{
|
||||
"id": "DYNAFORMS",
|
||||
"action": "replace"
|
||||
},
|
||||
{
|
||||
"id": "INPUTDOCUMENTS",
|
||||
"action": "replace"
|
||||
},
|
||||
{
|
||||
"id": "OUTPUTDOCUMENTS",
|
||||
"action": "replace"
|
||||
},
|
||||
{
|
||||
"id": "TRIGGERS",
|
||||
"action": "replace"
|
||||
},
|
||||
{
|
||||
"id": "REPORTTABLES",
|
||||
"action": "replace"
|
||||
},
|
||||
{
|
||||
"id": "TEMPLATES",
|
||||
"action": "replace"
|
||||
},
|
||||
{
|
||||
"id": "FILES",
|
||||
"action": "replace"
|
||||
},
|
||||
{
|
||||
"id": "DBCONNECTION",
|
||||
"action": "replace"
|
||||
},
|
||||
{
|
||||
"id": "PERMISSIONS",
|
||||
"action": "replace"
|
||||
},
|
||||
{
|
||||
"id": "SUPERVISORS",
|
||||
"action": "replace"
|
||||
},
|
||||
{
|
||||
"id": "SUPERVISORSOBJECTS",
|
||||
"action": "replace"
|
||||
}
|
||||
]
|
||||
1332
tests/resources/p2custom-1.pmx2
Normal file
1332
tests/resources/p2custom-1.pmx2
Normal file
File diff suppressed because it is too large
Load Diff
210
tests/resources/projectData.json
Normal file
210
tests/resources/projectData.json
Normal file
@@ -0,0 +1,210 @@
|
||||
{
|
||||
"prj_uid": "3139884745db99e69bd2683082492802",
|
||||
"prj_name": "createBPMN",
|
||||
"prj_description": "test",
|
||||
"prj_target_namespace": "",
|
||||
"prj_expresion_language": "",
|
||||
"prj_type_language": "",
|
||||
"prj_exporter": "",
|
||||
"prj_exporter_version": "",
|
||||
"prj_create_date": "2019-10-30 14:30:01",
|
||||
"prj_update_date": "2019-10-30 14:30:10",
|
||||
"prj_author": "00000000000000000000000000000001",
|
||||
"prj_author_version": "",
|
||||
"prj_original_source": "",
|
||||
"prj_type": "NONE",
|
||||
"prj_category": "test",
|
||||
"pro_status": "ACTIVE",
|
||||
"diagrams": [
|
||||
{
|
||||
"dia_uid": "7012431415db99e69c064a1027112720",
|
||||
"prj_uid": "3139884745db99e69bd2683082492802",
|
||||
"dia_name": "createBPMN",
|
||||
"dia_is_closable": "0",
|
||||
"activities": [
|
||||
{
|
||||
"act_uid": "5165535925db99e72bcae07068945328",
|
||||
"prj_uid": "3139884745db99e69bd2683082492802",
|
||||
"pro_uid": "9258990045db99e69c08f67059175864",
|
||||
"act_name": "Task 1",
|
||||
"act_type": "TASK",
|
||||
"act_is_for_compensation": "0",
|
||||
"act_start_quantity": "1",
|
||||
"act_completion_quantity": "0",
|
||||
"act_task_type": "EMPTY",
|
||||
"act_implementation": "",
|
||||
"act_instantiate": "0",
|
||||
"act_script_type": "",
|
||||
"act_script": "",
|
||||
"act_loop_type": "EMPTY",
|
||||
"act_test_before": "0",
|
||||
"act_loop_maximum": "0",
|
||||
"act_loop_condition": "0",
|
||||
"act_loop_cardinality": "0",
|
||||
"act_loop_behavior": "0",
|
||||
"act_is_adhoc": "0",
|
||||
"act_is_collapsed": "0",
|
||||
"act_completion_condition": "0",
|
||||
"act_ordering": "0",
|
||||
"act_cancel_remaining_instances": "1",
|
||||
"act_protocol": "0",
|
||||
"act_method": "0",
|
||||
"act_is_global": "0",
|
||||
"act_referer": "0",
|
||||
"act_default_flow": "0",
|
||||
"act_master_diagram": "0",
|
||||
"bou_uid": "2584782805db99e72bd0980067403101",
|
||||
"dia_uid": "7012431415db99e69c064a1027112720",
|
||||
"element_uid": "5165535925db99e72bcae07068945328",
|
||||
"bou_element": "4022955515db99e6aef9528027473017",
|
||||
"bou_element_type": "bpmnActivity",
|
||||
"bou_x": "177",
|
||||
"bou_y": "79",
|
||||
"bou_width": "150",
|
||||
"bou_height": "75",
|
||||
"bou_rel_position": "0",
|
||||
"bou_size_identical": "0",
|
||||
"bou_container": "bpmnDiagram"
|
||||
}
|
||||
],
|
||||
"artifacts": [],
|
||||
"events": [
|
||||
{
|
||||
"evn_uid": "3038076035db99e72c3c135082812123",
|
||||
"prj_uid": "3139884745db99e69bd2683082492802",
|
||||
"pro_uid": "9258990045db99e69c08f67059175864",
|
||||
"evn_name": "",
|
||||
"evn_type": "END",
|
||||
"evn_marker": "EMPTY",
|
||||
"evn_is_interrupting": "1",
|
||||
"evn_attached_to": "",
|
||||
"evn_cancel_activity": "0",
|
||||
"evn_activity_ref": "",
|
||||
"evn_wait_for_completion": "0",
|
||||
"evn_error_name": "",
|
||||
"evn_error_code": "",
|
||||
"evn_escalation_name": "",
|
||||
"evn_escalation_code": "",
|
||||
"evn_condition": "",
|
||||
"evn_message": "",
|
||||
"evn_operation_name": "",
|
||||
"evn_operation_implementation_ref": "",
|
||||
"evn_time_date": "",
|
||||
"evn_time_cycle": "",
|
||||
"evn_time_duration": "",
|
||||
"evn_behavior": "THROW",
|
||||
"bou_uid": "1455533305db99e72c3fae0095171965",
|
||||
"dia_uid": "7012431415db99e69c064a1027112720",
|
||||
"element_uid": "3038076035db99e72c3c135082812123",
|
||||
"bou_element": "4022955515db99e6aef9528027473017",
|
||||
"bou_element_type": "bpmnEvent",
|
||||
"bou_x": "365",
|
||||
"bou_y": "100",
|
||||
"bou_width": "33",
|
||||
"bou_height": "33",
|
||||
"bou_rel_position": "0",
|
||||
"bou_size_identical": "0",
|
||||
"bou_container": "bpmnDiagram"
|
||||
},
|
||||
{
|
||||
"evn_uid": "5511258545db99e72c29944076205232",
|
||||
"prj_uid": "3139884745db99e69bd2683082492802",
|
||||
"pro_uid": "9258990045db99e69c08f67059175864",
|
||||
"evn_name": "",
|
||||
"evn_type": "START",
|
||||
"evn_marker": "EMPTY",
|
||||
"evn_is_interrupting": "1",
|
||||
"evn_attached_to": "",
|
||||
"evn_cancel_activity": "0",
|
||||
"evn_activity_ref": "",
|
||||
"evn_wait_for_completion": "0",
|
||||
"evn_error_name": "",
|
||||
"evn_error_code": "",
|
||||
"evn_escalation_name": "",
|
||||
"evn_escalation_code": "",
|
||||
"evn_condition": "",
|
||||
"evn_message": "LEAD",
|
||||
"evn_operation_name": "",
|
||||
"evn_operation_implementation_ref": "",
|
||||
"evn_time_date": "",
|
||||
"evn_time_cycle": "",
|
||||
"evn_time_duration": "",
|
||||
"evn_behavior": "CATCH",
|
||||
"bou_uid": "7732258935db99e72c2e3a3068518403",
|
||||
"dia_uid": "7012431415db99e69c064a1027112720",
|
||||
"element_uid": "5511258545db99e72c29944076205232",
|
||||
"bou_element": "4022955515db99e6aef9528027473017",
|
||||
"bou_element_type": "bpmnEvent",
|
||||
"bou_x": "100",
|
||||
"bou_y": "100",
|
||||
"bou_width": "33",
|
||||
"bou_height": "33",
|
||||
"bou_rel_position": "0",
|
||||
"bou_size_identical": "0",
|
||||
"bou_container": "bpmnDiagram"
|
||||
}
|
||||
],
|
||||
"flows": [
|
||||
{
|
||||
"flo_uid": "6368397865db99e72c52903064569710",
|
||||
"prj_uid": "3139884745db99e69bd2683082492802",
|
||||
"dia_uid": "7012431415db99e69c064a1027112720",
|
||||
"flo_type": "SEQUENCE",
|
||||
"flo_name": " ",
|
||||
"flo_element_origin": "5511258545db99e72c29944076205232",
|
||||
"flo_element_origin_type": "bpmnEvent",
|
||||
"flo_element_origin_port": "0",
|
||||
"flo_element_dest": "5165535925db99e72bcae07068945328",
|
||||
"flo_element_dest_type": "bpmnActivity",
|
||||
"flo_element_dest_port": "0",
|
||||
"flo_is_inmediate": "1",
|
||||
"flo_condition": "",
|
||||
"flo_x1": "133",
|
||||
"flo_y1": "117",
|
||||
"flo_x2": "177",
|
||||
"flo_y2": "117",
|
||||
"flo_state": "[{\"x\":133,\"y\":117},{\"x\":177,\"y\":117}]",
|
||||
"flo_position": "1"
|
||||
},
|
||||
{
|
||||
"flo_uid": "7620102575db99e72c53873033338002",
|
||||
"prj_uid": "3139884745db99e69bd2683082492802",
|
||||
"dia_uid": "7012431415db99e69c064a1027112720",
|
||||
"flo_type": "SEQUENCE",
|
||||
"flo_name": " ",
|
||||
"flo_element_origin": "5165535925db99e72bcae07068945328",
|
||||
"flo_element_origin_type": "bpmnActivity",
|
||||
"flo_element_origin_port": "0",
|
||||
"flo_element_dest": "3038076035db99e72c3c135082812123",
|
||||
"flo_element_dest_type": "bpmnEvent",
|
||||
"flo_element_dest_port": "0",
|
||||
"flo_is_inmediate": "1",
|
||||
"flo_condition": "",
|
||||
"flo_x1": "328",
|
||||
"flo_y1": "117",
|
||||
"flo_x2": "365",
|
||||
"flo_y2": "117",
|
||||
"flo_state": "[{\"x\":328,\"y\":117},{\"x\":365,\"y\":117}]",
|
||||
"flo_position": "1"
|
||||
}
|
||||
],
|
||||
"gateways": [],
|
||||
"data": [],
|
||||
"participants": [],
|
||||
"laneset": [],
|
||||
"lanes": []
|
||||
}
|
||||
],
|
||||
"process": {
|
||||
"pro_uid": "9258990045db99e69c08f67059175864",
|
||||
"prj_uid": "3139884745db99e69bd2683082492802",
|
||||
"dia_uid": "7012431415db99e69c064a1027112720",
|
||||
"pro_name": "createBPMN",
|
||||
"pro_type": "NONE",
|
||||
"pro_is_executable": "0",
|
||||
"pro_is_closed": "0",
|
||||
"pro_is_subprocess": "0",
|
||||
"pro_id": "2",
|
||||
"pro_status": "ACTIVE"
|
||||
}
|
||||
}
|
||||
457
tests/resources/saveAsTest-1.pmx
Normal file
457
tests/resources/saveAsTest-1.pmx
Normal file
@@ -0,0 +1,457 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ProcessMaker-Project version="3.0">
|
||||
<metadata>
|
||||
<meta key="vendor_version"><![CDATA[(Branch bugfix/PMC-138)]]></meta>
|
||||
<meta key="vendor_version_code">Michelangelo</meta>
|
||||
<meta key="export_timestamp">1572442915</meta>
|
||||
<meta key="export_datetime"><![CDATA[2019-10-30T13:41:55+00:00]]></meta>
|
||||
<meta key="export_server_addr"><![CDATA[172.16.3.67:8091]]></meta>
|
||||
<meta key="export_server_os">Linux</meta>
|
||||
<meta key="export_server_php_version">70133</meta>
|
||||
<meta key="workspace">sample</meta>
|
||||
<meta key="name">saveAsTest</meta>
|
||||
<meta key="uid">9745053325db99314dac446019554453</meta>
|
||||
</metadata>
|
||||
<definition class="BPMN">
|
||||
<table name="ACTIVITY">
|
||||
<record>
|
||||
<act_uid>6645237135db9931f1d5082018688082</act_uid>
|
||||
<prj_uid>9745053325db99314dac446019554453</prj_uid>
|
||||
<pro_uid>9211677625db99314ddf9d0097887435</pro_uid>
|
||||
<act_name>Task 1</act_name>
|
||||
<act_type>TASK</act_type>
|
||||
<act_is_for_compensation>0</act_is_for_compensation>
|
||||
<act_start_quantity>1</act_start_quantity>
|
||||
<act_completion_quantity>0</act_completion_quantity>
|
||||
<act_task_type>EMPTY</act_task_type>
|
||||
<act_implementation></act_implementation>
|
||||
<act_instantiate>0</act_instantiate>
|
||||
<act_script_type></act_script_type>
|
||||
<act_script></act_script>
|
||||
<act_loop_type>EMPTY</act_loop_type>
|
||||
<act_test_before>0</act_test_before>
|
||||
<act_loop_maximum>0</act_loop_maximum>
|
||||
<act_loop_condition>0</act_loop_condition>
|
||||
<act_loop_cardinality>0</act_loop_cardinality>
|
||||
<act_loop_behavior>0</act_loop_behavior>
|
||||
<act_is_adhoc>0</act_is_adhoc>
|
||||
<act_is_collapsed>0</act_is_collapsed>
|
||||
<act_completion_condition>0</act_completion_condition>
|
||||
<act_ordering>0</act_ordering>
|
||||
<act_cancel_remaining_instances>1</act_cancel_remaining_instances>
|
||||
<act_protocol>0</act_protocol>
|
||||
<act_method>0</act_method>
|
||||
<act_is_global>0</act_is_global>
|
||||
<act_referer>0</act_referer>
|
||||
<act_default_flow>0</act_default_flow>
|
||||
<act_master_diagram>0</act_master_diagram>
|
||||
<bou_uid>2024203105db9931f1de3a1071225392</bou_uid>
|
||||
<dia_uid>8359203175db99314ddd311055114412</dia_uid>
|
||||
<element_uid>6645237135db9931f1d5082018688082</element_uid>
|
||||
<bou_element>6736509965db99315c363a1037462295</bou_element>
|
||||
<bou_element_type>bpmnActivity</bou_element_type>
|
||||
<bou_x>169</bou_x>
|
||||
<bou_y>79</bou_y>
|
||||
<bou_width>150</bou_width>
|
||||
<bou_height>75</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
</table>
|
||||
<table name="ARTIFACT"/>
|
||||
<table name="BOUND">
|
||||
<record>
|
||||
<bou_uid>2024203105db9931f1de3a1071225392</bou_uid>
|
||||
<prj_uid>9745053325db99314dac446019554453</prj_uid>
|
||||
<dia_uid>8359203175db99314ddd311055114412</dia_uid>
|
||||
<element_uid>6645237135db9931f1d5082018688082</element_uid>
|
||||
<bou_element>6736509965db99315c363a1037462295</bou_element>
|
||||
<bou_element_type>bpmnActivity</bou_element_type>
|
||||
<bou_x>169</bou_x>
|
||||
<bou_y>79</bou_y>
|
||||
<bou_width>150</bou_width>
|
||||
<bou_height>75</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
<record>
|
||||
<bou_uid>5243884725db9931f233c43015663499</bou_uid>
|
||||
<prj_uid>9745053325db99314dac446019554453</prj_uid>
|
||||
<dia_uid>8359203175db99314ddd311055114412</dia_uid>
|
||||
<element_uid>2454646545db9931f22b211032408082</element_uid>
|
||||
<bou_element>6736509965db99315c363a1037462295</bou_element>
|
||||
<bou_element_type>bpmnEvent</bou_element_type>
|
||||
<bou_x>100</bou_x>
|
||||
<bou_y>100</bou_y>
|
||||
<bou_width>33</bou_width>
|
||||
<bou_height>33</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
<record>
|
||||
<bou_uid>5496002045db9931f248303051598631</bou_uid>
|
||||
<prj_uid>9745053325db99314dac446019554453</prj_uid>
|
||||
<dia_uid>8359203175db99314ddd311055114412</dia_uid>
|
||||
<element_uid>6813770985db9931f244b78069429303</element_uid>
|
||||
<bou_element>6736509965db99315c363a1037462295</bou_element>
|
||||
<bou_element_type>bpmnEvent</bou_element_type>
|
||||
<bou_x>355</bou_x>
|
||||
<bou_y>100</bou_y>
|
||||
<bou_width>33</bou_width>
|
||||
<bou_height>33</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
</table>
|
||||
<table name="DATA"/>
|
||||
<table name="DIAGRAM">
|
||||
<record>
|
||||
<dia_uid>8359203175db99314ddd311055114412</dia_uid>
|
||||
<prj_uid>9745053325db99314dac446019554453</prj_uid>
|
||||
<dia_name>saveAsTest</dia_name>
|
||||
<dia_is_closable>0</dia_is_closable>
|
||||
</record>
|
||||
</table>
|
||||
<table name="DOCUMENTATION"/>
|
||||
<table name="EVENT">
|
||||
<record>
|
||||
<evn_uid>2454646545db9931f22b211032408082</evn_uid>
|
||||
<prj_uid>9745053325db99314dac446019554453</prj_uid>
|
||||
<pro_uid>9211677625db99314ddf9d0097887435</pro_uid>
|
||||
<evn_name></evn_name>
|
||||
<evn_type>START</evn_type>
|
||||
<evn_marker>EMPTY</evn_marker>
|
||||
<evn_is_interrupting>1</evn_is_interrupting>
|
||||
<evn_attached_to></evn_attached_to>
|
||||
<evn_cancel_activity>0</evn_cancel_activity>
|
||||
<evn_activity_ref></evn_activity_ref>
|
||||
<evn_wait_for_completion>0</evn_wait_for_completion>
|
||||
<evn_error_name></evn_error_name>
|
||||
<evn_error_code></evn_error_code>
|
||||
<evn_escalation_name></evn_escalation_name>
|
||||
<evn_escalation_code></evn_escalation_code>
|
||||
<evn_condition></evn_condition>
|
||||
<evn_message>LEAD</evn_message>
|
||||
<evn_operation_name></evn_operation_name>
|
||||
<evn_operation_implementation_ref></evn_operation_implementation_ref>
|
||||
<evn_time_date></evn_time_date>
|
||||
<evn_time_cycle></evn_time_cycle>
|
||||
<evn_time_duration></evn_time_duration>
|
||||
<evn_behavior>CATCH</evn_behavior>
|
||||
<bou_uid>5243884725db9931f233c43015663499</bou_uid>
|
||||
<dia_uid>8359203175db99314ddd311055114412</dia_uid>
|
||||
<element_uid>2454646545db9931f22b211032408082</element_uid>
|
||||
<bou_element>6736509965db99315c363a1037462295</bou_element>
|
||||
<bou_element_type>bpmnEvent</bou_element_type>
|
||||
<bou_x>100</bou_x>
|
||||
<bou_y>100</bou_y>
|
||||
<bou_width>33</bou_width>
|
||||
<bou_height>33</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
<record>
|
||||
<evn_uid>6813770985db9931f244b78069429303</evn_uid>
|
||||
<prj_uid>9745053325db99314dac446019554453</prj_uid>
|
||||
<pro_uid>9211677625db99314ddf9d0097887435</pro_uid>
|
||||
<evn_name></evn_name>
|
||||
<evn_type>END</evn_type>
|
||||
<evn_marker>EMPTY</evn_marker>
|
||||
<evn_is_interrupting>1</evn_is_interrupting>
|
||||
<evn_attached_to></evn_attached_to>
|
||||
<evn_cancel_activity>0</evn_cancel_activity>
|
||||
<evn_activity_ref></evn_activity_ref>
|
||||
<evn_wait_for_completion>0</evn_wait_for_completion>
|
||||
<evn_error_name></evn_error_name>
|
||||
<evn_error_code></evn_error_code>
|
||||
<evn_escalation_name></evn_escalation_name>
|
||||
<evn_escalation_code></evn_escalation_code>
|
||||
<evn_condition></evn_condition>
|
||||
<evn_message></evn_message>
|
||||
<evn_operation_name></evn_operation_name>
|
||||
<evn_operation_implementation_ref></evn_operation_implementation_ref>
|
||||
<evn_time_date></evn_time_date>
|
||||
<evn_time_cycle></evn_time_cycle>
|
||||
<evn_time_duration></evn_time_duration>
|
||||
<evn_behavior>THROW</evn_behavior>
|
||||
<bou_uid>5496002045db9931f248303051598631</bou_uid>
|
||||
<dia_uid>8359203175db99314ddd311055114412</dia_uid>
|
||||
<element_uid>6813770985db9931f244b78069429303</element_uid>
|
||||
<bou_element>6736509965db99315c363a1037462295</bou_element>
|
||||
<bou_element_type>bpmnEvent</bou_element_type>
|
||||
<bou_x>355</bou_x>
|
||||
<bou_y>100</bou_y>
|
||||
<bou_width>33</bou_width>
|
||||
<bou_height>33</bou_height>
|
||||
<bou_rel_position>0</bou_rel_position>
|
||||
<bou_size_identical>0</bou_size_identical>
|
||||
<bou_container>bpmnDiagram</bou_container>
|
||||
</record>
|
||||
</table>
|
||||
<table name="EXTENSION"/>
|
||||
<table name="FLOW">
|
||||
<record>
|
||||
<flo_uid>1625220875db9931f263b52007015986</flo_uid>
|
||||
<prj_uid>9745053325db99314dac446019554453</prj_uid>
|
||||
<dia_uid>8359203175db99314ddd311055114412</dia_uid>
|
||||
<flo_type>SEQUENCE</flo_type>
|
||||
<flo_name> </flo_name>
|
||||
<flo_element_origin>2454646545db9931f22b211032408082</flo_element_origin>
|
||||
<flo_element_origin_type>bpmnEvent</flo_element_origin_type>
|
||||
<flo_element_origin_port>0</flo_element_origin_port>
|
||||
<flo_element_dest>6645237135db9931f1d5082018688082</flo_element_dest>
|
||||
<flo_element_dest_type>bpmnActivity</flo_element_dest_type>
|
||||
<flo_element_dest_port>0</flo_element_dest_port>
|
||||
<flo_is_inmediate>1</flo_is_inmediate>
|
||||
<flo_condition></flo_condition>
|
||||
<flo_x1>133</flo_x1>
|
||||
<flo_y1>117</flo_y1>
|
||||
<flo_x2>169</flo_x2>
|
||||
<flo_y2>117</flo_y2>
|
||||
<flo_state><![CDATA[[{"x":133,"y":117},{"x":169,"y":117}]]]></flo_state>
|
||||
<flo_position>1</flo_position>
|
||||
</record>
|
||||
<record>
|
||||
<flo_uid>8430380895db9931f265247058799674</flo_uid>
|
||||
<prj_uid>9745053325db99314dac446019554453</prj_uid>
|
||||
<dia_uid>8359203175db99314ddd311055114412</dia_uid>
|
||||
<flo_type>SEQUENCE</flo_type>
|
||||
<flo_name> </flo_name>
|
||||
<flo_element_origin>6645237135db9931f1d5082018688082</flo_element_origin>
|
||||
<flo_element_origin_type>bpmnActivity</flo_element_origin_type>
|
||||
<flo_element_origin_port>0</flo_element_origin_port>
|
||||
<flo_element_dest>6813770985db9931f244b78069429303</flo_element_dest>
|
||||
<flo_element_dest_type>bpmnEvent</flo_element_dest_type>
|
||||
<flo_element_dest_port>0</flo_element_dest_port>
|
||||
<flo_is_inmediate>1</flo_is_inmediate>
|
||||
<flo_condition></flo_condition>
|
||||
<flo_x1>320</flo_x1>
|
||||
<flo_y1>117</flo_y1>
|
||||
<flo_x2>355</flo_x2>
|
||||
<flo_y2>117</flo_y2>
|
||||
<flo_state><![CDATA[[{"x":320,"y":117},{"x":355,"y":117}]]]></flo_state>
|
||||
<flo_position>1</flo_position>
|
||||
</record>
|
||||
</table>
|
||||
<table name="GATEWAY"/>
|
||||
<table name="LANE"/>
|
||||
<table name="LANESET"/>
|
||||
<table name="PARTICIPANT"/>
|
||||
<table name="PROCESS">
|
||||
<record>
|
||||
<pro_uid>9211677625db99314ddf9d0097887435</pro_uid>
|
||||
<prj_uid>9745053325db99314dac446019554453</prj_uid>
|
||||
<dia_uid>8359203175db99314ddd311055114412</dia_uid>
|
||||
<pro_name>saveAsTest</pro_name>
|
||||
<pro_type>NONE</pro_type>
|
||||
<pro_is_executable>0</pro_is_executable>
|
||||
<pro_is_closed>0</pro_is_closed>
|
||||
<pro_is_subprocess>0</pro_is_subprocess>
|
||||
</record>
|
||||
</table>
|
||||
<table name="PROJECT">
|
||||
<record>
|
||||
<prj_uid>9745053325db99314dac446019554453</prj_uid>
|
||||
<prj_name>saveAsTest</prj_name>
|
||||
<prj_description></prj_description>
|
||||
<prj_target_namespace></prj_target_namespace>
|
||||
<prj_expresion_language></prj_expresion_language>
|
||||
<prj_type_language></prj_type_language>
|
||||
<prj_exporter></prj_exporter>
|
||||
<prj_exporter_version></prj_exporter_version>
|
||||
<prj_create_date><![CDATA[2019-10-30 13:41:40]]></prj_create_date>
|
||||
<prj_update_date><![CDATA[2019-10-30 13:41:51]]></prj_update_date>
|
||||
<prj_author>00000000000000000000000000000001</prj_author>
|
||||
<prj_author_version></prj_author_version>
|
||||
<prj_original_source></prj_original_source>
|
||||
</record>
|
||||
</table>
|
||||
</definition>
|
||||
<definition class="workflow">
|
||||
<table name="process">
|
||||
<record>
|
||||
<pro_uid>9745053325db99314dac446019554453</pro_uid>
|
||||
<pro_title>saveAsTest</pro_title>
|
||||
<pro_description></pro_description>
|
||||
<pro_parent>9745053325db99314dac446019554453</pro_parent>
|
||||
<pro_time>1</pro_time>
|
||||
<pro_timeunit>DAYS</pro_timeunit>
|
||||
<pro_status>ACTIVE</pro_status>
|
||||
<pro_status_id>1</pro_status_id>
|
||||
<pro_type_day></pro_type_day>
|
||||
<pro_type>NORMAL</pro_type>
|
||||
<pro_assignment>FALSE</pro_assignment>
|
||||
<pro_show_map>0</pro_show_map>
|
||||
<pro_show_message>0</pro_show_message>
|
||||
<pro_subprocess>0</pro_subprocess>
|
||||
<pro_tri_create></pro_tri_create>
|
||||
<pro_tri_open></pro_tri_open>
|
||||
<pro_tri_deleted></pro_tri_deleted>
|
||||
<pro_tri_canceled></pro_tri_canceled>
|
||||
<pro_tri_paused></pro_tri_paused>
|
||||
<pro_tri_reassigned></pro_tri_reassigned>
|
||||
<pro_tri_unpaused></pro_tri_unpaused>
|
||||
<pro_type_process>PUBLIC</pro_type_process>
|
||||
<pro_show_delegate>0</pro_show_delegate>
|
||||
<pro_show_dynaform>0</pro_show_dynaform>
|
||||
<pro_category></pro_category>
|
||||
<pro_sub_category></pro_sub_category>
|
||||
<pro_industry>0</pro_industry>
|
||||
<pro_update_date><![CDATA[2019-10-30 13:41:51]]></pro_update_date>
|
||||
<pro_create_date><![CDATA[2019-10-30 13:41:40]]></pro_create_date>
|
||||
<pro_create_user>00000000000000000000000000000001</pro_create_user>
|
||||
<pro_height>5000</pro_height>
|
||||
<pro_width>10000</pro_width>
|
||||
<pro_title_x>0</pro_title_x>
|
||||
<pro_title_y>0</pro_title_y>
|
||||
<pro_debug>0</pro_debug>
|
||||
<pro_dynaforms></pro_dynaforms>
|
||||
<pro_derivation_screen_tpl></pro_derivation_screen_tpl>
|
||||
<pro_cost>0</pro_cost>
|
||||
<pro_unit_cost></pro_unit_cost>
|
||||
<pro_itee>1</pro_itee>
|
||||
<pro_action_done><![CDATA[a:1:{i:0;s:41:"GATEWAYTOGATEWAY_DELETE_CORRUPTED_RECORDS";}]]></pro_action_done>
|
||||
<category_id>0</category_id>
|
||||
<pro_category_label>No Category</pro_category_label>
|
||||
<pro_bpmn>1</pro_bpmn>
|
||||
</record>
|
||||
</table>
|
||||
<table name="tasks">
|
||||
<record>
|
||||
<pro_uid>9745053325db99314dac446019554453</pro_uid>
|
||||
<pro_id>0</pro_id>
|
||||
<tas_uid>6645237135db9931f1d5082018688082</tas_uid>
|
||||
<tas_title>Task 1</tas_title>
|
||||
<tas_description></tas_description>
|
||||
<tas_def_title></tas_def_title>
|
||||
<tas_def_subject_message></tas_def_subject_message>
|
||||
<tas_def_proc_code></tas_def_proc_code>
|
||||
<tas_def_message></tas_def_message>
|
||||
<tas_def_description></tas_def_description>
|
||||
<tas_type>NORMAL</tas_type>
|
||||
<tas_duration>1</tas_duration>
|
||||
<tas_delay_type></tas_delay_type>
|
||||
<tas_temporizer>0</tas_temporizer>
|
||||
<tas_type_day></tas_type_day>
|
||||
<tas_timeunit>DAYS</tas_timeunit>
|
||||
<tas_alert>FALSE</tas_alert>
|
||||
<tas_priority_variable></tas_priority_variable>
|
||||
<tas_assign_type>BALANCED</tas_assign_type>
|
||||
<tas_assign_variable><![CDATA[@@SYS_NEXT_USER_TO_BE_ASSIGNED]]></tas_assign_variable>
|
||||
<tas_group_variable></tas_group_variable>
|
||||
<tas_mi_instance_variable><![CDATA[@@SYS_VAR_TOTAL_INSTANCE]]></tas_mi_instance_variable>
|
||||
<tas_mi_complete_variable><![CDATA[@@SYS_VAR_TOTAL_INSTANCES_COMPLETE]]></tas_mi_complete_variable>
|
||||
<tas_assign_location>FALSE</tas_assign_location>
|
||||
<tas_assign_location_adhoc>FALSE</tas_assign_location_adhoc>
|
||||
<tas_transfer_fly>FALSE</tas_transfer_fly>
|
||||
<tas_last_assigned>0</tas_last_assigned>
|
||||
<tas_user>0</tas_user>
|
||||
<tas_can_upload>FALSE</tas_can_upload>
|
||||
<tas_view_upload>FALSE</tas_view_upload>
|
||||
<tas_view_additional_documentation>FALSE</tas_view_additional_documentation>
|
||||
<tas_can_cancel>FALSE</tas_can_cancel>
|
||||
<tas_owner_app>FALSE</tas_owner_app>
|
||||
<stg_uid></stg_uid>
|
||||
<tas_can_pause>FALSE</tas_can_pause>
|
||||
<tas_can_send_message>TRUE</tas_can_send_message>
|
||||
<tas_can_delete_docs>FALSE</tas_can_delete_docs>
|
||||
<tas_self_service>FALSE</tas_self_service>
|
||||
<tas_start>TRUE</tas_start>
|
||||
<tas_to_last_user>FALSE</tas_to_last_user>
|
||||
<tas_send_last_email>FALSE</tas_send_last_email>
|
||||
<tas_derivation>NORMAL</tas_derivation>
|
||||
<tas_posx>169</tas_posx>
|
||||
<tas_posy>79</tas_posy>
|
||||
<tas_width>110</tas_width>
|
||||
<tas_height>60</tas_height>
|
||||
<tas_color></tas_color>
|
||||
<tas_evn_uid></tas_evn_uid>
|
||||
<tas_boundary></tas_boundary>
|
||||
<tas_derivation_screen_tpl></tas_derivation_screen_tpl>
|
||||
<tas_selfservice_timeout>0</tas_selfservice_timeout>
|
||||
<tas_selfservice_time>0</tas_selfservice_time>
|
||||
<tas_selfservice_time_unit></tas_selfservice_time_unit>
|
||||
<tas_selfservice_trigger_uid></tas_selfservice_trigger_uid>
|
||||
<tas_selfservice_execution>EVERY_TIME</tas_selfservice_execution>
|
||||
<tas_not_email_from_format>0</tas_not_email_from_format>
|
||||
<tas_offline>FALSE</tas_offline>
|
||||
<tas_email_server_uid></tas_email_server_uid>
|
||||
<tas_auto_root>FALSE</tas_auto_root>
|
||||
<tas_receive_server_uid></tas_receive_server_uid>
|
||||
<tas_receive_last_email>FALSE</tas_receive_last_email>
|
||||
<tas_receive_email_from_format>0</tas_receive_email_from_format>
|
||||
<tas_receive_message_type>text</tas_receive_message_type>
|
||||
<tas_receive_message_template>alert_message.html</tas_receive_message_template>
|
||||
<tas_receive_subject_message></tas_receive_subject_message>
|
||||
<tas_receive_message></tas_receive_message>
|
||||
<tas_average></tas_average>
|
||||
<tas_sdv></tas_sdv>
|
||||
</record>
|
||||
</table>
|
||||
<table name="routes">
|
||||
<record>
|
||||
<rou_uid>3378136175db9931f2c1683070436026</rou_uid>
|
||||
<rou_parent>0</rou_parent>
|
||||
<pro_uid>9745053325db99314dac446019554453</pro_uid>
|
||||
<tas_uid>6645237135db9931f1d5082018688082</tas_uid>
|
||||
<rou_next_task>-1</rou_next_task>
|
||||
<rou_case>1</rou_case>
|
||||
<rou_type>SEQUENTIAL</rou_type>
|
||||
<rou_default>0</rou_default>
|
||||
<rou_condition></rou_condition>
|
||||
<rou_to_last_user>FALSE</rou_to_last_user>
|
||||
<rou_optional>FALSE</rou_optional>
|
||||
<rou_send_email>TRUE</rou_send_email>
|
||||
<rou_sourceanchor>1</rou_sourceanchor>
|
||||
<rou_targetanchor>0</rou_targetanchor>
|
||||
<rou_to_port>1</rou_to_port>
|
||||
<rou_from_port>2</rou_from_port>
|
||||
<rou_evn_uid></rou_evn_uid>
|
||||
<gat_uid></gat_uid>
|
||||
</record>
|
||||
</table>
|
||||
<table name="lanes"/>
|
||||
<table name="gateways"/>
|
||||
<table name="inputs"/>
|
||||
<table name="outputs"/>
|
||||
<table name="dynaforms"/>
|
||||
<table name="steps"/>
|
||||
<table name="triggers"/>
|
||||
<table name="taskusers"/>
|
||||
<table name="groupwfs"/>
|
||||
<table name="steptriggers"/>
|
||||
<table name="dbconnections"/>
|
||||
<table name="reportTables"/>
|
||||
<table name="reportTablesVars"/>
|
||||
<table name="stepSupervisor"/>
|
||||
<table name="objectPermissions"/>
|
||||
<table name="subProcess"/>
|
||||
<table name="caseTracker"/>
|
||||
<table name="caseTrackerObject"/>
|
||||
<table name="stage"/>
|
||||
<table name="fieldCondition"/>
|
||||
<table name="event"/>
|
||||
<table name="caseScheduler"/>
|
||||
<table name="processCategory"/>
|
||||
<table name="taskExtraProperties"/>
|
||||
<table name="processUser"/>
|
||||
<table name="processVariables"/>
|
||||
<table name="webEntry"/>
|
||||
<table name="webEntryEvent"/>
|
||||
<table name="messageType"/>
|
||||
<table name="messageTypeVariable"/>
|
||||
<table name="messageEventDefinition"/>
|
||||
<table name="scriptTask"/>
|
||||
<table name="timerEvent"/>
|
||||
<table name="emailEvent"/>
|
||||
<table name="filesManager"/>
|
||||
<table name="abeConfiguration"/>
|
||||
<table name="elementTask"/>
|
||||
</definition>
|
||||
<workflow-files/>
|
||||
</ProcessMaker-Project>
|
||||
8
tests/resources/simpleClassicPostData.json
Normal file
8
tests/resources/simpleClassicPostData.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"function": "reloadField",
|
||||
"form": "Wlp0bHBXS2tiR2FtcVpXaHBwbHcxV09tWlpObHBXaWphV2locDJpbHEyWm9wV1dlWkpabG4yQ2phWlNrcFpXbTFteHNvcGJSbUp0Z29tQ21iR1drcTJmTTZhS3BvbMKwbG9NOA______",
|
||||
"fields": "[%7B%22suggest2%22%3A%22C%22%7D]",
|
||||
"grid": "Grid",
|
||||
"gridField": "%7B%22suggest1%22%3A%22BO%22%7D",
|
||||
"row": "1"
|
||||
}
|
||||
242
tests/resources/simpleClassicSessionData.json
Normal file
242
tests/resources/simpleClassicSessionData.json
Normal file
File diff suppressed because one or more lines are too long
15
tests/resources/simpleClassicXmlFormData.xml
Executable file
15
tests/resources/simpleClassicXmlFormData.xml
Executable file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<dynaForm type="xmlform" name="2859218665d41d7c2920598058137861/3411353005d41d9a730ede8060385476" width="500" enabletemplate="0" mode="" nextstepsave="prompt">
|
||||
<BUG type="title" required="0" readonly="0" optgroup="0">
|
||||
<en>BUG</en>
|
||||
</BUG>
|
||||
<TEST type="text" maxlength="64" validate="Any" required="0" readonly="0" size="15" mode="edit" optgroup="0">
|
||||
<en>TEST</en>
|
||||
</TEST>
|
||||
<SUGGEST type="suggest" required="0" size="15" mode="edit" sqlconnection="4898432885d41d9921cea61001765691" maxresults="6" searchtype="*searchtype*" table="0" readonly="0" optgroup="0"><![CDATA[SELECT IC_UID, IC_NAME
|
||||
FROM ISO_COUNTRY]]><en>SUGGEST</en></SUGGEST>
|
||||
<SUBMIT type="submit" required="0" readonly="0" optgroup="0">
|
||||
<en>SUBMIT</en>
|
||||
</SUBMIT>
|
||||
<Grid type="grid" xmlgrid="2859218665d41d7c2920598058137861/4923800155da71a732a4207031768424" addrow="1" deleterow="1" required="0" readonly="0" resizable="0" optgroup="0"/>
|
||||
</dynaForm>
|
||||
47
tests/unit/gulliver/methods/DefaultAjaxTest.php
Normal file
47
tests/unit/gulliver/methods/DefaultAjaxTest.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\unit\gulliver\methods;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class DefaultAjaxTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* This gets data from a json file.
|
||||
* @param string $pathData
|
||||
* @return array
|
||||
*/
|
||||
private function getDataFromFile(string $pathData): array
|
||||
{
|
||||
$pathData = PATH_TRUNK . "/tests/resources/{$pathData}";
|
||||
$data = file_get_contents($pathData);
|
||||
$result = json_decode($data, JSON_OBJECT_AS_ARRAY);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* This should get the data for control suggest in classic process.
|
||||
* @test
|
||||
*/
|
||||
public function this_should_get_the_data_for_control_suggest_in_classic_process()
|
||||
{
|
||||
$_POST = $this->getDataFromFile("simpleClassicPostData.json");
|
||||
$_SESSION = $this->getDataFromFile("simpleClassicSessionData.json");
|
||||
$_SESSION["CURRENT_PAGE_INITILIZATION"] = "";
|
||||
|
||||
$pathName = PATH_XMLFORM . "2859218665d41d7c2920598058137861";
|
||||
$pathFileName = "{$pathName}/3411353005d41d9a730ede8060385476_tmp0.xml";
|
||||
if (!is_dir($pathName)) {
|
||||
mkdir($pathName);
|
||||
}
|
||||
$data = file_get_contents(PATH_TRUNK . "/tests/resources/simpleClassicXmlFormData.xml");
|
||||
file_put_contents($pathFileName, $data);
|
||||
|
||||
require_once PATH_TRUNK . '/gulliver/methods/defaultAjax.php';
|
||||
$this->expectOutputString('[]');
|
||||
|
||||
unlink($pathFileName);
|
||||
rmdir($pathName);
|
||||
}
|
||||
}
|
||||
83
tests/unit/workflow/engine/classes/DerivationTest.php
Normal file
83
tests/unit/workflow/engine/classes/DerivationTest.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\unit\workflow\engine\classes;
|
||||
|
||||
use \Derivation;
|
||||
use Tests\TestCase;
|
||||
|
||||
class DerivationTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Call the setUp parent method
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp(); // TODO: Change the autogenerated stub
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* It tests the getSubProcessVariables method with object variables
|
||||
*
|
||||
* @covers Derivation::getSubProcessVariables()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_test_the_get_sub_process_variables_method_with_object_variables()
|
||||
{
|
||||
$fields = ['@&var2' => '@&var3'];
|
||||
$childCaseData = ['var2' => (object)['Street' => 'test', 'name' => 'Something']];
|
||||
$parentCaseData = ['var1' => (object)['Street' => 'test']];
|
||||
|
||||
$der = new Derivation();
|
||||
$res = $der->getSubProcessVariables($fields, $childCaseData, $parentCaseData);
|
||||
|
||||
$this->assertArrayHasKey('var3', $res);
|
||||
$this->assertObjectHasAttribute('Street', $res['var3']);
|
||||
$this->assertObjectHasAttribute('name', $res['var3']);
|
||||
$this->assertEquals($res['var3'], (object)['Street' => 'test', 'name' => 'Something']);
|
||||
}
|
||||
|
||||
/**
|
||||
* It tests the getSubProcessVariables method with origin labels
|
||||
*
|
||||
* @covers Derivation::getSubProcessVariables()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_test_the_get_sub_process_variables_method_with_origin_labels()
|
||||
{
|
||||
$fields = ['@&var2' => '@&var3', '@&var2_label' => '@&var3'];
|
||||
$childCaseData = [
|
||||
'var2' => (object)['Street' => 'test', 'name' => 'Something'],
|
||||
'var2_label' => ['Street' => 'test', 'name' => 'Something']
|
||||
];
|
||||
$parentCaseData = ['var1' => (object)['Street' => 'test']];
|
||||
|
||||
$der = new Derivation();
|
||||
$res = $der->getSubProcessVariables($fields, $childCaseData, $parentCaseData);
|
||||
|
||||
$this->assertArrayHasKey('var3_label', $res);
|
||||
$this->assertEquals($res['var3_label'], ['Street' => 'test', 'name' => 'Something']);
|
||||
}
|
||||
|
||||
/**
|
||||
* It tests the getSubProcessVariables method with target labels
|
||||
*
|
||||
* @covers Derivation::getSubProcessVariables()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_test_the_get_sub_process_variables_method_with_target_labels()
|
||||
{
|
||||
$fields = ['@&var2' => '@&var3', '@&var2' => '@&var3_label'];
|
||||
$childCaseData = ['var2' => (object)['Street' => 'test', 'name' => 'Something']];
|
||||
$parentCaseData = ['var1' => (object)['Street' => 'test']];
|
||||
|
||||
$der = new Derivation();
|
||||
$res = $der->getSubProcessVariables($fields, $childCaseData, $parentCaseData);
|
||||
|
||||
$this->assertArrayHasKey('var3_label', $res);
|
||||
$this->assertObjectHasAttribute('Street', $res['var3_label']);
|
||||
$this->assertObjectHasAttribute('name', $res['var3_label']);
|
||||
$this->assertEquals($res['var3_label'], (object)['Street' => 'test', 'name' => 'Something']);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,16 @@
|
||||
<?php
|
||||
|
||||
use Faker\Factory;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use ProcessMaker\Model\Dynaform;
|
||||
use ProcessMaker\Model\Process;
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
* Class PmDynaformTest
|
||||
*
|
||||
* @coversDefaultClass PmDynaform
|
||||
*/
|
||||
class PmDynaformTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -239,7 +245,7 @@ class PmDynaformTest extends TestCase
|
||||
$pmDynaform = new PmDynaform(['CURRENT_DYNAFORM' => G::generateUniqueID()]);
|
||||
$pmDynaform->getDynaform();
|
||||
|
||||
$this->assertEquals(null, $pmDynaform->langs);
|
||||
$this->assertEquals(null, $pmDynaform->translations);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -824,4 +830,136 @@ class PmDynaformTest extends TestCase
|
||||
$this->assertFalse($jsonData->dataSchema[$key][4]['defined']);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Review if the set translations are working correctly
|
||||
* If the translation does not exit needs to return null
|
||||
*
|
||||
* @covers PmDynaform::setTranslations()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_set_the_translations_if_exist()
|
||||
{
|
||||
// Create a form without translations defined
|
||||
$arrayForm = $this->createArrayDynaform();
|
||||
$form = factory(Dynaform::class)->create([
|
||||
'DYN_UID' => $arrayForm['items'][0]['id'],
|
||||
'DYN_CONTENT' => G::json_encode($arrayForm)
|
||||
]);
|
||||
$pmDynaform = new PmDynaform([]);
|
||||
$pmDynaform->setTranslations($form->DYN_UID);
|
||||
$this->assertNull($pmDynaform->translations);
|
||||
|
||||
// Create a form with translations defined
|
||||
$arrayForm = $this->createArrayDynaform();
|
||||
$form = factory(Dynaform::class)->states('translations')->create([
|
||||
'DYN_UID' => $arrayForm['items'][0]['id'],
|
||||
'DYN_CONTENT' => G::json_encode($arrayForm)
|
||||
]);
|
||||
$pmDynaform = new PmDynaform([]);
|
||||
$pmDynaform->setTranslations($form->DYN_UID);
|
||||
$this->assertNotNull($pmDynaform->translations);
|
||||
}
|
||||
|
||||
/**
|
||||
* Review if the get labels from a specific language is working
|
||||
* If the translation defined does not have the specific language will return null
|
||||
*
|
||||
* @covers PmDynaform::getLabelsPo()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_get_label_from_translation()
|
||||
{
|
||||
$arrayForm = $this->createArrayDynaform();
|
||||
// Create a translations related to ["es", "es-Es"]
|
||||
$form = factory(Dynaform::class)->states('translations')->create([
|
||||
'DYN_UID' => $arrayForm['items'][0]['id'],
|
||||
'DYN_CONTENT' => G::json_encode($arrayForm)
|
||||
]);
|
||||
$pmDynaform = new PmDynaform([]);
|
||||
$pmDynaform->setTranslations($form->DYN_UID);
|
||||
$labelsPo = $pmDynaform->getLabelsPo('es');
|
||||
$this->assertNotNull($labelsPo);
|
||||
$labelsPo = $pmDynaform->getLabelsPo('es-Es');
|
||||
$this->assertNotNull($labelsPo);
|
||||
$faker = Factory::create();
|
||||
$labelsPo = $pmDynaform->getLabelsPo($faker->sentence(1));
|
||||
$this->assertNull($labelsPo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Review if the SQL that uses the SELECT statement is parsed correctly
|
||||
*
|
||||
* @covers PmDynaform::sqlParse()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_get_sql_parsed_select_statement()
|
||||
{
|
||||
// Note.- The following queries are used by running tests but none of them are valid
|
||||
$sqlOriginal1 = 'SELECT TOP 10 USERS.USR_UID, USERS.USR_ID, USERS.USR_USERNAME AS USERNAME, MAX(RBAC_USERS_ROLES.ROL_UID),
|
||||
MIN(RBAC_USERS_ROLES.ROL_UID) AS THEMIN, (SELECT USR_FIRSTNAME FROM USERS), (SELECT USR_LASTNAME AS XXX) AS YYY, <>, 1000
|
||||
FROM USERS AS OFFSET INNER JOIN RBAC_USERS ON USERS.USR_UID = RBAC_USERS.USR_UID INNER JOIN RBAC_USERS_ROLES ON
|
||||
USERS.USR_UID = RBAC_USERS_ROLES.USR_UID WHERE USERS.USR_UID <> "" AND 1 AND OFFSET 1 GROUP BY USERS.USR_UID HAVING
|
||||
USERS.USR_UID <> "" ORDER BY USERS.USR_ID DESC LIMIT 1 OFFSET 10 FOR UPDATE';
|
||||
|
||||
$sqlOriginal2 = 'SELECT TOP 10 USERS.USR_UID, USERS.USR_ID, USERS.USR_USERNAME AS USERNAME, MAX(RBAC_USERS_ROLES.ROL_UID),
|
||||
MIN(RBAC_USERS_ROLES.ROL_UID) AS THEMIN, (SELECT USR_FIRSTNAME FROM USERS), (SELECT USR_LASTNAME AS XXX) AS YYY, <>, 1000
|
||||
FROM USERS INNER JOIN RBAC_USERS ON USERS.USR_UID = RBAC_USERS.USR_UID INNER JOIN RBAC_USERS_ROLES ON
|
||||
USERS.USR_UID = RBAC_USERS_ROLES.USR_UID WHERE USERS.USR_UID <> "" AND 1 GROUP BY USERS.USR_UID HAVING
|
||||
USERS.USR_UID <> "" ORDER BY USERS.USR_ID DESC LIMIT 1, 10 FOR UPDATE';
|
||||
|
||||
$sqlOriginal3 = 'DUMMY';
|
||||
|
||||
// Instance the class PmDynaform
|
||||
$pmDynaform = new PmDynaform([]);
|
||||
|
||||
// Test bug PMC-1299
|
||||
$sqlParsed1 = $pmDynaform->sqlParse($sqlOriginal1);
|
||||
$this->assertFalse(strpos($sqlParsed1, 'INNER INNER'));
|
||||
|
||||
// For now is only used for complete the coverture
|
||||
$sqlParsed2 = $pmDynaform->sqlParse($sqlOriginal2, 'dummy_function_for_this_unit_test');
|
||||
// To Do: Currently, there is a coverture of 100%, but is necessary to add more tests to verify
|
||||
// if the SQL string is parsed correctly in more scenarios
|
||||
|
||||
// Test another string, shoul be return the same value
|
||||
$sqlParsed3 = $pmDynaform->sqlParse($sqlOriginal3);
|
||||
$this->assertEquals($sqlOriginal3, $sqlParsed3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Review if the SQL that uses the CALL statement is parsed correctly
|
||||
*
|
||||
* @covers PmDynaform::sqlParse()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_get_sql_parsed_call_statement()
|
||||
{
|
||||
$sqlOriginal = 'CALL dummy_sp_for_this_unit_test()';
|
||||
|
||||
$pmDynaform = new PmDynaform([]);
|
||||
$sqlParsed = $pmDynaform->sqlParse($sqlOriginal);
|
||||
|
||||
$this->assertEquals(strlen($sqlOriginal), strlen($sqlParsed));
|
||||
}
|
||||
|
||||
/**
|
||||
* Review if the SQL that uses the EXECUTE statement is parsed correctly
|
||||
*
|
||||
* @covers PmDynaform::sqlParse()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_get_sql_parsed_execute_statement()
|
||||
{
|
||||
$sqlOriginal = 'EXECUTE dummy_sp_for_this_unit_test()';
|
||||
|
||||
$pmDynaform = new PmDynaform([]);
|
||||
$sqlParsed = $pmDynaform->sqlParse($sqlOriginal);
|
||||
|
||||
$this->assertEquals(strlen($sqlOriginal), strlen($sqlParsed));
|
||||
}
|
||||
}
|
||||
|
||||
// Dummy function used for the coverture
|
||||
function dummy_function_for_this_unit_test()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -0,0 +1,346 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\unit\workflow\engine\classes\PmFunctions;
|
||||
|
||||
use Faker\Factory;
|
||||
use G;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use ProcessMaker\Model\DbSource;
|
||||
use ProcessMaker\Model\ProcessCategory;
|
||||
use ProcessMaker\Model\User;
|
||||
use SQLException;
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
* Test the executeQuery() function
|
||||
*
|
||||
* @link https://wiki.processmaker.com/3.1/ProcessMaker_Functions#executeQuery.28.29
|
||||
*/
|
||||
class ExecuteQueryTest extends TestCase
|
||||
{
|
||||
// todo: Please do not use "DatabaseTransactions", the executeQuery method opens another connection.
|
||||
use DatabaseTransactions;
|
||||
|
||||
protected $nameSystemTables = "system-tables.ini";
|
||||
protected $contentSystemTables = "tables = 'APPLICATION|APP_SEQUENCE|APP_DELEGATION|APP_DOCUMENT|APP_MESSAGE|APP_OWNER|CONFIGURATION|CONTENT|DEPARTMENT|DYNAFORM|GROUPWF|GROUP_USER|HOLIDAY|INPUT_DOCUMENT|ISO_COUNTRY|ISO_LOCATION|ISO_SUBDIVISION|LANGUAGE|LEXICO|OUTPUT_DOCUMENT|PROCESS|PROCESS_OWNER|REPORT_TABLE|REPORT_VAR|ROUTE|STEP|STEP_TRIGGER|SWIMLANES_ELEMENTS|TASK|TASK_USER|TRANSLATION|TRIGGERS|USERS|APP_THREAD|APP_DELAY|PROCESS_USER|SESSION|DB_SOURCE|STEP_SUPERVISOR|OBJECT_PERMISSION|CASE_TRACKER|CASE_TRACKER_OBJECT|CASE_CONSOLIDATED|STAGE|SUB_PROCESS|SUB_APPLICATION|LOGIN_LOG|USERS_PROPERTIES|ADDITIONAL_TABLES|FIELDS|SHADOW_TABLE|EVENT|GATEWAY|APP_EVENT|APP_CACHE_VIEW|DIM_TIME_DELEGATE|DIM_TIME_COMPLETE|APP_HISTORY|APP_FOLDER|FIELD_CONDITION|LOG_CASES_SCHEDULER|CASE_SCHEDULER|CALENDAR_DEFINITION|CALENDAR_BUSINESS_HOURS|CALENDAR_HOLIDAYS|CALENDAR_ASSIGNMENTS|PROCESS_CATEGORY|APP_NOTES|DASHLET|DASHLET_INSTANCE|APP_SOLR_QUEUE|SEQUENCES|SESSION_STORAGE|PROCESS_FILES|WEB_ENTRY|OAUTH_ACCESS_TOKENS|OAUTH_AUTHORIZATION_CODES|OAUTH_CLIENTS|OAUTH_REFRESH_TOKENS|OAUTH_SCOPES|PMOAUTH_USER_ACCESS_TOKENS|BPMN_PROJECT|BPMN_PROCESS|BPMN_ACTIVITY|BPMN_ARTIFACT|BPMN_DIAGRAM|BPMN_BOUND|BPMN_DATA|BPMN_EVENT|BPMN_FLOW|BPMN_GATEWAY|BPMN_LANESET|BPMN_LANE|BPMN_PARTICIPANT|BPMN_EXTENSION|BPMN_DOCUMENTATION|PROCESS_VARIABLES|APP_TIMEOUT_ACTION_EXECUTED|ADDONS_STORE|ADDONS_MANAGER|LICENSE_MANAGER|APP_ASSIGN_SELF_SERVICE_VALUE|APP_ASSIGN_SELF_SERVICE_VALUE_GROUP|LIST_INBOX|LIST_PARTICIPATED_HISTORY|LIST_PARTICIPATED_LAST|LIST_COMPLETED|LIST_PAUSED|LIST_CANCELED|LIST_MY_INBOX|LIST_UNASSIGNED|LIST_UNASSIGNED_GROUP|MESSAGE_TYPE|MESSAGE_TYPE_VARIABLE|EMAIL_SERVER|WEB_ENTRY_EVENT|MESSAGE_EVENT_DEFINITION|MESSAGE_EVENT_RELATION|MESSAGE_APPLICATION|ELEMENT_TASK_RELATION|ABE_CONFIGURATION|ABE_REQUESTS|ABE_RESPONSES|USR_REPORTING|PRO_REPORTING|DASHBOARD|DASHBOARD_INDICATOR|DASHBOARD_DAS_IND|CATALOG|SCRIPT_TASK|TIMER_EVENT|EMAIL_EVENT|NOTIFICATION_DEVICE|GMAIL_RELABELING|NOTIFICATION_QUEUE|PLUGINS_REGISTRY|APP_DATA_CHANGE_LOG|JOBS_PENDING|JOBS_FAILED|RBAC_PERMISSIONS|RBAC_ROLES|RBAC_ROLES_PERMISSIONS|RBAC_SYSTEMS|RBAC_USERS|RBAC_USERS_ROLES|RBAC_AUTHENTICATION_SOURCE|'";
|
||||
protected $oldContentSystemTables = "";
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
ProcessCategory::truncate();
|
||||
$this->oldContentSystemTables = "";
|
||||
$path = PATH_CONFIG . $this->nameSystemTables;
|
||||
if (file_exists($path)) {
|
||||
$this->oldContentSystemTables = file_get_contents($path);
|
||||
}
|
||||
file_put_contents($path, $this->contentSystemTables);
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
$path = PATH_CONFIG . $this->nameSystemTables;
|
||||
file_put_contents($path, $this->oldContentSystemTables);
|
||||
}
|
||||
|
||||
/**
|
||||
* This tests if the "executeQuery" method is returning the data of a query.
|
||||
* @test
|
||||
*/
|
||||
public function it_must_return_the_result_of_execute_query_method()
|
||||
{
|
||||
$user = factory(User::class, 5)->create();
|
||||
|
||||
$user = $user->sortByDesc('USR_UID')->values()->map(function($item) {
|
||||
$result = [
|
||||
'USR_UID' => $item['USR_UID'],
|
||||
'USR_USERNAME' => $item['USR_USERNAME'],
|
||||
'USR_PASSWORD' => $item['USR_PASSWORD'],
|
||||
'USR_FIRSTNAME' => $item['USR_FIRSTNAME'],
|
||||
'USR_LASTNAME' => $item['USR_LASTNAME'],
|
||||
'USR_EMAIL' => $item['USR_EMAIL'],
|
||||
];
|
||||
return $result;
|
||||
});
|
||||
$expected = $user->toArray();
|
||||
|
||||
$sql = "SELECT "
|
||||
. "USR_UID ,"
|
||||
. "USR_USERNAME ,"
|
||||
. "USR_PASSWORD ,"
|
||||
. "USR_FIRSTNAME, "
|
||||
. "USR_LASTNAME, "
|
||||
. "USR_EMAIL "
|
||||
. "FROM USERS "
|
||||
. "WHERE "
|
||||
. "USR_UID NOT IN ("
|
||||
. " '00000000000000000000000000000001',"
|
||||
. " '00000000000000000000000000000002'"
|
||||
. ")"
|
||||
. "ORDER BY USR_UID DESC";
|
||||
$actual = executeQuery($sql);
|
||||
$actual = array_values($actual);
|
||||
|
||||
$this->assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert a record in the category table using the execute query function.
|
||||
* @test
|
||||
*/
|
||||
public function it_should_insert_a_record_in_the_category_table_using_the_execute_query_method()
|
||||
{
|
||||
$database = env('DB_DATABASE');
|
||||
$faker = Factory::create();
|
||||
$uid = G::generateUniqueID();
|
||||
$id = $faker->unique()->numberBetween(1, 10000000);
|
||||
$name = str_replace("'", " ", $faker->name);
|
||||
$sql = ""
|
||||
. "INSERT INTO {$database}.PROCESS_CATEGORY("
|
||||
. " CATEGORY_UID,"
|
||||
. " CATEGORY_ID,"
|
||||
. " CATEGORY_PARENT,"
|
||||
. " CATEGORY_NAME,"
|
||||
. " CATEGORY_ICON"
|
||||
. ") VALUES"
|
||||
. "("
|
||||
. " '{$uid}',"
|
||||
. " '{$id}',"
|
||||
. " '0',"
|
||||
. " '{$name}',"
|
||||
. " ''"
|
||||
. ")";
|
||||
executeQuery($sql);
|
||||
$expected = [
|
||||
[
|
||||
'CATEGORY_UID' => $uid,
|
||||
'CATEGORY_ID' => $id,
|
||||
'CATEGORY_PARENT' => '0',
|
||||
'CATEGORY_NAME' => $name,
|
||||
'CATEGORY_ICON' => '',
|
||||
]
|
||||
];
|
||||
|
||||
$actual = ProcessCategory::get();
|
||||
|
||||
$this->assertEquals($expected, $actual->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace a record in the category table using the execute query function.
|
||||
* @test
|
||||
*/
|
||||
public function it_should_replace_a_record_in_the_category_table_using_the_execute_query_method()
|
||||
{
|
||||
$database = env('DB_DATABASE');
|
||||
$faker = Factory::create();
|
||||
$id = $faker->unique()->numberBetween(1, 10000000);
|
||||
$newName = str_replace("'", " ", $faker->name);
|
||||
|
||||
$category = factory(ProcessCategory::class)->create([
|
||||
'CATEGORY_ID' => $id
|
||||
]);
|
||||
$expected = $category->toArray();
|
||||
$expected['CATEGORY_NAME'] = $newName;
|
||||
unset($expected['id']);
|
||||
|
||||
$sql = "REPLACE INTO {$database}.PROCESS_CATEGORY "
|
||||
. "SET "
|
||||
. "CATEGORY_UID='{$category->CATEGORY_UID}',"
|
||||
. "CATEGORY_PARENT='{$category->CATEGORY_PARENT}', "
|
||||
. "CATEGORY_NAME='{$newName}', "
|
||||
. "CATEGORY_ICON='{$category->CATEGORY_ICON}', "
|
||||
. "CATEGORY_ID='{$category->CATEGORY_ID}'"
|
||||
. "";
|
||||
|
||||
executeQuery($sql);
|
||||
|
||||
$actual = ProcessCategory::where('CATEGORY_UID', '=', $category->CATEGORY_UID)
|
||||
->get()
|
||||
->first();
|
||||
|
||||
$this->assertEquals($expected, $actual->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a record in the category table using the execute query function.
|
||||
* @test
|
||||
*/
|
||||
public function it_should_update_a_record_in_the_category_table_using_the_execute_query_method()
|
||||
{
|
||||
$database = env('DB_DATABASE');
|
||||
$faker = Factory::create();
|
||||
$id = $faker->unique()->numberBetween(1, 10000000);
|
||||
$newName = str_replace("'", " ", $faker->name);
|
||||
|
||||
$category = factory(ProcessCategory::class)->create([
|
||||
'CATEGORY_ID' => $id
|
||||
]);
|
||||
$expected = $category->toArray();
|
||||
$expected['CATEGORY_NAME'] = $newName;
|
||||
unset($expected['id']);
|
||||
|
||||
$sql = ""
|
||||
. "UPDATE {$database}.PROCESS_CATEGORY SET "
|
||||
. "CATEGORY_NAME='{$newName}' "
|
||||
. "WHERE "
|
||||
. "CATEGORY_UID='{$category->CATEGORY_UID}'";
|
||||
executeQuery($sql);
|
||||
|
||||
$actual = ProcessCategory::where('CATEGORY_UID', '=', $category->CATEGORY_UID)
|
||||
->get()
|
||||
->first();
|
||||
|
||||
$this->assertEquals($expected, $actual->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a record in the category table using the execute query function.
|
||||
* @test
|
||||
*/
|
||||
public function it_should_delete_a_record_in_the_category_table_using_the_execute_query_method()
|
||||
{
|
||||
|
||||
$database = env('DB_DATABASE');
|
||||
$category = factory(ProcessCategory::class)->create();
|
||||
|
||||
$sql = ""
|
||||
. "DELETE FROM {$database}.PROCESS_CATEGORY "
|
||||
. "WHERE "
|
||||
. "CATEGORY_UID='{$category->CATEGORY_UID}'";
|
||||
executeQuery($sql);
|
||||
|
||||
$actual = ProcessCategory::where('CATEGORY_UID', '=', $category->CATEGORY_UID)
|
||||
->get()
|
||||
->first();
|
||||
|
||||
$this->assertNull($actual);
|
||||
}
|
||||
|
||||
/**
|
||||
* This performs a test of connectivity to an external database using DBS_UID
|
||||
* in the executeQuery() method.
|
||||
* @test
|
||||
*/
|
||||
public function this_connects_to_an_external_database_using_the_execute_query_method()
|
||||
{
|
||||
$dbName = env('DB_DATABASE');
|
||||
$dbSource = factory(DbSource::class)->create([
|
||||
'DBS_TYPE' => 'mysql',
|
||||
'DBS_SERVER' => env('DB_HOST'),
|
||||
'DBS_DATABASE_NAME' => $dbName,
|
||||
'DBS_USERNAME' => env('DB_USERNAME'),
|
||||
'DBS_PASSWORD' => G::encrypt(env('DB_PASSWORD'), $dbName) . "_2NnV3ujj3w",
|
||||
'DBS_PORT' => '3306',
|
||||
]);
|
||||
|
||||
//this is important to get the connection
|
||||
$_SESSION['PROCESS'] = $dbSource->PRO_UID;
|
||||
|
||||
$sql = "show tables";
|
||||
$result = executeQuery($sql, $dbSource->DBS_UID);
|
||||
|
||||
$this->assertTrue(is_array($result));
|
||||
}
|
||||
|
||||
/**
|
||||
* This performs a test of connectivity to an external database using DBS_UID
|
||||
* in the executeQuery() method.
|
||||
* @test
|
||||
*/
|
||||
public function this_connects_to_an_external_oracle_database_using_the_execute_query_method()
|
||||
{
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
$dbName = "XE";
|
||||
$dbSource = factory(DbSource::class)->create([
|
||||
'DBS_TYPE' => 'oracle',
|
||||
'DBS_CONNECTION_TYPE' => 'NORMAL',
|
||||
'DBS_SERVER' => 'localhost',
|
||||
'DBS_DATABASE_NAME' => $dbName,
|
||||
'DBS_USERNAME' => env('DB_USERNAME'),
|
||||
'DBS_PASSWORD' => G::encrypt(env('DB_PASSWORD'), $dbName) . "_2NnV3ujj3w",
|
||||
'DBS_PORT' => '1521',
|
||||
]);
|
||||
|
||||
//this is important to get the connection
|
||||
$_SESSION['PROCESS'] = $dbSource->PRO_UID;
|
||||
|
||||
$sql = "select username,account_status from dba_users";
|
||||
$result = executeQuery($sql, $dbSource->DBS_UID);
|
||||
|
||||
$this->assertTrue(is_array($result));
|
||||
}
|
||||
|
||||
/**
|
||||
* This verifies the protection of the system tables.
|
||||
* @test
|
||||
*/
|
||||
public function this_check_the_black_list()
|
||||
{
|
||||
$faker = Factory::create();
|
||||
$uid = G::generateUniqueID();
|
||||
$id = $faker->unique()->numberBetween(1, 10000000);
|
||||
$name = str_replace("'", " ", $faker->name);
|
||||
$sql = ""
|
||||
. "INSERT INTO PROCESS_CATEGORY("
|
||||
. " CATEGORY_UID,"
|
||||
. " CATEGORY_ID,"
|
||||
. " CATEGORY_PARENT,"
|
||||
. " CATEGORY_NAME,"
|
||||
. " CATEGORY_ICON"
|
||||
. ") VALUES"
|
||||
. "("
|
||||
. " '{$uid}',"
|
||||
. " '{$id}',"
|
||||
. " '0',"
|
||||
. " '{$name}',"
|
||||
. " ''"
|
||||
. ")";
|
||||
|
||||
$this->expectException(SQLException::class);
|
||||
|
||||
/**
|
||||
* The executeQuery() function is executing the standard error_log()
|
||||
* output, this test shows error information, but will not stop the
|
||||
* execution of the test.
|
||||
* The error_log() method must stop being used.
|
||||
*/
|
||||
executeQuery($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* This verifies the protection of the system tables.
|
||||
* @test
|
||||
*/
|
||||
public function this_check_the_black_list_for_multiple_tables()
|
||||
{
|
||||
$faker = Factory::create();
|
||||
$id = $faker->unique()->numberBetween(1, 10000000);
|
||||
$newName = str_replace("'", " ", $faker->name);
|
||||
|
||||
$category = factory(ProcessCategory::class)->create([
|
||||
'CATEGORY_ID' => $id
|
||||
]);
|
||||
$expected = $category->toArray();
|
||||
$expected['CATEGORY_NAME'] = $newName;
|
||||
unset($expected['id']);
|
||||
|
||||
$sql = ""
|
||||
. "UPDATE PROCESS_CATEGORY SET "
|
||||
. "CATEGORY_NAME='{$newName}' "
|
||||
. "WHERE "
|
||||
. "CATEGORY_UID='{$category->CATEGORY_UID}'";
|
||||
|
||||
$this->expectException(SQLException::class);
|
||||
|
||||
/**
|
||||
* The executeQuery() function is executing the standard error_log()
|
||||
* output, this test shows error information, but will not stop the
|
||||
* execution of the test.
|
||||
* The error_log() method must stop being used.
|
||||
*/
|
||||
executeQuery($sql);
|
||||
}
|
||||
}
|
||||
28
tests/unit/workflow/engine/classes/PmTableTest.php
Normal file
28
tests/unit/workflow/engine/classes/PmTableTest.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class PmTablesTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* Check if the "removePmtPropelFolder" is working correctly
|
||||
*
|
||||
* @covers PmTable::removePmtPropelFolder()
|
||||
*
|
||||
* @test
|
||||
*/
|
||||
public function it_should_check_remove_pmt_propel_folder()
|
||||
{
|
||||
// Define the folder path
|
||||
$pmtPropelFolderPath = PATH_DB . config('system.workspace') . PATH_SEP . 'pmt-propel';
|
||||
|
||||
// Create the folder
|
||||
G::mk_dir($pmtPropelFolderPath);
|
||||
|
||||
// Remove the "pmt-propel" folder
|
||||
PmTable::removePmtPropelFolder();
|
||||
|
||||
// Assert that the folder was deleted correctly
|
||||
$this->assertFalse(is_dir($pmtPropelFolderPath));
|
||||
}
|
||||
}
|
||||
@@ -428,4 +428,35 @@ class ProcessesTest extends TestCase
|
||||
|
||||
$this->assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
/**
|
||||
* This gets the data structure of a project.
|
||||
* @test
|
||||
* @covers Processes::getWorkflowData()
|
||||
*/
|
||||
public function it_should_get_workflow_data()
|
||||
{
|
||||
/**
|
||||
* To perform the test this requires a valid installation and its respective license.
|
||||
*
|
||||
* In the file "workflow/engine/classes/WorkspaceTools.php",
|
||||
* these lines need the db.php file.
|
||||
*
|
||||
* public function __construct($workspaceName)
|
||||
* {
|
||||
* $this->name = $workspaceName;
|
||||
* $this->path = PATH_DB . $this->name;
|
||||
* $this->dbPath = $this->path . '/db.php';
|
||||
* if ($this->workspaceExists()) {
|
||||
* $this->getDBInfo();
|
||||
* }
|
||||
* $this->setListContentMigrateTable();
|
||||
* }
|
||||
*/
|
||||
$this->markTestIncomplete("To perform the test this requires a valid installation and its respective license.");
|
||||
$process = factory(\ProcessMaker\Model\Process::class)->create();
|
||||
$processes = new Processes();
|
||||
$result = $processes->getWorkflowData($process->PRO_UID);
|
||||
$this->assertNotNull($result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,9 @@ class DesignerTest extends TestCase
|
||||
);
|
||||
|
||||
//Start the session for the user logged
|
||||
if (session_status() === PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
$_SESSION['CASE'] = $application->APP_NUMBER;
|
||||
$_SESSION['PIN'] = "LJ5W";
|
||||
|
||||
@@ -205,4 +205,53 @@ class ActionsByEmailTest extends TestCase
|
||||
//Assert the email was not sent
|
||||
$this->assertContains('**ID_UNEXPECTED_ERROR_OCCURRED_PLEASE**', $res);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the forwardMail method with ssl
|
||||
*
|
||||
* @covers \ProcessMaker\BusinessModel\ActionsByEmail::forwardMail()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_test_the_forward_mail_method_with_ssl()
|
||||
{
|
||||
//Create the Task factory
|
||||
factory(Task::class)->create();
|
||||
//Create the Process factory
|
||||
factory(Process::class)->create();
|
||||
//Create the Dynaform factory
|
||||
factory(Dynaform::class)->create();
|
||||
//Create the EmailServerModel factory with smtp secure
|
||||
factory(EmailServerModel::class)->create(
|
||||
['SMTPSECURE' => 'ssl']
|
||||
);
|
||||
//Create the Application factory
|
||||
factory(Application::class)->create();
|
||||
//Create the Delegation factory
|
||||
$delegation = factory(Delegation::class)->create();
|
||||
//Create the AbeConfiguration factory
|
||||
$abeConfiguration = factory(AbeConfiguration::class)->create();
|
||||
//Create the AbeConfiguration factory
|
||||
$abeRequest = factory(AbeRequest::class)->create([
|
||||
'ABE_UID' => $abeConfiguration->ABE_UID,
|
||||
'APP_UID' => $delegation->APP_UID,
|
||||
'DEL_INDEX' => $delegation->DEL_INDEX,
|
||||
'ABE_REQ_UID' => $abeConfiguration->ABE_UID,
|
||||
]);
|
||||
|
||||
//Prepare the array send to the method
|
||||
$arrayData = [
|
||||
'action' => 'forwardMail',
|
||||
'REQ_UID' => $abeRequest->ABE_REQ_UID,
|
||||
'limit' => '',
|
||||
'start' => ''
|
||||
];
|
||||
|
||||
//Create the ActionsByEmail object
|
||||
$abe = new ActionsByEmail();
|
||||
//Call the forwardMail method
|
||||
$res = $abe->forwardMail($arrayData);
|
||||
|
||||
//Assert the email was sent successfully
|
||||
$this->assertContains('**ID_EMAIL_RESENT_TO**: ' . $abeRequest->ABE_REQ_SENT_TO, $res);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\unit\workflow\engine\src\ProcessMaker\BusinessModel;
|
||||
|
||||
use ProcessMaker\BusinessModel\Migrator\GranularImporter;
|
||||
use Tests\TestCase;
|
||||
|
||||
class GranularImporterTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* This returns a set of data that is read from a json file.
|
||||
*/
|
||||
public function importDataObject()
|
||||
{
|
||||
$filename = PATH_TRUNK . "/tests/resources/GranularImporterTest.json";
|
||||
$json = file_get_contents($filename);
|
||||
$data = json_decode($json, true);
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* It should return data from addObjectData() method.
|
||||
* @test
|
||||
* @covers \ProcessMaker\BusinessModel\Migrator\GranularImporter::addObjectData()
|
||||
* @dataProvider importDataObject
|
||||
*/
|
||||
public function it_should_return_data_from_add_object_data_method($name, $data)
|
||||
{
|
||||
$granularImporter = new GranularImporter();
|
||||
$result = $granularImporter->addObjectData($name, $data);
|
||||
$this->assertArrayHasKey($name, $result);
|
||||
}
|
||||
}
|
||||
@@ -62,13 +62,16 @@ class SkinsTest extends TestCase
|
||||
*/
|
||||
public function testGetSkinsCurrentWorkspace()
|
||||
{
|
||||
$this->object->createSkin('test2', 'test2', 'description skin', config("system.workspace"));
|
||||
$skins = $this->object->getSkins();
|
||||
$this->assertCount(3, $skins);
|
||||
$this->assertEquals('test2', $skins[2]['SKIN_FOLDER_ID']);
|
||||
$this->object->createSkin('test', 'test', 'description skin', config("system.workspace"));
|
||||
$this->object->createSkin('test', 'test');
|
||||
$this->object->createSkin('test2', 'test2', 'Second skin', 'ProcessMaker Team', 'current', 'neoclassic');
|
||||
$skins = $this->object->getSkins();
|
||||
$skins = collect($skins)
|
||||
->sortBy('SKIN_FOLDER_ID')
|
||||
->values()
|
||||
->toArray();
|
||||
$this->assertCount(4, $skins);
|
||||
$this->assertEquals('test2', $skins[3]['SKIN_FOLDER_ID']);
|
||||
$this->assertEquals($skins[2]['SKIN_FOLDER_ID'], 'test');
|
||||
$this->assertEquals($skins[3]['SKIN_FOLDER_ID'], 'test2');
|
||||
$this->assertEquals($skins[3]['SKIN_WORKSPACE'], config("system.workspace"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,24 +2,47 @@
|
||||
|
||||
namespace Tests\unit\workflow\engine\src\ProcessMaker\Importer;
|
||||
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Carbon\Carbon;
|
||||
use ProcessMaker\Importer\Importer;
|
||||
use ProcessMaker\Model\BpmnProject;
|
||||
use ProcessMaker\Model\Process;
|
||||
use ProcessMaker\Model\User;
|
||||
use ReflectionClass;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ImporterTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
||||
/**
|
||||
* Declared to avoid the incompatibility exception
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
$this->markTestIncomplete();//@todo: Please correct this unit test
|
||||
parent::setUp();
|
||||
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
|
||||
config(["system.workspace" => "test"]);
|
||||
$workspace = config("system.workspace");
|
||||
|
||||
if (!file_exists(PATH_DB . $workspace)) {
|
||||
mkdir(PATH_DB . $workspace);
|
||||
}
|
||||
|
||||
if (!file_exists(PATH_DB . $workspace . PATH_SEP . "db.php")) {
|
||||
$myfile = fopen(PATH_DB . $workspace . PATH_SEP . "db.php", "w");
|
||||
fwrite($myfile, "<?php
|
||||
define ('DB_ADAPTER', 'mysql' );
|
||||
define ('DB_HOST', '" . env('DB_HOST') . "' );
|
||||
define ('DB_NAME', '" . env('DB_DATABASE') . "' );
|
||||
define ('DB_USER', '" . env('DB_USERNAME') . "' );
|
||||
define ('DB_PASS', '" . env('DB_PASSWORD') . "' );
|
||||
define ('DB_RBAC_HOST', '" . env('DB_HOST') . "' );
|
||||
define ('DB_RBAC_NAME', '" . env('DB_DATABASE') . "' );
|
||||
define ('DB_RBAC_USER', '" . env('DB_USERNAME') . "' );
|
||||
define ('DB_RBAC_PASS', '" . env('DB_PASSWORD') . "' );
|
||||
define ('DB_REPORT_HOST', '" . env('DB_HOST') . "' );
|
||||
define ('DB_REPORT_NAME', '" . env('DB_DATABASE') . "' );
|
||||
define ('DB_REPORT_USER', '" . env('DB_USERNAME') . "' );
|
||||
define ('DB_REPORT_PASS', '" . env('DB_PASSWORD') . "' );");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -271,6 +294,7 @@ class ImporterTest extends TestCase
|
||||
// Mock the load method
|
||||
$importer->method("load")
|
||||
->willReturn($array);
|
||||
$importer->setData("usr_uid", factory(User::class)->create()->USR_UID);
|
||||
|
||||
// Call the import method
|
||||
$res = $importer->import(Importer::IMPORT_OPTION_KEEP_WITHOUT_CHANGING_AND_CREATE_NEW,
|
||||
@@ -282,7 +306,9 @@ class ImporterTest extends TestCase
|
||||
$result = $query->get()->values()->toArray();
|
||||
|
||||
// Assert the created date is the same as the updated date
|
||||
$this->assertEquals($result[0]['PRO_CREATE_DATE'], $result[0]['PRO_UPDATE_DATE']);
|
||||
$createDate = Carbon::createFromTimeString($result[0]['PRO_CREATE_DATE'])->format("Y-m-d");
|
||||
$updateDate = Carbon::createFromTimeString($result[0]['PRO_UPDATE_DATE'])->format("Y-m-d");
|
||||
$this->assertEquals($createDate, $updateDate);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -520,6 +546,7 @@ class ImporterTest extends TestCase
|
||||
// Mock the load method
|
||||
$importer->method("load")
|
||||
->willReturn($array);
|
||||
$importer->setData("usr_uid", factory(User::class)->create()->USR_UID);
|
||||
|
||||
// Call the setProtectedProperty method
|
||||
$this->setProtectedProperty($importer, 'metadata', ['uid' => $process['PRO_UID']]);
|
||||
|
||||
@@ -0,0 +1,312 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\unit\workflow\engine\src\ProcessMaker\Importer;
|
||||
|
||||
use G;
|
||||
use Exception;
|
||||
use ProcessMaker\Model\Groupwf;
|
||||
use ProcessMaker\Model\User;
|
||||
use ProcessMaker\Importer\XmlImporter;
|
||||
use Tests\TestCase;
|
||||
|
||||
class XmlImporterTest extends TestCase
|
||||
{
|
||||
private $user;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
/**
|
||||
* To perform the test this requires a valid installation and its respective license.
|
||||
*
|
||||
* In the file "workflow/engine/classes/WorkspaceTools.php",
|
||||
* these lines need the db.php file.
|
||||
*
|
||||
* public function __construct($workspaceName)
|
||||
* {
|
||||
* $this->name = $workspaceName;
|
||||
* $this->path = PATH_DB . $this->name;
|
||||
* $this->dbPath = $this->path . '/db.php';
|
||||
* if ($this->workspaceExists()) {
|
||||
* $this->getDBInfo();
|
||||
* }
|
||||
* $this->setListContentMigrateTable();
|
||||
* }
|
||||
*
|
||||
*
|
||||
* In the file "workflow/engine/src/ProcessMaker/BusinessModel/Migrator/GranularImporter.php",
|
||||
* these lines need a valid license.
|
||||
*
|
||||
* public function import($objectList)
|
||||
* {
|
||||
* try {
|
||||
* if (\PMLicensedFeatures::getSingleton()->verifyfeature
|
||||
* ("jXsSi94bkRUcVZyRStNVExlTXhEclVadGRRcG9xbjNvTWVFQUF3cklKQVBiVT0=")
|
||||
* ) {
|
||||
* $objectList = $this->reorderImportOrder($objectList);
|
||||
* foreach ($objectList as $data) {
|
||||
* $objClass = $this->factory->create($data['name']);
|
||||
* if (is_object($objClass)) {
|
||||
* $dataImport = $data['data'][$data['name']];
|
||||
* $replace = ($data['value'] == 'replace') ? true : false;
|
||||
* $objClass->beforeImport($dataImport);
|
||||
* $migratorData = $objClass->import($dataImport, $replace);
|
||||
* $objClass->afterImport($dataImport);
|
||||
* }
|
||||
* }
|
||||
* } else {
|
||||
* $exception = new ImportException();
|
||||
* $exception->setNameException(\G::LoadTranslation('ID_NO_LICENSE_SELECTIVEIMPORTEXPORT_ENABLED'));
|
||||
* throw($exception);
|
||||
* }
|
||||
*
|
||||
* } catch (\Exception $e) {
|
||||
* if (get_class($e) === 'ProcessMaker\BusinessModel\Migrator\ImportException') {
|
||||
* throw $e;
|
||||
* } else {
|
||||
* $exception = new ImportException('Please review your current process definition
|
||||
* for missing elements, it\'s recommended that a new process should be exported
|
||||
* with all the elements.');
|
||||
* throw $exception;
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
$this->markTestIncomplete("To perform the test this requires a valid installation and its respective license.");
|
||||
parent::setUp();
|
||||
$this->user = factory(User::class)->create();
|
||||
Groupwf::truncate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the import new option and the import new group option.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Importer\XmlImporter::import()
|
||||
* @covers \ProcessMaker\Importer\XmlImporter::importBpmnTables()
|
||||
*/
|
||||
public function it_should_matter_with_import_option_create_new_and_group_import_option_create_new()
|
||||
{
|
||||
$filename = PATH_TRUNK . "/tests/resources/p1normal-1.pmx";
|
||||
$importer = new XmlImporter();
|
||||
$importer->setData("usr_uid", $this->user->USR_UID);
|
||||
$importer->setSourceFile($filename);
|
||||
$result = $importer->import(XmlImporter::IMPORT_OPTION_CREATE_NEW, XmlImporter::GROUP_IMPORT_OPTION_CREATE_NEW, false);
|
||||
$this->assertNotNull($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the import new without changing and the import merge group option.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Importer\XmlImporter::import()
|
||||
*/
|
||||
public function it_should_matter_with_import_option_keep_without_changing_and_create_new_and_group_import_option_merge_preexistent()
|
||||
{
|
||||
factory(\ProcessMaker\Model\Groupwf::class)->create([
|
||||
'GRP_TITLE' => 'group1'
|
||||
]);
|
||||
factory(\ProcessMaker\Model\Groupwf::class)->create([
|
||||
'GRP_TITLE' => 'group2'
|
||||
]);
|
||||
$regenerateUids = false;
|
||||
$filename = PATH_TRUNK . "/tests/resources/p1normal-1.pmx";
|
||||
$importer = new XmlImporter();
|
||||
$importer->setData("usr_uid", $this->user->USR_UID);
|
||||
$importer->setSourceFile($filename);
|
||||
$result = $importer->import(XmlImporter::IMPORT_OPTION_KEEP_WITHOUT_CHANGING_AND_CREATE_NEW, XmlImporter::GROUP_IMPORT_OPTION_MERGE_PREEXISTENT, true);
|
||||
$this->assertNotNull($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the import overwrite option and the import rename group option.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Importer\XmlImporter::import()
|
||||
*/
|
||||
public function it_should_matter_with_import_option_overwrite_and_group_import_option_rename()
|
||||
{
|
||||
factory(\ProcessMaker\Model\Groupwf::class)->create([
|
||||
'GRP_TITLE' => 'group1'
|
||||
]);
|
||||
factory(\ProcessMaker\Model\Groupwf::class)->create([
|
||||
'GRP_TITLE' => 'group2'
|
||||
]);
|
||||
$filename = PATH_TRUNK . "/tests/resources/p1normal-1.pmx";
|
||||
$importer = new XmlImporter();
|
||||
$importer->setData("usr_uid", $this->user->USR_UID);
|
||||
$importer->setSourceFile($filename);
|
||||
$result = $importer->import(XmlImporter::IMPORT_OPTION_OVERWRITE, XmlImporter::GROUP_IMPORT_OPTION_RENAME, false);
|
||||
$this->assertNotNull($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the import new option and the import new group option with objects imports.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Importer\XmlImporter::import()
|
||||
* @covers \ProcessMaker\BusinessModel\Migrator\GranularImporter::structureBpmnData()
|
||||
*/
|
||||
public function it_should_matter_with_import_option_create_new_and_group_import_option_create_new_and_objects_import()
|
||||
{
|
||||
$filename = PATH_TRUNK . "/tests/resources/p2custom-1.pmx2";
|
||||
|
||||
$objectsToImportFilename = PATH_TRUNK . "/tests/resources/p2custom-1-ObjectsToImport.json";
|
||||
$json = file_get_contents($objectsToImportFilename);
|
||||
$objectsToImport = json_decode($json);
|
||||
|
||||
$importer = new XmlImporter();
|
||||
$importer->setData("usr_uid", $this->user->USR_UID);
|
||||
$importer->setSourceFile($filename);
|
||||
$result = $importer->import(XmlImporter::IMPORT_OPTION_CREATE_NEW, XmlImporter::GROUP_IMPORT_OPTION_CREATE_NEW, false, $objectsToImport);
|
||||
$this->assertNotNull($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the import without changing option and the import new group option with objects import.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Importer\XmlImporter::import()
|
||||
*/
|
||||
public function it_should_matter_with_import_option_keep_without_changing_and_create_new_and_group_import_option_create_new()
|
||||
{
|
||||
$regenerateUids = false;
|
||||
$filename = PATH_TRUNK . "/tests/resources/p2custom-1.pmx2";
|
||||
|
||||
$objectsToImportFilename = PATH_TRUNK . "/tests/resources/p2custom-1-ObjectsToImport.json";
|
||||
$json = file_get_contents($objectsToImportFilename);
|
||||
$objectsToImport = json_decode($json);
|
||||
|
||||
$importer = new XmlImporter();
|
||||
$importer->setData("usr_uid", $this->user->USR_UID);
|
||||
$importer->setSourceFile($filename);
|
||||
$result = $importer->import(XmlImporter::IMPORT_OPTION_KEEP_WITHOUT_CHANGING_AND_CREATE_NEW, XmlImporter::GROUP_IMPORT_OPTION_CREATE_NEW, true, $objectsToImport);
|
||||
$this->assertNotNull($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the import overwrite option and the import new group option with objects import.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Importer\XmlImporter::import()
|
||||
*/
|
||||
public function it_should_matter_with_import_option_overwrite_and_group_import_option_create_new()
|
||||
{
|
||||
$filename = PATH_TRUNK . "/tests/resources/p2custom-1.pmx2";
|
||||
|
||||
$objectsToImportFilename = PATH_TRUNK . "/tests/resources/p2custom-1-ObjectsToImport.json";
|
||||
$json = file_get_contents($objectsToImportFilename);
|
||||
$objectsToImport = json_decode($json);
|
||||
|
||||
$importer = new XmlImporter();
|
||||
$importer->setData("usr_uid", $this->user->USR_UID);
|
||||
$importer->setSourceFile($filename);
|
||||
$result = $importer->import(XmlImporter::IMPORT_OPTION_OVERWRITE, XmlImporter::GROUP_IMPORT_OPTION_CREATE_NEW, false, $objectsToImport);
|
||||
$this->assertNotNull($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the import disable option and the import new group option with objects import.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Importer\XmlImporter::import()
|
||||
*/
|
||||
public function it_should_matter_with_import_option_disable_and_create_new_and_group_import_option_create_new()
|
||||
{
|
||||
$regenerateUids = false;
|
||||
$filename = PATH_TRUNK . "/tests/resources/p2custom-1.pmx2";
|
||||
|
||||
$objectsToImportFilename = PATH_TRUNK . "/tests/resources/p2custom-1-ObjectsToImport.json";
|
||||
$json = file_get_contents($objectsToImportFilename);
|
||||
$objectsToImport = json_decode($json);
|
||||
|
||||
$importer = new XmlImporter();
|
||||
$importer->setData("usr_uid", $this->user->USR_UID);
|
||||
$importer->setSourceFile($filename);
|
||||
$result = $importer->import(XmlImporter::IMPORT_OPTION_DISABLE_AND_CREATE_NEW, XmlImporter::GROUP_IMPORT_OPTION_CREATE_NEW, true, $objectsToImport);
|
||||
$this->assertNotNull($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the import new option and the import new group option with exception.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Importer\XmlImporter::import()
|
||||
*/
|
||||
public function it_should_matter_with_import_option_create_new_and_group_import_option_create_new_with_exception()
|
||||
{
|
||||
$filename = PATH_TRUNK . "/tests/resources/p1normal-1.pmx";
|
||||
$importer = new XmlImporter();
|
||||
$importer->setData("usr_uid", $this->user->USR_UID);
|
||||
$importer->setSourceFile($filename);
|
||||
|
||||
$this->expectException(Exception::class);
|
||||
|
||||
$result = $importer->import(XmlImporter::IMPORT_OPTION_CREATE_NEW, XmlImporter::GROUP_IMPORT_OPTION_CREATE_NEW, false);
|
||||
$this->assertNotNull($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the import overwrite option and the import new group option with exist groups.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Importer\XmlImporter::import()
|
||||
*/
|
||||
public function it_should_matter_with_import_option_overwrite_and_group_import_option_create_new_with_groups()
|
||||
{
|
||||
factory(\ProcessMaker\Model\Groupwf::class)->create([
|
||||
'GRP_TITLE' => 'group1'
|
||||
]);
|
||||
factory(\ProcessMaker\Model\Groupwf::class)->create([
|
||||
'GRP_TITLE' => 'group2'
|
||||
]);
|
||||
$filename = PATH_TRUNK . "/tests/resources/p1normal-1.pmx";
|
||||
$importer = new XmlImporter();
|
||||
$importer->setData("usr_uid", $this->user->USR_UID);
|
||||
$importer->setSourceFile($filename);
|
||||
|
||||
$this->expectException(Exception::class);
|
||||
$result = $importer->import(XmlImporter::IMPORT_OPTION_OVERWRITE, XmlImporter::GROUP_IMPORT_OPTION_CREATE_NEW, false);
|
||||
$this->assertNotNull($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the import new option and the import new group option with generated uid from js such as null.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Importer\XmlImporter::import()
|
||||
*/
|
||||
public function it_should_matter_with_import_option_create_new_and_group_import_option_create_new_try_exception()
|
||||
{
|
||||
$filename = PATH_TRUNK . "/tests/resources/p1normalWithException-1.pmx";
|
||||
$importer = new XmlImporter();
|
||||
$importer->setData("usr_uid", $this->user->USR_UID);
|
||||
$importer->setSourceFile($filename);
|
||||
|
||||
$this->expectException(Exception::class);
|
||||
$result = $importer->import(XmlImporter::IMPORT_OPTION_CREATE_NEW, XmlImporter::GROUP_IMPORT_OPTION_CREATE_NEW);
|
||||
$this->assertNotNull($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the import new option and the import new group option with repeated title.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Importer\XmlImporter::import()
|
||||
* @covers \ProcessMaker\Importer\XmlImporter::updateTheProcessOwner()
|
||||
*/
|
||||
public function it_should_matter_with_import_option_create_new_and_group_import_option_create_new_try_rename_title()
|
||||
{
|
||||
factory(\ProcessMaker\Model\Process::class)->create([
|
||||
'PRO_TITLE' => 'p1normalWithoutTitle'
|
||||
]);
|
||||
|
||||
$filename = PATH_TRUNK . "/tests/resources/p1normalWithoutTitle-1.pmx";
|
||||
$importer = new XmlImporter();
|
||||
$importer->setData("usr_uid", $this->user->USR_UID);
|
||||
$importer->setSourceFile($filename);
|
||||
|
||||
$result = $importer->import(XmlImporter::IMPORT_OPTION_CREATE_NEW, XmlImporter::GROUP_IMPORT_OPTION_CREATE_NEW, false);
|
||||
$this->assertNotNull($result);
|
||||
|
||||
factory(\ProcessMaker\Model\Process::class)->create([
|
||||
'PRO_TITLE' => 'p1normalWithoutTitle2'
|
||||
]);
|
||||
|
||||
$filename = PATH_TRUNK . "/tests/resources/p1normalWithoutTitle2-1.pmx";
|
||||
$importer = new XmlImporter();
|
||||
$importer->setData("usr_uid", $this->user->USR_UID);
|
||||
$importer->setSourceFile($filename);
|
||||
|
||||
$result = $importer->import(XmlImporter::IMPORT_OPTION_OVERWRITE, XmlImporter::GROUP_IMPORT_OPTION_CREATE_NEW, false);
|
||||
$this->assertNotNull($result);
|
||||
}
|
||||
}
|
||||
@@ -81,16 +81,16 @@ class DelegationTest extends TestCase
|
||||
|
||||
$process = factory(Process::class)->create();
|
||||
factory(Delegation::class, 51)->states('foreign_keys')->create([
|
||||
'PRO_ID' => $process->id
|
||||
'PRO_ID' => $process->PRO_ID
|
||||
]);
|
||||
// Get first page, which is 25
|
||||
$results = Delegation::search(null, 0, 25, null, $process->id);
|
||||
$results = Delegation::search(null, 0, 25, null, $process->PRO_ID);
|
||||
$this->assertCount(25, $results['data']);
|
||||
// Get second page, which is 25 results
|
||||
$results = Delegation::search(null, 25, 25, null, $process->id);
|
||||
$results = Delegation::search(null, 25, 25, null, $process->PRO_ID);
|
||||
$this->assertCount(25, $results['data']);
|
||||
// Get third page, which is only 1 result
|
||||
$results = Delegation::search(null, 50, 25, null, $process->id);
|
||||
$results = Delegation::search(null, 50, 25, null, $process->PRO_ID);
|
||||
$this->assertCount(1, $results['data']);
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ class DelegationTest extends TestCase
|
||||
{
|
||||
factory(Delegation::class, 3)->states('foreign_keys')->create([
|
||||
'PRO_ID' => function () {
|
||||
return factory(Process::class)->create()->id;
|
||||
return factory(Process::class)->create()->PRO_ID;
|
||||
}
|
||||
]);
|
||||
// Get first page, all process ordering ASC
|
||||
@@ -541,7 +541,7 @@ class DelegationTest extends TestCase
|
||||
]);
|
||||
// Delegations to found
|
||||
factory(Delegation::class, 51)->states('foreign_keys')->create([
|
||||
'PRO_ID' => $processSearch->id
|
||||
'PRO_ID' => $processSearch->PRO_ID
|
||||
]);
|
||||
// Get first page, which is 25
|
||||
$results = Delegation::search(null, 0, 25, null, null, null, null, null, $category->CATEGORY_UID);
|
||||
@@ -639,7 +639,7 @@ class DelegationTest extends TestCase
|
||||
$application = factory(Application::class)->create();
|
||||
// Create the threads for a parallel process
|
||||
factory(Delegation::class, 5)->states('foreign_keys')->create([
|
||||
'PRO_ID' => $process->id,
|
||||
'PRO_ID' => $process->PRO_ID,
|
||||
'TAS_ID' => $parallelTask->TAS_ID,
|
||||
'APP_NUMBER' => $application->APP_NUMBER,
|
||||
'DEL_THREAD_STATUS' => 'CLOSED'
|
||||
@@ -666,7 +666,7 @@ class DelegationTest extends TestCase
|
||||
$application = factory(Application::class)->create();
|
||||
// Create the threads for a parallel process
|
||||
factory(Delegation::class, 5)->states('foreign_keys')->create([
|
||||
'PRO_ID' => $process->id,
|
||||
'PRO_ID' => $process->PRO_ID,
|
||||
'TAS_ID' => $parallelTask->TAS_ID,
|
||||
'APP_NUMBER' => $application->APP_NUMBER,
|
||||
'DEL_THREAD_STATUS' => 'OPEN'
|
||||
@@ -693,7 +693,7 @@ class DelegationTest extends TestCase
|
||||
$application = factory(Application::class)->create(['APP_STATUS_ID' => 2]);
|
||||
// Create the threads for a parallel process closed
|
||||
factory(Delegation::class)->states('closed')->create([
|
||||
'PRO_ID' => $process->id,
|
||||
'PRO_ID' => $process->PRO_ID,
|
||||
'PRO_UID' => $process->PRO_UID,
|
||||
'TAS_ID' => $parallelTask->TAS_ID,
|
||||
'APP_NUMBER' => $application->APP_NUMBER,
|
||||
@@ -701,7 +701,7 @@ class DelegationTest extends TestCase
|
||||
]);
|
||||
// Create the threads for a parallel process closed
|
||||
factory(Delegation::class)->states('open')->create([
|
||||
'PRO_ID' => $process->id,
|
||||
'PRO_ID' => $process->PRO_ID,
|
||||
'PRO_UID' => $process->PRO_UID,
|
||||
'TAS_ID' => $parallelTask->TAS_ID,
|
||||
'APP_NUMBER' => $application->APP_NUMBER,
|
||||
@@ -745,27 +745,27 @@ class DelegationTest extends TestCase
|
||||
//Create a process with category
|
||||
$processWithCat = factory(Process::class)->create(['PRO_CATEGORY' => $category[0]->CATEGORY_UID]);
|
||||
factory(Delegation::class)->states('foreign_keys')->create([
|
||||
'PRO_ID' => $processWithCat->id
|
||||
'PRO_ID' => $processWithCat->PRO_ID
|
||||
]);
|
||||
// Create a process without category
|
||||
$processWithoutCat = factory(Process::class)->create(['PRO_CATEGORY' => '']);
|
||||
factory(Delegation::class, 5)->states('foreign_keys')->create([
|
||||
'PRO_ID' => $processWithoutCat->id
|
||||
'PRO_ID' => $processWithoutCat->PRO_ID
|
||||
]);
|
||||
// Search the cases when the process has related to the category and search by another category
|
||||
$results = Delegation::search(null, 0, 25, null, $processWithCat->id, null, null, null,
|
||||
$results = Delegation::search(null, 0, 25, null, $processWithCat->PRO_ID, null, null, null,
|
||||
$category[1]->CATEGORY_UID);
|
||||
$this->assertCount(0, $results['data']);
|
||||
// Search the cases when the process has related to the category and search by this relation
|
||||
$results = Delegation::search(null, 0, 25, null, $processWithCat->id, null, null, null,
|
||||
$results = Delegation::search(null, 0, 25, null, $processWithCat->PRO_ID, null, null, null,
|
||||
$category[0]->CATEGORY_UID);
|
||||
$this->assertCount(1, $results['data']);
|
||||
// Search the cases when the process does not have relation with category and search by a category
|
||||
$results = Delegation::search(null, 0, 25, null, $processWithoutCat->id, null, null, null,
|
||||
$results = Delegation::search(null, 0, 25, null, $processWithoutCat->PRO_ID, null, null, null,
|
||||
$category[1]->CATEGORY_UID);
|
||||
$this->assertCount(0, $results['data']);
|
||||
// Search the cases when the process does not have relation with category empty
|
||||
$results = Delegation::search(null, 0, 25, null, $processWithoutCat->id, null, null, null,
|
||||
$results = Delegation::search(null, 0, 25, null, $processWithoutCat->PRO_ID, null, null, null,
|
||||
'');
|
||||
$this->assertCount(5, $results['data']);
|
||||
}
|
||||
@@ -786,7 +786,7 @@ class DelegationTest extends TestCase
|
||||
]);
|
||||
//Create a delegation related to this process
|
||||
factory(Delegation::class)->create([
|
||||
'PRO_ID' => $processWithCat->id
|
||||
'PRO_ID' => $processWithCat->PRO_ID
|
||||
]);
|
||||
//Define a process related with he previous category
|
||||
$process = factory(Process::class)->create([
|
||||
@@ -794,7 +794,7 @@ class DelegationTest extends TestCase
|
||||
]);
|
||||
//Create a delegation related to other process
|
||||
factory(Delegation::class, 5)->create([
|
||||
'PRO_ID' => $process->id,
|
||||
'PRO_ID' => $process->PRO_ID,
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
@@ -5,53 +5,92 @@ namespace Tests\unit\workflow\engine\src\ProcessMaker\Model;
|
||||
use G;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use ProcessMaker\Model\Process;
|
||||
use ProcessMaker\Model\ProcessCategory;
|
||||
use ProcessMaker\Model\Task;
|
||||
use ProcessMaker\Model\User;
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
* @coversDefaultClass ProcessMaker\BusinessModel\Model\Process
|
||||
*/
|
||||
|
||||
class ProcessTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
||||
/**
|
||||
* Test belongs to PRO_ID
|
||||
*
|
||||
* @covers \ProcessMaker\Model\Process::tasks()
|
||||
* @test
|
||||
*/
|
||||
public function it_has_tasks()
|
||||
{
|
||||
$process = factory(Process::class)->create([
|
||||
'PRO_ID' => function () {
|
||||
return factory(Task::class)->create()->PRO_ID;
|
||||
}
|
||||
]);
|
||||
$this->assertInstanceOf(Task::class, $process->tasks);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test belongs to PRO_CREATE_USER
|
||||
*
|
||||
* @covers \ProcessMaker\Model\Process::creator()
|
||||
* @test
|
||||
*/
|
||||
public function it_has_a_creator()
|
||||
{
|
||||
$process = factory(Process::class)->create([
|
||||
'PRO_CREATE_USER' => function () {
|
||||
return factory(User::class)->create()->USR_UID;
|
||||
}
|
||||
]);
|
||||
$this->assertInstanceOf(User::class, $process->creator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test belongs to PRO_CREATE_USER
|
||||
*
|
||||
* @covers \ProcessMaker\Model\Process::category()
|
||||
* @test
|
||||
*/
|
||||
public function it_has_an_category()
|
||||
{
|
||||
$process = factory(Process::class)->create([
|
||||
'PRO_CATEGORY' => function () {
|
||||
return factory(ProcessCategory::class)->create()->CATEGORY_UID;
|
||||
}
|
||||
]);
|
||||
$this->assertInstanceOf(ProcessCategory::class, $process->category);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test it returns all the processes for an specific user
|
||||
* @covers \ProcessMaker\Model\Process::getProcessList
|
||||
*
|
||||
* @covers \ProcessMaker\Model\Process::getProcessList()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_return_all_the_processes_for_an_specific_user()
|
||||
{
|
||||
//Create user
|
||||
$user1 = factory(User::class)->create();
|
||||
$user2 = factory(User::class)->create();
|
||||
//Create process
|
||||
$process1 = factory(Process::class)->create(
|
||||
['PRO_CREATE_USER' => $user1['USR_UID']]
|
||||
);
|
||||
$process2 = factory(Process::class)->create(
|
||||
['PRO_CREATE_USER' => $user2['USR_UID']]
|
||||
);
|
||||
|
||||
$process = factory(Process::class, 2)->states('foreign_keys')->create([]);
|
||||
//Create a Process object
|
||||
$process = new Process();
|
||||
$pro = new Process();
|
||||
//Call the getProcessList() method
|
||||
$res = $process->getProcessList('', $user2['USR_UID']);
|
||||
|
||||
$res = $pro->getProcessList('', $process[0]->PRO_CREATE_USER);
|
||||
//Assert the result is not empty
|
||||
$this->assertNotEmpty($res);
|
||||
//Assert there's one result
|
||||
$this->assertCount(1, $res);
|
||||
//Assert that the process returned is the one looked for
|
||||
$this->assertEquals($process2['PRO_UID'], $res[0]['PRO_UID']);
|
||||
//Assert the process that was not searched is not in the result
|
||||
$this->assertNotEquals($process1['PRO_UID'], $res[0]['PRO_UID']);
|
||||
$this->assertEquals($process[0]->PRO_UID, $res[0]['PRO_UID']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that it returns the processes in an specific category
|
||||
* @covers \ProcessMaker\Model\Process::getProcessList
|
||||
*
|
||||
* @covers \ProcessMaker\Model\Process::getProcessList()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_return_the_processes_in_an_specific_category()
|
||||
@@ -62,23 +101,19 @@ class ProcessTest extends TestCase
|
||||
//Create user
|
||||
$user = factory(User::class)->create();
|
||||
//Create process
|
||||
$process1 = factory(Process::class)->create(
|
||||
[
|
||||
$process1 = factory(Process::class)->create([
|
||||
'PRO_CREATE_USER' => $user['USR_UID'],
|
||||
'PRO_CATEGORY' => $catUid1
|
||||
]
|
||||
);
|
||||
$process2 = factory(Process::class)->create(
|
||||
[
|
||||
]);
|
||||
$process2 = factory(Process::class)->create([
|
||||
'PRO_CREATE_USER' => $user['USR_UID'],
|
||||
'PRO_CATEGORY' => $catUid2
|
||||
]
|
||||
);
|
||||
]);
|
||||
|
||||
//Create a Process object
|
||||
$process = new Process();
|
||||
$pro = new Process();
|
||||
//Call the getProcessList() method
|
||||
$res = $process->getProcessList($process1['PRO_CATEGORY'], $user['USR_UID']);
|
||||
$res = $pro->getProcessList($process1['PRO_CATEGORY'], $user['USR_UID']);
|
||||
|
||||
//Assert the result is not empty
|
||||
$this->assertNotEmpty($res);
|
||||
@@ -92,7 +127,8 @@ class ProcessTest extends TestCase
|
||||
|
||||
/**
|
||||
* Tests that it returns an empty array if no processes where found
|
||||
* @covers \ProcessMaker\Model\Process::getProcessList
|
||||
*
|
||||
* @covers \ProcessMaker\Model\Process::getProcessList()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_return_empty_if_no_processes_where_found()
|
||||
@@ -110,7 +146,8 @@ class ProcessTest extends TestCase
|
||||
|
||||
/**
|
||||
* Test it returns all the processes in status active
|
||||
* @covers \ProcessMaker\Model\Process::getProcessList
|
||||
*
|
||||
* @covers \ProcessMaker\Model\Process::getProcessList()
|
||||
* @test
|
||||
*/
|
||||
public function it_should_return_all_the_processes_in_status_active()
|
||||
@@ -118,24 +155,18 @@ class ProcessTest extends TestCase
|
||||
//Create user
|
||||
$user = factory(User::class)->create();
|
||||
//Create process
|
||||
$process1 = factory(Process::class)->create(
|
||||
[
|
||||
$process1 = factory(Process::class)->create([
|
||||
'PRO_CREATE_USER' => $user['USR_UID'],
|
||||
'PRO_STATUS' => 'ACTIVE'
|
||||
]
|
||||
);
|
||||
$process2 = factory(Process::class)->create(
|
||||
[
|
||||
]);
|
||||
$process2 = factory(Process::class)->create([
|
||||
'PRO_CREATE_USER' => $user['USR_UID'],
|
||||
'PRO_STATUS' => 'INACTIVE'
|
||||
]
|
||||
);
|
||||
$process3 = factory(Process::class)->create(
|
||||
[
|
||||
]);
|
||||
$process3 = factory(Process::class)->create([
|
||||
'PRO_CREATE_USER' => $user['USR_UID'],
|
||||
'PRO_STATUS' => 'DISABLED'
|
||||
]
|
||||
);
|
||||
]);
|
||||
|
||||
//Create a Process object
|
||||
$process = new Process();
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\unit\workflow\engine\src\ProcessMaker\Project\Adapter;
|
||||
|
||||
use Exception;
|
||||
use Faker\Factory;
|
||||
use G;
|
||||
use ProcessMaker\Model\BpmnProject;
|
||||
use ProcessMaker\Model\Process;
|
||||
use ProcessMaker\Model\User;
|
||||
use ProcessMaker\Project\Adapter\BpmnWorkflow;
|
||||
use ProcessMaker\Importer\XmlImporter;
|
||||
use Tests\TestCase;
|
||||
|
||||
class BpmnWorkflowTest extends TestCase
|
||||
{
|
||||
private $user;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->user = factory(User::class)->create();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creation of a bpmn project.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Project\Adapter\BpmnWorkflow::create()
|
||||
*/
|
||||
public function it_should_create_bpmn_project()
|
||||
{
|
||||
$faker = Factory::create();
|
||||
$data = [
|
||||
'PRJ_UID' => G::generateUniqueID(),
|
||||
'PRJ_AUTHOR' => G::generateUniqueID(),
|
||||
'PRJ_NAME' => $faker->title,
|
||||
'PRJ_DESCRIPTION' => $faker->text,
|
||||
'PRJ_TYPE' => $faker->name,
|
||||
'PRJ_CATEGORY' => $faker->word,
|
||||
'PRO_ID' => $faker->randomDigit,
|
||||
'PRO_STATUS' => 'ACTIVE'
|
||||
];
|
||||
$bpmnWorkflow = new BpmnWorkflow();
|
||||
$bpmnWorkflow->create($data);
|
||||
|
||||
$bpmnProject = BpmnProject::where('PRJ_UID', '=', $data['PRJ_UID'])
|
||||
->get();
|
||||
|
||||
$this->assertNotNull($bpmnProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* We get an exception when the data is incorrect.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Project\Adapter\BpmnWorkflow::create()
|
||||
*/
|
||||
public function it_should_create_bpmn_project_with_incorrect_data()
|
||||
{
|
||||
$faker = Factory::create();
|
||||
$data = [
|
||||
'PRJ_UID' => []
|
||||
];
|
||||
$bpmnWorkflow = new BpmnWorkflow();
|
||||
|
||||
$this->expectException(Exception::class);
|
||||
$bpmnWorkflow->create($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* An exception is obtained if we try to enter an existing title.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Project\Adapter\BpmnWorkflow::create()
|
||||
*/
|
||||
public function it_should_create_bpmn_project_with_duplicate_title()
|
||||
{
|
||||
$faker = Factory::create();
|
||||
$title = $faker->title;
|
||||
factory(\ProcessMaker\Model\Process::class)->create([
|
||||
'PRO_TITLE' => $title
|
||||
]);
|
||||
|
||||
$data = [
|
||||
'PRJ_UID' => G::generateUniqueID(),
|
||||
'PRJ_AUTHOR' => G::generateUniqueID(),
|
||||
'PRJ_NAME' => $title,
|
||||
'PRJ_DESCRIPTION' => $faker->text,
|
||||
'PRJ_TYPE' => $faker->name,
|
||||
'PRJ_CATEGORY' => $faker->word,
|
||||
'PRO_ID' => $faker->randomDigit,
|
||||
'PRO_STATUS' => 'ACTIVE'
|
||||
];
|
||||
$bpmnWorkflow = new BpmnWorkflow();
|
||||
|
||||
$this->expectException(Exception::class);
|
||||
$bpmnWorkflow->create($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a project from a data structure.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Project\Adapter\BpmnWorkflow::createFromStruct()
|
||||
*/
|
||||
public function it_should_create_from_structure()
|
||||
{
|
||||
$faker = Factory::create();
|
||||
|
||||
$projectDataFilename = PATH_TRUNK . "/tests/resources/projectData.json";
|
||||
$json = file_get_contents($projectDataFilename);
|
||||
$projectData = json_decode($json, JSON_OBJECT_AS_ARRAY);
|
||||
$projectData['prj_uid'] = G::generateUniqueID();
|
||||
$projectData["process"]["pro_id"] = $faker->randomDigit;
|
||||
|
||||
$bpmnWorkflow = new BpmnWorkflow();
|
||||
$bpmnWorkflow->createFromStruct($projectData, true, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an exception if there is an invalid name in the data structure.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Project\Adapter\BpmnWorkflow::createFromStruct()
|
||||
*/
|
||||
public function it_should_create_from_structure_invalid_name()
|
||||
{
|
||||
$faker = Factory::create();
|
||||
|
||||
$projectDataFilename = PATH_TRUNK . "/tests/resources/projectData.json";
|
||||
$json = file_get_contents($projectDataFilename);
|
||||
$projectData = json_decode($json, JSON_OBJECT_AS_ARRAY);
|
||||
$projectData['prj_uid'] = G::generateUniqueID();
|
||||
$projectData["process"]["pro_id"] = $faker->randomDigit;
|
||||
|
||||
$bpmnWorkflow = new BpmnWorkflow();
|
||||
|
||||
$projectData['prj_name'] = '';
|
||||
|
||||
$this->expectException(Exception::class);
|
||||
$bpmnWorkflow->createFromStruct($projectData, true, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an exception if there is a duplicate name.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Project\Adapter\BpmnWorkflow::createFromStruct()
|
||||
*/
|
||||
public function it_should_create_from_structure_with_duplicate_name()
|
||||
{
|
||||
$faker = Factory::create();
|
||||
|
||||
$projectDataFilename = PATH_TRUNK . "/tests/resources/projectData.json";
|
||||
$json = file_get_contents($projectDataFilename);
|
||||
$projectData = json_decode($json, JSON_OBJECT_AS_ARRAY);
|
||||
$projectData['prj_uid'] = G::generateUniqueID();
|
||||
$projectData["process"]["pro_id"] = $faker->randomDigit;
|
||||
|
||||
$bpmnWorkflow = new BpmnWorkflow();
|
||||
|
||||
factory(\ProcessMaker\Model\BpmnProject::class)->create([
|
||||
'PRJ_NAME' => $projectData['prj_name']
|
||||
]);
|
||||
|
||||
$this->expectException(Exception::class);
|
||||
$bpmnWorkflow->createFromStruct($projectData, true, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* We get an exception if the type field does not exist in the activity.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Project\Adapter\BpmnWorkflow::createFromStruct()
|
||||
*/
|
||||
public function it_should_create_from_structure_invalid_activity_type()
|
||||
{
|
||||
$faker = Factory::create();
|
||||
|
||||
$projectDataFilename = PATH_TRUNK . "/tests/resources/projectData.json";
|
||||
$json = file_get_contents($projectDataFilename);
|
||||
$projectData = json_decode($json, JSON_OBJECT_AS_ARRAY);
|
||||
$projectData['prj_uid'] = G::generateUniqueID();
|
||||
$projectData["process"]["pro_id"] = $faker->randomDigit;
|
||||
|
||||
$bpmnWorkflow = new BpmnWorkflow();
|
||||
|
||||
$projectData['prj_name'] = $faker->name;
|
||||
unset($projectData['diagrams']['0']['activities']['0']['act_type']);
|
||||
|
||||
$this->expectException(Exception::class);
|
||||
$bpmnWorkflow->createFromStruct($projectData, true, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* We get an exception if the type field does not exist in the event.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Project\Adapter\BpmnWorkflow::createFromStruct()
|
||||
*/
|
||||
public function it_should_create_from_structure_invalid_event_type()
|
||||
{
|
||||
$faker = Factory::create();
|
||||
|
||||
$projectDataFilename = PATH_TRUNK . "/tests/resources/projectData.json";
|
||||
$json = file_get_contents($projectDataFilename);
|
||||
$projectData = json_decode($json, JSON_OBJECT_AS_ARRAY);
|
||||
$projectData['prj_uid'] = G::generateUniqueID();
|
||||
$projectData["process"]["pro_id"] = $faker->randomDigit;
|
||||
|
||||
$bpmnWorkflow = new BpmnWorkflow();
|
||||
|
||||
$projectData['prj_name'] = $faker->name;
|
||||
unset($projectData['diagrams']['0']['events']['0']['evn_type']);
|
||||
|
||||
$this->expectException(Exception::class);
|
||||
$bpmnWorkflow->createFromStruct($projectData, true, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* We get an exception if the marker field does not exist in the event.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Project\Adapter\BpmnWorkflow::createFromStruct()
|
||||
*/
|
||||
public function it_should_create_from_structure_invalid_event_marker()
|
||||
{
|
||||
$faker = Factory::create();
|
||||
|
||||
$projectDataFilename = PATH_TRUNK . "/tests/resources/projectData.json";
|
||||
$json = file_get_contents($projectDataFilename);
|
||||
$projectData = json_decode($json, JSON_OBJECT_AS_ARRAY);
|
||||
$projectData['prj_uid'] = G::generateUniqueID();
|
||||
$projectData["process"]["pro_id"] = $faker->randomDigit;
|
||||
|
||||
$bpmnWorkflow = new BpmnWorkflow();
|
||||
|
||||
$projectData['prj_name'] = $faker->name;
|
||||
unset($projectData['diagrams']['0']['events']['0']['evn_marker']);
|
||||
|
||||
$this->expectException(Exception::class);
|
||||
$bpmnWorkflow->createFromStruct($projectData, true, null);
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,8 @@ class LightTest extends TestCase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->markTestIncomplete();//@todo: we need to correct this before the epic PMC-857 because this test use Unassigned cases
|
||||
|
||||
parent::setUp();
|
||||
$this->workspace = env("DB_DATABASE", "test");
|
||||
$this->clientId = config("oauthClients.pm.clientId");
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\unit\workflow\engine\src\ProcessMaker\Services\Api;
|
||||
|
||||
use Faker\Factory;
|
||||
use ProcessMaker\Model\Process;
|
||||
use ProcessMaker\Model\User;
|
||||
use ProcessMaker\Importer\XmlImporter;
|
||||
use ProcessMaker\Services\Api\Project;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ProjectTest extends TestCase
|
||||
{
|
||||
private $user;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
/**
|
||||
* To perform the test this requires a valid installation and its respective license.
|
||||
*
|
||||
* In the file "workflow/engine/classes/WorkspaceTools.php",
|
||||
* these lines need the db.php file.
|
||||
*
|
||||
* public function __construct($workspaceName)
|
||||
* {
|
||||
* $this->name = $workspaceName;
|
||||
* $this->path = PATH_DB . $this->name;
|
||||
* $this->dbPath = $this->path . '/db.php';
|
||||
* if ($this->workspaceExists()) {
|
||||
* $this->getDBInfo();
|
||||
* }
|
||||
* $this->setListContentMigrateTable();
|
||||
* }
|
||||
*/
|
||||
$this->markTestIncomplete("To perform the test this requires a valid installation and its respective license.");
|
||||
parent::setUp();
|
||||
$this->user = factory(User::class)->create();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the process owner with invalid value, the import test covers most of the code.
|
||||
* @test
|
||||
* @covers \ProcessMaker\Services\Api\Project::doSaveAs()
|
||||
* @covers \ProcessMaker\Importer\XmlImporter::saveAs()
|
||||
*/
|
||||
public function it_should_set_the_process_owner_with_invalid_value()
|
||||
{
|
||||
$filename = PATH_TRUNK . "/tests/resources/p1normal-1.pmx";
|
||||
$importer = new XmlImporter();
|
||||
$importer->setData("usr_uid", $this->user->USR_UID);
|
||||
$importer->setSourceFile($filename);
|
||||
$proUid = $importer->import(XmlImporter::IMPORT_OPTION_CREATE_NEW, XmlImporter::GROUP_IMPORT_OPTION_CREATE_NEW, false);
|
||||
|
||||
$faker = $faker = Factory::create();
|
||||
$project = new Project();
|
||||
$project->setUserId($this->user->USR_ID);
|
||||
$result = $project->doSaveAs($proUid, $faker->title);
|
||||
|
||||
$this->assertNotEmpty($result);
|
||||
}
|
||||
}
|
||||
7
thirdparty/pear/Log/file.php
vendored
7
thirdparty/pear/Log/file.php
vendored
@@ -319,7 +319,12 @@ class Log_file extends Log
|
||||
$request .= ($request!='' ? "\t" : '') . $k . '='.$v;
|
||||
}
|
||||
}
|
||||
foreach( $_GET as $k => $v ) $request .= ($request!='' ? "\t" : '') . $k . '='.$v;
|
||||
foreach ($_GET as $k => $v) {
|
||||
if (is_array($v)) {
|
||||
$v = json_encode($v);
|
||||
}
|
||||
$request .= ($request != '' ? "\t" : '') . $k . '=' . $v;
|
||||
}
|
||||
|
||||
//exact time with microseconds
|
||||
$t = explode(' ',microtime(false));
|
||||
|
||||
@@ -833,7 +833,7 @@ class ActionsByEmailCoreClass extends PMPlugin
|
||||
URL_KEY, true) . '&DEL_INDEX=' . G::encrypt($this->getIndex(), URL_KEY,
|
||||
true) . '&DYN_UID=' . G::encrypt($this->getItemAbeProperties('DYN_UID'), URL_KEY,
|
||||
true) . '&ABER=' . G::encrypt($abeRequest['ABE_REQ_UID'], URL_KEY,
|
||||
true) . '" target="_blank">Please complete this form</a>';
|
||||
true) . '" target="_blank">' . G::LoadTranslation('ID_ACTIONS_BY_EMAIL_LINK_TO_FILL_A_FORM') . '</a>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
@@ -1334,8 +1334,8 @@ class Derivation
|
||||
$aOldFields = $this->case->loadCase( $aNewCase['APPLICATION'] );
|
||||
|
||||
foreach ($aFields as $sOriginField => $sTargetField) {
|
||||
$sOriginField = trim($sOriginField, " @#%?$=");
|
||||
$sTargetField = trim($sTargetField, " @#%?$=");
|
||||
$sOriginField = trim($sOriginField, " @#%?$=&");
|
||||
$sTargetField = trim($sTargetField, " @#%?$=&");
|
||||
|
||||
$aNewFields[$sTargetField] = isset( $appFields['APP_DATA'][$sOriginField] ) ? $appFields['APP_DATA'][$sOriginField] : '';
|
||||
|
||||
@@ -1653,12 +1653,14 @@ class Derivation
|
||||
$originField = str_replace('?', '', $originField);
|
||||
$originField = str_replace('$', '', $originField);
|
||||
$originField = str_replace('=', '', $originField);
|
||||
$originField = str_replace('&', '', $originField);
|
||||
$targetField = str_replace('@', '', $targetField);
|
||||
$targetField = str_replace('#', '', $targetField);
|
||||
$targetField = str_replace('%', '', $targetField);
|
||||
$targetField = str_replace('?', '', $targetField);
|
||||
$targetField = str_replace('$', '', $targetField);
|
||||
$targetField = str_replace('=', '', $targetField);
|
||||
$targetField = str_replace('&', '', $targetField);
|
||||
$newFields[$targetField] = isset($childCaseData[$originField]) ? $childCaseData[$originField] : '';
|
||||
|
||||
if (array_key_exists($originField . '_label', $childCaseData)) {
|
||||
|
||||
@@ -27,7 +27,7 @@ class PmDynaform
|
||||
public $fields = null;
|
||||
public $isRTL = false;
|
||||
public $lang = SYS_LANG;
|
||||
public $langs = null;
|
||||
public $translations = null;
|
||||
public $onPropertyRead = "onPropertyReadFormInstance";
|
||||
public $pathRTLCss = '';
|
||||
public $record = null;
|
||||
@@ -109,6 +109,46 @@ class PmDynaform
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the translation defined in the dynaform
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
public function getTranslations()
|
||||
{
|
||||
return $this->translations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the translations defined in the dynaform
|
||||
*
|
||||
* @param string $dynUid
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setTranslations($dynUid)
|
||||
{
|
||||
$dynaForm = ModelDynaform::getByDynUid($dynUid);
|
||||
$this->translations = empty($dynaForm->DYN_LABEL) ? null : G::json_decode($dynaForm->DYN_LABEL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the labels from a specific language defined in the dynaform, if does not exist will return null
|
||||
*
|
||||
* @param string $language
|
||||
*
|
||||
* @return object|null
|
||||
*/
|
||||
public function getLabelsPo($language)
|
||||
{
|
||||
$labelsPo = null;
|
||||
if (!is_null($this->translations) && !empty($this->translations->{$language}->{'Labels'})) {
|
||||
$labelsPo = $this->translations->{$language}->{'Labels'};
|
||||
}
|
||||
|
||||
return $labelsPo;
|
||||
}
|
||||
|
||||
public function getDynaformTitle($idDynaform)
|
||||
{
|
||||
$d = new Dynaform();
|
||||
@@ -119,11 +159,13 @@ class PmDynaform
|
||||
|
||||
/**
|
||||
* Get a dynaform.
|
||||
*
|
||||
* @return array|null
|
||||
* @see ConsolidatedCases->processConsolidated()
|
||||
*
|
||||
* @see workflow/engine/methods/cases/caseConsolidated.php
|
||||
* @see ProcessMaker\BusinessModel\Cases->getCaseVariables()
|
||||
* @see PmDynaform->__construct()
|
||||
* @see ConsolidatedCases::processConsolidated()
|
||||
* @see PmDynaform::__construct()
|
||||
* @see \ProcessMaker\BusinessModel\Cases::getCaseVariables()
|
||||
*/
|
||||
public function getDynaform()
|
||||
{
|
||||
@@ -135,10 +177,10 @@ class PmDynaform
|
||||
}
|
||||
$dynaform = ModelDynaform::getByDynUid($this->fields["CURRENT_DYNAFORM"]);
|
||||
if (empty($dynaform)) {
|
||||
$this->langs = null;
|
||||
$this->translations = null;
|
||||
return null;
|
||||
}
|
||||
$this->langs = empty($dynaform->DYN_LABEL) ? null : G::json_decode($dynaform->DYN_LABEL);
|
||||
$this->translations = empty($dynaform->DYN_LABEL) ? null : G::json_decode($dynaform->DYN_LABEL);
|
||||
$this->record = (array) $dynaform;
|
||||
return $this->record;
|
||||
}
|
||||
@@ -675,14 +717,26 @@ class PmDynaform
|
||||
$this->setDataSchema($json, $this->fields["APP_DATA"][$json->name]);
|
||||
}
|
||||
}
|
||||
//languages
|
||||
// Set the language defined in the json
|
||||
if ($this->lang === null && $key === "language" && isset($json->language)) {
|
||||
$this->lang = $json->language;
|
||||
}
|
||||
if ($this->langs !== null) {
|
||||
if (($key === "label" || $key === "title" || $key === "hint" || $key === "placeholder" || $key === "validateMessage" || $key === "alternateText" || $key === "comment" || $key === "alt") && isset($this->langs->{$this->lang})) {
|
||||
$langs = $this->langs->{$this->lang}->Labels;
|
||||
foreach ($langs as $langsValue) {
|
||||
|
||||
// Get the translations related to the language
|
||||
if (!is_null($this->translations)) {
|
||||
$labelsPo = $this->getLabelsPo($this->lang);
|
||||
$translatableLabels = [
|
||||
"label",
|
||||
"title",
|
||||
"hint",
|
||||
"placeholder",
|
||||
"validateMessage",
|
||||
"alternateText",
|
||||
"comment",
|
||||
"alt"
|
||||
];
|
||||
if ((in_array($key, $translatableLabels)) && !is_null($labelsPo)) {
|
||||
foreach ($labelsPo as $langsValue) {
|
||||
if (is_object($json) && $json->{$key} === $langsValue->msgid) {
|
||||
$json->{$key} = $langsValue->msgstr;
|
||||
}
|
||||
@@ -931,7 +985,7 @@ class PmDynaform
|
||||
}
|
||||
break;
|
||||
case "subquery":
|
||||
if (strpos($sAlias, $sBaseExpr, 0) != 0) {
|
||||
if (strpos($sAlias, $sBaseExpr, 0) !== 0) {
|
||||
$select .= $sAlias;
|
||||
} else {
|
||||
$select .= $sBaseExpr . " AS " . $sAlias;
|
||||
@@ -969,7 +1023,7 @@ class PmDynaform
|
||||
. $dt[$key]["table"]
|
||||
. ($dt[$key]["table"] == $dt[$key]["alias"] ? "" : " " . $dt[$key]["alias"]) . " "
|
||||
. $dt[$key]["ref_type"] . " "
|
||||
. $dt[$key]["ref_clause"];
|
||||
. rtrim($dt[$key]["ref_clause"], " INNER");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1701,32 +1755,44 @@ class PmDynaform
|
||||
return false;
|
||||
}
|
||||
|
||||
public function searchField($dyn_uid, $field_id, $pro_uid = null)
|
||||
/**
|
||||
* This funtion will get the DYN_CONTENT from the dynaform then
|
||||
* Get the field and the properties defined, it's considerate the sub-forms
|
||||
*
|
||||
* @param string $dynUid
|
||||
* @param string $fieldId
|
||||
* @param string $proUid
|
||||
*
|
||||
* @return object
|
||||
*
|
||||
* @see \ProcessMaker\BusinessModel\Variable::executeSqlControl()
|
||||
*/
|
||||
public function searchField($dynUid, $fieldId, $proUid = null)
|
||||
{
|
||||
//get pro_uid if empty
|
||||
if (empty($pro_uid)) {
|
||||
if (empty($proUid)) {
|
||||
$a = new Criteria("workflow");
|
||||
$a->addSelectColumn(DynaformPeer::PRO_UID);
|
||||
$a->add(DynaformPeer::DYN_UID, $dyn_uid, Criteria::EQUAL);
|
||||
$a->add(DynaformPeer::DYN_UID, $dynUid, Criteria::EQUAL);
|
||||
$ds = DynaformPeer::doSelectRS($a);
|
||||
$ds->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$ds->next();
|
||||
$row = $ds->getRow();
|
||||
$pro_uid = $row["PRO_UID"];
|
||||
$proUid = $row["PRO_UID"];
|
||||
}
|
||||
//get dynaforms
|
||||
$a = new Criteria("workflow");
|
||||
$a->addSelectColumn(DynaformPeer::DYN_UID);
|
||||
$a->addSelectColumn(DynaformPeer::DYN_CONTENT);
|
||||
$a->add(DynaformPeer::PRO_UID, $pro_uid, Criteria::EQUAL);
|
||||
$a->add(DynaformPeer::PRO_UID, $proUid, Criteria::EQUAL);
|
||||
$ds = DynaformPeer::doSelectRS($a);
|
||||
$ds->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$json = new stdClass();
|
||||
$dynaforms = array();
|
||||
$dynaforms = [];
|
||||
while ($ds->next()) {
|
||||
$row = $ds->getRow();
|
||||
if ($row["DYN_UID"] === $dyn_uid) {
|
||||
if ($row["DYN_UID"] === $dynUid) {
|
||||
$json = G::json_decode($row["DYN_CONTENT"]);
|
||||
} else {
|
||||
$dynaforms[] = G::json_decode($row["DYN_CONTENT"]);
|
||||
@@ -1745,7 +1811,7 @@ class PmDynaform
|
||||
}
|
||||
}
|
||||
|
||||
return $this->jsonsf($json, $field_id);
|
||||
return $this->jsonsf($json, $fieldId);
|
||||
}
|
||||
|
||||
public function searchFieldByName($dyn_uid, $name)
|
||||
|
||||
@@ -1026,4 +1026,13 @@ class PmTable
|
||||
|
||||
return $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the folder "pmt-folder" and all the content inside
|
||||
*/
|
||||
public static function removePmtPropelFolder()
|
||||
{
|
||||
$pmtPropelFolder = PATH_DB . config('system.workspace') . PATH_SEP . 'pmt-propel';
|
||||
G::rm_dir($pmtPropelFolder);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4807,9 +4807,7 @@ class Processes
|
||||
$oData->abeConfiguration = $this->getActionsByEmail($sProUid);
|
||||
$oData->elementTask = $this->getElementTaskRelation($sProUid);
|
||||
$oData->groupwfs = $this->groupwfsMerge($oData->groupwfs, $oData->processUser, "USR_UID");
|
||||
$oData->process["PRO_TYPE_PROCESS"] = "PUBLIC";
|
||||
|
||||
//Return
|
||||
return $oData;
|
||||
}
|
||||
|
||||
|
||||
@@ -1837,6 +1837,12 @@ msgstr "Actions"
|
||||
msgid "actionsByEmail.html"
|
||||
msgstr "actionsByEmail.html"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_ACTIONS_BY_EMAIL_LINK_TO_FILL_A_FORM
|
||||
#: LABEL/ID_ACTIONS_BY_EMAIL_LINK_TO_FILL_A_FORM
|
||||
msgid "Please complete this form"
|
||||
msgstr "Please complete this form"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_ACTIONS_BY_EMAIL_LOG
|
||||
#: LABEL/ID_ACTIONS_BY_EMAIL_LOG
|
||||
|
||||
@@ -207,6 +207,9 @@ class pmTablesProxy extends HttpProxyController
|
||||
public function save ($httpData, $alterTable = true)
|
||||
{
|
||||
try {
|
||||
// Remove temporary Propel folder used by Report Tables and PM Tables (Bug PMC-388)
|
||||
PmTable::removePmtPropelFolder();
|
||||
|
||||
$reportTable = new \ProcessMaker\BusinessModel\ReportTable();
|
||||
|
||||
return $reportTable->saveStructureOfTable((array)($httpData), $alterTable);
|
||||
@@ -816,6 +819,9 @@ class pmTablesProxy extends HttpProxyController
|
||||
|
||||
fclose($f);
|
||||
|
||||
// Remove temporary Propel folder used by Report Tables and PM Tables (Bug PMC-388)
|
||||
PmTable::removePmtPropelFolder();
|
||||
|
||||
//First Validate the file
|
||||
$reportTable = new \ProcessMaker\BusinessModel\ReportTable();
|
||||
|
||||
|
||||
@@ -57104,6 +57104,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
( 'LABEL','ID_ACTION','en','Action','2014-01-15') ,
|
||||
( 'LABEL','ID_ACTIONS','en','Actions','2014-01-15') ,
|
||||
( 'LABEL','ID_ACTIONS_BY_EMAIL','en','actionsByEmail.html','2014-01-15') ,
|
||||
( 'LABEL','ID_ACTIONS_BY_EMAIL_LINK_TO_FILL_A_FORM','en','Please complete this form','2019-10-18') ,
|
||||
( 'LABEL','ID_ACTIONS_BY_EMAIL_LOG','en','Actions By Email Log','2016-01-12') ,
|
||||
( 'LABEL','ID_ACTION_DISABLED_TO_LOW_PERFORMANCE_1','en','This action was disabled to prevent slow browser performance. There are more than 100 records in the column definition grid.','2015-01-16') ,
|
||||
( 'LABEL','ID_ACTION_DISABLED_TO_LOW_PERFORMANCE_2','en','<br/><br/>Please perform this action with manual selection only.','2014-01-15') ,
|
||||
|
||||
@@ -385,6 +385,8 @@ class ActionsByEmail
|
||||
$emailServer = new EmailServerModel();
|
||||
$criteria = $emailServer->getEmailServer($dataRes['ABE_EMAIL_SERVER_UID']);
|
||||
$setup = !empty($criteria) ? $criteria : $emailServer->getEmailServerDefault();
|
||||
$setup['SMTPSecure'] = $setup['SMTPSECURE'];
|
||||
unset($setup['SMTPSECURE']);
|
||||
$spool = new SpoolRun();
|
||||
$spool->setConfig($setup);
|
||||
$abeCore = new ActionsByEmailCoreClass();
|
||||
|
||||
@@ -1859,6 +1859,11 @@ class Cases
|
||||
$arrayCaseVariable = array_merge($arrayCaseVariable, $dateHistory);
|
||||
}
|
||||
|
||||
// Get the SYS_LANG defined, it can be updated
|
||||
if (defined('SYS_LANG')) {
|
||||
$arrayCaseVariable['SYS_LANG'] = SYS_LANG;
|
||||
}
|
||||
|
||||
return $arrayCaseVariable;
|
||||
}
|
||||
|
||||
|
||||
@@ -165,17 +165,16 @@ class GranularImporter
|
||||
{
|
||||
$project = $tables["project"][0];
|
||||
$diagram = $tables["diagram"][0];
|
||||
$diagram["activities"] = (isset($tables["activity"])) ? $tables["activity"] : array();
|
||||
$diagram["artifacts"] = (isset($tables["artifact"])) ? $tables["artifact"] : array();
|
||||
$diagram["events"] = (isset($tables["event"])) ? $tables["event"] : array();
|
||||
$diagram["flows"] = (isset($tables["flow"])) ? $tables["flow"] : array();
|
||||
$diagram["gateways"] = (isset($tables["gateway"])) ? $tables["gateway"] : array();
|
||||
$diagram["data"] = (isset($tables["data"])) ? $tables["data"] : array();
|
||||
$diagram["participants"] = (isset($tables["participant"])) ? $tables["participant"] : array();
|
||||
$diagram["laneset"] = (isset($tables["laneset"])) ? $tables["laneset"] : array();
|
||||
$diagram["lanes"] = (isset($tables["lane"])) ? $tables["lane"] : array();
|
||||
$diagram["activities"] = (isset($tables["activity"])) ? $tables["activity"] : [];
|
||||
$diagram["artifacts"] = (isset($tables["artifact"])) ? $tables["artifact"] : [];
|
||||
$diagram["events"] = (isset($tables["event"])) ? $tables["event"] : [];
|
||||
$diagram["flows"] = (isset($tables["flow"])) ? $tables["flow"] : [];
|
||||
$diagram["gateways"] = (isset($tables["gateway"])) ? $tables["gateway"] : [];
|
||||
$diagram["data"] = (isset($tables["data"])) ? $tables["data"] : [];
|
||||
$diagram["participants"] = (isset($tables["participant"])) ? $tables["participant"] : [];
|
||||
$diagram["laneset"] = (isset($tables["laneset"])) ? $tables["laneset"] : [];
|
||||
$diagram["lanes"] = (isset($tables["lane"])) ? $tables["lane"] : [];
|
||||
$project["diagrams"] = array($diagram);
|
||||
$project["prj_author"] = isset($this->data["usr_uid"]) ? $this->data["usr_uid"] : "00000000000000000000000000000001";
|
||||
$project["process"] = $tables["process"][0];
|
||||
return $project;
|
||||
}
|
||||
|
||||
@@ -1230,7 +1230,7 @@ class TimerEvent
|
||||
//Start Timer-Event (start new case) ///////////////////////////////////////////////////////////////////////
|
||||
$common->frontEndShow("START");
|
||||
|
||||
$this->log("START-NEW-CASES", "Date \"$datetime (UTC +00:00)\": Start new cases");
|
||||
$this->log("START-NEW-CASES", "Start new cases");
|
||||
$aInfo = array(
|
||||
'ip' => \G::getIpAddress()
|
||||
,'action' => 'START-NEW-CASES'
|
||||
@@ -1506,7 +1506,7 @@ class TimerEvent
|
||||
|
||||
//Intermediate Catch Timer-Event (continue the case) ///////////////////////////////////////////////////////
|
||||
$action = "START-CONTINUE-CASES";
|
||||
$this->log($action, "Date \"$datetime (UTC +00:00)\": Start continue the cases");
|
||||
$this->log($action, "Start continue the cases");
|
||||
$aInfo = array(
|
||||
'ip' => \G::getIpAddress()
|
||||
,'action' => $action
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
namespace ProcessMaker\Importer;
|
||||
|
||||
use Processes;
|
||||
use ProcessMaker\Util;
|
||||
use ProcessMaker\Project;
|
||||
use ProcessMaker\Project\Adapter;
|
||||
use ProcessMaker\BusinessModel\Migrator;
|
||||
use ProcessMaker\BusinessModel\Migrator\ImportException;
|
||||
use ProcessMaker\Model\Process;
|
||||
use ProcessMaker\Project;
|
||||
use ProcessMaker\Project\Adapter;
|
||||
use ProcessMaker\Util;
|
||||
use ProcessMaker\Util\Common;
|
||||
use ProcessPeer;
|
||||
use stdClass;
|
||||
@@ -18,7 +19,7 @@ abstract class Importer
|
||||
protected $filename = "";
|
||||
protected $saveDir = "";
|
||||
protected $metadata = array();
|
||||
protected $prjCreateUser = '';
|
||||
|
||||
/**
|
||||
* Stores the current objects before import.
|
||||
* @var object
|
||||
@@ -332,7 +333,7 @@ abstract class Importer
|
||||
$diagram = $project->getStruct($projectUid);
|
||||
$res = $project->updateFromStruct($projectUid, $diagram);
|
||||
}
|
||||
|
||||
$this->updateTheProcessOwner($projectUid);
|
||||
return $projectUid;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
@@ -341,11 +342,29 @@ abstract class Importer
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$result = $this->doImport($generateUid);
|
||||
|
||||
//Return
|
||||
$this->updateTheProcessOwner($result);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* This updates the process owner.
|
||||
* @param string $proUid
|
||||
* @return void
|
||||
*/
|
||||
private function updateTheProcessOwner(string $proUid): void
|
||||
{
|
||||
$processOwner = $this->data["usr_uid"];
|
||||
|
||||
$currentProcess = $this->getCurrentProcess();
|
||||
if (is_object($currentProcess)) {
|
||||
$processOwner = $currentProcess->process->getProCreateUser();
|
||||
}
|
||||
$process = Process::where('PRO_UID', '=', $proUid);
|
||||
$process->update([
|
||||
'PRO_CREATE_USER' => $processOwner
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare for import, it makes all validations needed
|
||||
* @return int
|
||||
@@ -535,19 +554,17 @@ abstract class Importer
|
||||
// Build BPMN project struct
|
||||
$project = $tables["project"][0];
|
||||
$diagram = $tables["diagram"][0];
|
||||
$diagram["activities"] = (isset($tables["activity"]))? $tables["activity"] : array();
|
||||
$diagram["artifacts"] = (isset($tables["artifact"]))? $tables["artifact"] : array();
|
||||
$diagram["events"] = (isset($tables["event"]))? $tables["event"] : array();
|
||||
$diagram["flows"] = (isset($tables["flow"]))? $tables["flow"] : array();
|
||||
$diagram["gateways"] = (isset($tables["gateway"]))? $tables["gateway"]: array();
|
||||
$diagram["data"] = (isset($tables["data"]))? $tables["data"] : array();
|
||||
$diagram["participants"] = (isset($tables["participant"]))? $tables["participant"] : array();
|
||||
$diagram["laneset"] = (isset($tables["laneset"]))? $tables["laneset"] : array();
|
||||
$diagram["lanes"] = (isset($tables["lane"]))? $tables["lane"] : array();
|
||||
$diagram["activities"] = (isset($tables["activity"]))? $tables["activity"] : [];
|
||||
$diagram["artifacts"] = (isset($tables["artifact"]))? $tables["artifact"] : [];
|
||||
$diagram["events"] = (isset($tables["event"]))? $tables["event"] : [];
|
||||
$diagram["flows"] = (isset($tables["flow"]))? $tables["flow"] : [];
|
||||
$diagram["gateways"] = (isset($tables["gateway"]))? $tables["gateway"]: [];
|
||||
$diagram["data"] = (isset($tables["data"]))? $tables["data"] : [];
|
||||
$diagram["participants"] = (isset($tables["participant"]))? $tables["participant"] : [];
|
||||
$diagram["laneset"] = (isset($tables["laneset"]))? $tables["laneset"] : [];
|
||||
$diagram["lanes"] = (isset($tables["lane"]))? $tables["lane"] : [];
|
||||
$project["diagrams"] = array($diagram);
|
||||
$project["prj_author"] = isset($this->data["usr_uid"])? $this->data["usr_uid"]: "00000000000000000000000000000001";
|
||||
$project["process"] = $tables["process"][0];
|
||||
$project["prjCreateUser"] = $this->prjCreateUser;
|
||||
|
||||
return Adapter\BpmnWorkflow::createFromStruct($project, $generateUid);
|
||||
}
|
||||
@@ -839,7 +856,7 @@ abstract class Importer
|
||||
}
|
||||
}
|
||||
|
||||
public function saveAs($prj_uid, $prj_name, $prj_description, $prj_category, $prj_user = '')
|
||||
public function saveAs($prj_uid, $prj_name, $prj_description, $prj_category)
|
||||
{
|
||||
try {
|
||||
$exporter = new \ProcessMaker\Exporter\XmlExporter($prj_uid);
|
||||
@@ -857,7 +874,7 @@ abstract class Importer
|
||||
|
||||
$this->setSourceFile($outputFilename);
|
||||
$this->prepare();
|
||||
$this->prjCreateUser = $prj_user;
|
||||
|
||||
$this->importData["tables"]["bpmn"]["project"][0]["prj_name"] = $prj_name;
|
||||
$this->importData["tables"]["bpmn"]["project"][0]["prj_description"] = $prj_description;
|
||||
$this->importData["tables"]["bpmn"]["diagram"][0]["dia_name"] = $prj_name;
|
||||
@@ -869,7 +886,9 @@ abstract class Importer
|
||||
$this->importData["tables"]["workflow"]["process"][0]["PRO_UPDATE_DATE"] = null;
|
||||
$this->importData["tables"]["workflow"]["process"] = $this->importData["tables"]["workflow"]["process"][0];
|
||||
|
||||
return ['prj_uid' => $this->doImport(true, false)];
|
||||
$result = $this->doImport(true, false);
|
||||
$this->updateTheProcessOwner($result);
|
||||
return ['prj_uid' => $result];
|
||||
} catch (\Exception $e) {
|
||||
return $e->getMessage();
|
||||
}
|
||||
|
||||
@@ -14,30 +14,24 @@ class Process extends Model
|
||||
{
|
||||
// Set our table name
|
||||
protected $table = 'PROCESS';
|
||||
protected $primaryKey = 'PRO_ID';
|
||||
// Our custom timestamp columns
|
||||
const CREATED_AT = 'PRO_CREATE_DATE';
|
||||
const UPDATED_AT = 'PRO_UPDATE_DATE';
|
||||
/**
|
||||
* Retrieve all applications that belong to this process
|
||||
*/
|
||||
public function applications()
|
||||
{
|
||||
return $this->hasMany(Application::class, 'PRO_ID', 'PRO_ID');
|
||||
}
|
||||
|
||||
public function tasks()
|
||||
{
|
||||
return $this->hasMany(Task::class, 'PRO_UID', 'PRO_UID');
|
||||
return $this->belongsTo(Task::class, 'PRO_ID', 'PRO_ID');
|
||||
}
|
||||
|
||||
public function creator()
|
||||
{
|
||||
return $this->hasOne(User::class, 'PRO_CREATE_USER', 'USR_UID');
|
||||
return $this->belongsTo(User::class, 'PRO_CREATE_USER', 'USR_UID');
|
||||
}
|
||||
|
||||
public function category()
|
||||
{
|
||||
return $this->hasOne(ProcessCategory::class, 'PRO_CATEGORY', 'CATEGORY_UID');
|
||||
return $this->belongsTo(ProcessCategory::class, 'PRO_CATEGORY', 'CATEGORY_UID');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -99,10 +99,6 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
$wpData["PRO_STATUS"] = $data["PRO_STATUS"];
|
||||
}
|
||||
|
||||
if (array_key_exists("PRO_CREATE_USER", $data)) {
|
||||
$wpData["PRO_CREATE_USER"] = $data["PRO_CREATE_USER"];
|
||||
}
|
||||
|
||||
$this->wp = new Project\Workflow();
|
||||
$this->wp->create($wpData);
|
||||
|
||||
@@ -1312,10 +1308,6 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
$data["PRO_STATUS"] = $projectData['pro_status'];
|
||||
}
|
||||
|
||||
if (!empty($projectData['prjCreateUser'])) {
|
||||
$data["PRO_CREATE_USER"] = $projectData['prjCreateUser'];
|
||||
}
|
||||
|
||||
$bwp->create($data);
|
||||
|
||||
$diagramData = $processData = array();
|
||||
|
||||
@@ -277,7 +277,8 @@ class Project extends Api
|
||||
public function doSaveAs($prj_uid, $prj_name, $prj_description = null, $prj_category = null)
|
||||
{
|
||||
$importer = new \ProcessMaker\Importer\XmlImporter();
|
||||
return $importer->saveAs($prj_uid, $prj_name, $prj_description, $prj_category, $this->getUserId());
|
||||
$importer->setData("usr_uid", $this->getUserId());
|
||||
return $importer->saveAs($prj_uid, $prj_name, $prj_description, $prj_category);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -181,7 +181,7 @@ class Server implements iAuthenticate
|
||||
if (! isset($_SESSION['USER_LOGGED'])) {
|
||||
$http = \G::is_https() ? 'https' : 'http';
|
||||
$host = $http . '://' . $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != '80' ? ':' . $_SERVER['SERVER_PORT'] : '');
|
||||
$redirect = urlencode($host.'/'.self::$workspace.$_SERVER['REQUEST_URI']);
|
||||
$redirect = urlencode('/'.self::$workspace.$_SERVER['REQUEST_URI']);
|
||||
|
||||
$loginLink = sprintf('%s/sys%s/%s/%s/login/login?u=%s', $host, config("system.workspace"), SYS_LANG, SYS_SKIN, $redirect);
|
||||
header('location: ' . $loginLink);
|
||||
|
||||
@@ -453,7 +453,7 @@ Ext.onReady(function(){
|
||||
color = r.get('PRO_STATUS') == 'ACTIVE'? 'green': 'red';
|
||||
return String.format("<font color='{0}'>{1}</font>", color, v);
|
||||
}},
|
||||
{header: _('ID_PRO_USER'), dataIndex: 'PRO_CREATE_USER_LABEL', width: 150},
|
||||
{header: _('ID_OWNER'), dataIndex: 'PRO_CREATE_USER_LABEL', width: 150},
|
||||
{header: _('ID_PRO_CREATE_DATE'), dataIndex: 'PRO_CREATE_DATE', width: 90},
|
||||
{header: _('ID_INBOX'), dataIndex: 'CASES_COUNT_TO_DO', width: 50, align:'right'},
|
||||
{header: _('ID_DRAFT'), dataIndex: 'CASES_COUNT_DRAFT', width: 50, align:'right'},
|
||||
|
||||
Reference in New Issue
Block a user