Merged in bugfix/PMC-138 (pull request #7110)
PMC-138 Assigned user lost in case of Custom Import (Promotion Manager) Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
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
File diff suppressed because it is too large
Load Diff
458
tests/resources/p1normalWithoutTitle2-1.pmx
Normal file
458
tests/resources/p1normalWithoutTitle2-1.pmx
Normal file
File diff suppressed because it is too large
Load Diff
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
File diff suppressed because it is too large
Load Diff
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,9 +69,9 @@ class GranularImporter
|
||||
switch ($nameObject) {
|
||||
case 'PROCESSDEFINITION':
|
||||
$objectList['PROCESSDEFINITION']['bpmn'] = isset($data['tables']['bpmn']) ? $this->structureBpmnData
|
||||
($data['tables']['bpmn']) : [];
|
||||
$objectList['PROCESSDEFINITION']['workflow'] = isset($data['tables']['workflow']) ?
|
||||
$data['tables']['workflow'] : [];
|
||||
($data['tables']['bpmn']) : [];
|
||||
$objectList['PROCESSDEFINITION']['workflow'] = isset($data['tables']['workflow']) ?
|
||||
$data['tables']['workflow'] : [];
|
||||
break;
|
||||
case 'ASSIGNMENTRULES':
|
||||
$objectList['ASSIGNMENTRULES']['tasks'] = isset($data['tables']['workflow']['tasks']) ?
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,10 +342,28 @@ 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
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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