ProcessMaker-BE "Trigger Wizard (fixes)"
- En el listado de trigger wizards no estaba ordenado, ahora se despliega ordenadamente - Se corrigio el .feature correspondiente para que aplique el cambio - Otros fixes tambien se realizaron
This commit is contained in:
@@ -7,8 +7,8 @@ Feature: Group
|
|||||||
Background:
|
Background:
|
||||||
Given that I have a valid access_token
|
Given that I have a valid access_token
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Get the Trigger Wizard List when there are exactly 6 library
|
Scenario Outline: Get the Trigger Wizard List when there are exactly 6 library
|
||||||
And I request "project/14414793652a5d718b65590036026581/trigger-wizards"
|
And I request "project/14414793652a5d718b65590036026581/trigger-wizards"
|
||||||
And the content type is "application/json"
|
And the content type is "application/json"
|
||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
@@ -22,13 +22,13 @@ Feature: Group
|
|||||||
Examples:
|
Examples:
|
||||||
| i | lib_name | lib_title | lib_class_name |
|
| i | lib_name | lib_title | lib_class_name |
|
||||||
| 0 | pmFunctions | ProcessMaker Functions | class.pmFunctions.php |
|
| 0 | pmFunctions | ProcessMaker Functions | class.pmFunctions.php |
|
||||||
| 1 | pmTrSharepoint | Sharepoint DWS Triggers v. 0.1 | class.pmTrSharepoint.pmFunctions.php |
|
| 1 | pmSugar | Sugar CRM Triggers | class.pmSugar.pmFunctions.php |
|
||||||
| 2 | pmSugar | Sugar CRM Triggers | class.pmSugar.pmFunctions.php |
|
| 2 | pmTalend | Talend ETL Integration | class.pmTalend.pmFunctions.php |
|
||||||
| 3 | pmTalend | Talend ETL Integration | class.pmTalend.pmFunctions.php |
|
| 3 | pmTrAlfresco | Alfresco DM Triggers v. 0.1 | class.pmTrAlfresco.pmFunctions.php |
|
||||||
| 4 | pmZimbra | Zimbra Triggers v. 0.1 | class.pmZimbra.pmFunctions.php |
|
| 4 | pmTrSharepoint | Sharepoint DWS Triggers v. 0.1 | class.pmTrSharepoint.pmFunctions.php |
|
||||||
| 5 | pmTrAlfresco | Alfresco DM Triggers v. 0.1 | class.pmTrAlfresco.pmFunctions.php |
|
| 5 | pmZimbra | Zimbra Triggers v. 0.1 | class.pmZimbra.pmFunctions.php |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Get a single Library
|
Scenario Outline: Get a single Library
|
||||||
And I request "project/14414793652a5d718b65590036026581/trigger-wizard/<lib_name>"
|
And I request "project/14414793652a5d718b65590036026581/trigger-wizard/<lib_name>"
|
||||||
And the content type is "application/json"
|
And the content type is "application/json"
|
||||||
@@ -48,7 +48,7 @@ Feature: Group
|
|||||||
| pmTalend | Talend ETL Integration | class.pmTalend.pmFunctions.php |
|
| pmTalend | Talend ETL Integration | class.pmTalend.pmFunctions.php |
|
||||||
| pmSugar | Sugar CRM Triggers | class.pmSugar.pmFunctions.php |
|
| pmSugar | Sugar CRM Triggers | class.pmSugar.pmFunctions.php |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Get a single Function of the Library
|
Scenario Outline: Get a single Function of the Library
|
||||||
And I request "project/14414793652a5d718b65590036026581/trigger-wizard/<lib_name>/<fn_name>"
|
And I request "project/14414793652a5d718b65590036026581/trigger-wizard/<lib_name>/<fn_name>"
|
||||||
And the content type is "application/json"
|
And the content type is "application/json"
|
||||||
@@ -119,14 +119,14 @@ Scenario Outline: Create new Trigger: createDWS
|
|||||||
"tri_type": "<tri_type>",
|
"tri_type": "<tri_type>",
|
||||||
"tri_params": {
|
"tri_params": {
|
||||||
"input": {
|
"input": {
|
||||||
|
|
||||||
"sharepointServer": "<tri_params.input.sharepointServer>",
|
"sharepointServer": "<tri_params.input.sharepointServer>",
|
||||||
"auth": "<tri_params.input.auth>",
|
"auth": "<tri_params.input.auth>",
|
||||||
"name": "<tri_params.input.name>",
|
"name": "<tri_params.input.name>",
|
||||||
"users": "<tri_params.input.users>",
|
"users": "<tri_params.input.users>",
|
||||||
"title": "<tri_params.input.title>",
|
"title": "<tri_params.input.title>",
|
||||||
"documents": "<tri_params.input.documents>"
|
"documents": "<tri_params.input.documents>"
|
||||||
|
|
||||||
},
|
},
|
||||||
"output": {
|
"output": {
|
||||||
"tri_answer": "<tri_params.output.tri_answer>"
|
"tri_answer": "<tri_params.output.tri_answer>"
|
||||||
@@ -189,14 +189,14 @@ Scenario Outline: Create new Trigger: createDWS
|
|||||||
"tri_type": "<tri_type>",
|
"tri_type": "<tri_type>",
|
||||||
"tri_params": {
|
"tri_params": {
|
||||||
"input": {
|
"input": {
|
||||||
|
|
||||||
"sharepointServer": "<tri_params.input.sharepointServer>",
|
"sharepointServer": "<tri_params.input.sharepointServer>",
|
||||||
"auth": "<tri_params.input.auth>",
|
"auth": "<tri_params.input.auth>",
|
||||||
"name": "<tri_params.input.name>",
|
"name": "<tri_params.input.name>",
|
||||||
"users": "<tri_params.input.users>",
|
"users": "<tri_params.input.users>",
|
||||||
"title": "<tri_params.input.title>",
|
"title": "<tri_params.input.title>",
|
||||||
"documents": "<tri_params.input.documents>"
|
"documents": "<tri_params.input.documents>"
|
||||||
|
|
||||||
},
|
},
|
||||||
"output": {
|
"output": {
|
||||||
"tri_answer": "<tri_params.output.tri_answer>"
|
"tri_answer": "<tri_params.output.tri_answer>"
|
||||||
@@ -210,12 +210,12 @@ Scenario Outline: Create new Trigger: createDWS
|
|||||||
Then the response status code should be 200
|
Then the response status code should be 200
|
||||||
And the response charset is "UTF-8"
|
And the response charset is "UTF-8"
|
||||||
And the type is "object"
|
And the type is "object"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
| i | lib_name | fn_name | tri_title | tri_description | tri_type | tri_params.input.sharepointServer | tri_params.input.auth | tri_params.input.name | tri_params.input.users | tri_params.input.title | tri_params.input.documents | tri_params.output.tri_answer |
|
| i | lib_name | fn_name | tri_title | tri_description | tri_type | tri_params.input.sharepointServer | tri_params.input.auth | tri_params.input.name | tri_params.input.users | tri_params.input.title | tri_params.input.documents | tri_params.output.tri_answer |
|
||||||
| 1 | pmTrSharepoint | createDWS | Sharepoint 1 - Modified | | SCRIPT | @@SERVER_URL | username:password | Test DWS | @@users | Test DWS | /files/test.doc | $respuesta |
|
| 1 | pmTrSharepoint | createDWS | Sharepoint 1 - Modified | | SCRIPT | @@SERVER_URL | username:password | Test DWS | @@users | Test DWS | /files/test.doc | $respuesta |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Get a Trigger that was created with the wizard
|
Scenario Outline: Get a Trigger that was created with the wizard
|
||||||
Given that I want to get a resource with the key "tri_uid" stored in session array as variable "tri_uid<i>"
|
Given that I want to get a resource with the key "tri_uid" stored in session array as variable "tri_uid<i>"
|
||||||
And I request "project/14414793652a5d718b65590036026581/trigger-wizard/<lib_name>/<fn_name>"
|
And I request "project/14414793652a5d718b65590036026581/trigger-wizard/<lib_name>/<fn_name>"
|
||||||
@@ -228,12 +228,12 @@ Scenario Outline: Create new Trigger: createDWS
|
|||||||
And that "tri_type" is set to "<tri_type>"
|
And that "tri_type" is set to "<tri_type>"
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
| i | lib_name | fn_name | tri_title | tri_description | tri_type |
|
| i | lib_name | fn_name | tri_title | tri_description | tri_type |
|
||||||
| 0 | pmFunctions | PMFAddAttachmentToArray | My trigger... | ... | SCRIPT |
|
| 0 | pmFunctions | PMFAddAttachmentToArray | My trigger... | ... | SCRIPT |
|
||||||
| 1 | pmTrSharepoint | createDWS | Test DWS | | SCRIPT |
|
| 1 | pmTrSharepoint | createDWS | Test DWS | | SCRIPT |
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: Delete a trigger of a project
|
Scenario Outline: Delete a trigger of a project
|
||||||
Given that I want to delete a resource with the key "tri_uid" stored in session array as variable "tri_uid<i>"
|
Given that I want to delete a resource with the key "tri_uid" stored in session array as variable "tri_uid<i>"
|
||||||
And I request "project/14414793652a5d718b65590036026581/trigger"
|
And I request "project/14414793652a5d718b65590036026581/trigger"
|
||||||
@@ -248,7 +248,7 @@ Scenario Outline: Create new Trigger: createDWS
|
|||||||
| 1 |
|
| 1 |
|
||||||
| 2 |
|
| 2 |
|
||||||
|
|
||||||
|
|
||||||
Scenario: Get a List of triggers of a project
|
Scenario: Get a List of triggers of a project
|
||||||
And I request "project/14414793652a5d718b65590036026581/triggers"
|
And I request "project/14414793652a5d718b65590036026581/triggers"
|
||||||
And the content type is "application/json"
|
And the content type is "application/json"
|
||||||
|
|||||||
@@ -569,17 +569,20 @@ class Process extends BaseProcess
|
|||||||
|
|
||||||
public static function existsByProTitle ($PRO_TITLE)
|
public static function existsByProTitle ($PRO_TITLE)
|
||||||
{
|
{
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria("workflow");
|
||||||
$oCriteria->addSelectColumn( 'COUNT(*) AS PROCESS' );
|
|
||||||
|
$oCriteria->addSelectColumn("COUNT(" . ContentPeer::CON_ID . ") AS NUM_REC");
|
||||||
|
|
||||||
$oCriteria->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE' );
|
$oCriteria->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE' );
|
||||||
$oCriteria->add( ContentPeer::CON_LANG, SYS_LANG );
|
$oCriteria->add( ContentPeer::CON_LANG, SYS_LANG );
|
||||||
$oCriteria->add( ContentPeer::CON_VALUE, $PRO_TITLE );
|
$oCriteria->add( ContentPeer::CON_VALUE, $PRO_TITLE );
|
||||||
$oDataset = ContentPeer::doSelectRS( $oCriteria );
|
$oDataset = ContentPeer::doSelectRS( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$aRow = $oDataset->getRow();
|
$aRow = $oDataset->getRow();
|
||||||
|
|
||||||
return $aRow['PROCESS'] ? true : false;
|
return ((int)($aRow["NUM_REC"]) > 0)? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAllProcessesCount ()
|
public function getAllProcessesCount ()
|
||||||
@@ -760,7 +763,7 @@ class Process extends BaseProcess
|
|||||||
$aProcesses[] = $process;
|
$aProcesses[] = $process;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$memcache = & PMmemcached::getSingleton( SYS_SYS );
|
$memcache = & PMmemcached::getSingleton( SYS_SYS );
|
||||||
if (isset($memcache) && $memcache->enabled == 1 ) {
|
if (isset($memcache) && $memcache->enabled == 1 ) {
|
||||||
return $aProcesses;
|
return $aProcesses;
|
||||||
@@ -893,7 +896,7 @@ class Process extends BaseProcess
|
|||||||
$r = $memcache->delete( $memkeyTotal );
|
$r = $memcache->delete( $memkeyTotal );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function orderMemcache($dataMemcache, $start, $limit)
|
public function orderMemcache($dataMemcache, $start, $limit)
|
||||||
{
|
{
|
||||||
if ($this->dir=='ASC') {
|
if ($this->dir=='ASC') {
|
||||||
@@ -911,7 +914,7 @@ class Process extends BaseProcess
|
|||||||
public function ordProcessAsc ($a, $b)
|
public function ordProcessAsc ($a, $b)
|
||||||
{
|
{
|
||||||
if (($this->sort) == '') {
|
if (($this->sort) == '') {
|
||||||
$this->sort = 'PRO_TITLE';
|
$this->sort = 'PRO_TITLE';
|
||||||
}
|
}
|
||||||
if (strtolower($a[$this->sort]) > strtolower($b[$this->sort])) {
|
if (strtolower($a[$this->sort]) > strtolower($b[$this->sort])) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ class InputDocument
|
|||||||
"INP_DOC_DESCRIPTION" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "inputDocumentDescription"),
|
"INP_DOC_DESCRIPTION" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "inputDocumentDescription"),
|
||||||
"INP_DOC_FORM_NEEDED" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array("VIRTUAL", "REAL", "VREAL"), "fieldNameAux" => "inputDocumentFormNeeded"),
|
"INP_DOC_FORM_NEEDED" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array("VIRTUAL", "REAL", "VREAL"), "fieldNameAux" => "inputDocumentFormNeeded"),
|
||||||
"INP_DOC_ORIGINAL" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array("ORIGINAL", "COPY", "COPYLEGAL"), "fieldNameAux" => "inputDocumentOriginal"),
|
"INP_DOC_ORIGINAL" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array("ORIGINAL", "COPY", "COPYLEGAL"), "fieldNameAux" => "inputDocumentOriginal"),
|
||||||
"INP_DOC_PUBLISHED" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array("PRIVATE"), "fieldNameAux" => "inputDocumentPublished"),
|
"INP_DOC_PUBLISHED" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array("PRIVATE", "PUBLIC"), "fieldNameAux" => "inputDocumentPublished"),
|
||||||
"INP_DOC_VERSIONING" => array("type" => "int", "required" => false, "empty" => false, "defaultValues" => array(0, 1), "fieldNameAux" => "inputDocumentVersioning"),
|
"INP_DOC_VERSIONING" => array("type" => "int", "required" => false, "empty" => false, "defaultValues" => array(0, 1), "fieldNameAux" => "inputDocumentVersioning"),
|
||||||
"INP_DOC_DESTINATION_PATH" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "inputDocumentDestinationPath"),
|
"INP_DOC_DESTINATION_PATH" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "inputDocumentDestinationPath"),
|
||||||
"INP_DOC_TAGS" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "inputDocumentTags")
|
"INP_DOC_TAGS" => array("type" => "string", "required" => false, "empty" => true, "defaultValues" => array(), "fieldNameAux" => "inputDocumentTags")
|
||||||
|
|||||||
@@ -1603,6 +1603,8 @@ class Process
|
|||||||
$triggerLibrary = \triggerLibrary::getSingleton();
|
$triggerLibrary = \triggerLibrary::getSingleton();
|
||||||
$library = $triggerLibrary->getRegisteredClasses();
|
$library = $triggerLibrary->getRegisteredClasses();
|
||||||
|
|
||||||
|
ksort($library);
|
||||||
|
|
||||||
foreach ($library as $key => $value) {
|
foreach ($library as $key => $value) {
|
||||||
$libraryName = (preg_match("/^class\.?(.*)\.pmFunctions\.php$/", $key, $arrayMatch))? ((isset($arrayMatch[1]) && $arrayMatch[1] != "")? $arrayMatch[1] : "pmFunctions") : $key;
|
$libraryName = (preg_match("/^class\.?(.*)\.pmFunctions\.php$/", $key, $arrayMatch))? ((isset($arrayMatch[1]) && $arrayMatch[1] != "")? $arrayMatch[1] : "pmFunctions") : $key;
|
||||||
|
|
||||||
|
|||||||
@@ -105,6 +105,8 @@ class Bpmn extends Handler
|
|||||||
// setting defaults
|
// setting defaults
|
||||||
$data['PRJ_UID'] = array_key_exists('PRJ_UID', $data) ? $data['PRJ_UID'] : Common::generateUID();
|
$data['PRJ_UID'] = array_key_exists('PRJ_UID', $data) ? $data['PRJ_UID'] : Common::generateUID();
|
||||||
|
|
||||||
|
unset($data["PRJ_UPDATE_DATE"]);
|
||||||
|
|
||||||
self::log("Create Project with data: ", $data);
|
self::log("Create Project with data: ", $data);
|
||||||
$this->project = new Project();
|
$this->project = new Project();
|
||||||
$this->project->fromArray($data, BasePeer::TYPE_FIELDNAME);
|
$this->project->fromArray($data, BasePeer::TYPE_FIELDNAME);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class Workflow extends Handler
|
|||||||
$process = new Process();
|
$process = new Process();
|
||||||
$processData = $process->load($proUid);
|
$processData = $process->load($proUid);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw new Exception\ProjectNotFound($me, $proUid);
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
$me->process = $processData;
|
$me->process = $processData;
|
||||||
|
|||||||
Reference in New Issue
Block a user