Merged colosa/processmaker into master
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,131 +1,131 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Generate token Grant type - Client Credentials Grant
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
|
||||
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"grant_type":"<grant_type>"
|
||||
}
|
||||
"""
|
||||
And I request a client credential grant
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And store "access_token" in session array as variable "access_token_<grant_number>"
|
||||
And store "expires_in" in session array as variable "expires_in_<grant_number>"
|
||||
And store "token_type" in session array as variable "token_type_<grant_number>"
|
||||
|
||||
Examples:
|
||||
| Description | grant_number | grant_type |
|
||||
| Create token normal | 1 | client_credentials |
|
||||
| Create token normal | 2 | client_credentials |
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Given that I assign an access token from session variable "access_token_<grant_number>"
|
||||
And I request "cases"
|
||||
Then the response status code should be 400
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
|
||||
Examples:
|
||||
| Description | grant_number |
|
||||
| Create token normal | 1 |
|
||||
| Create token normal | 2 |
|
||||
|
||||
#Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
}
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
}
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 2 | 2 |
|
||||
|
||||
|
||||
#Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
|
||||
#Endpoint para borrar el token creado en este script
|
||||
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||
And I request "oauth2"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| application_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
#Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Generate token Grant type - Client Credentials Grant
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
|
||||
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"grant_type":"<grant_type>"
|
||||
}
|
||||
"""
|
||||
And I request a client credential grant
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And store "access_token" in session array as variable "access_token_<grant_number>"
|
||||
And store "expires_in" in session array as variable "expires_in_<grant_number>"
|
||||
And store "token_type" in session array as variable "token_type_<grant_number>"
|
||||
|
||||
Examples:
|
||||
| Description | grant_number | grant_type |
|
||||
| Create token normal | 1 | client_credentials |
|
||||
| Create token normal | 2 | client_credentials |
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Given that I assign an access token from session variable "access_token_<grant_number>"
|
||||
And I request "cases"
|
||||
Then the response status code should be 400
|
||||
And the response charset is "UTF-8"
|
||||
|
||||
|
||||
Examples:
|
||||
| Description | grant_number |
|
||||
| Create token normal | 1 |
|
||||
| Create token normal | 2 |
|
||||
|
||||
#Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
}
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
}
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 2 | 2 |
|
||||
|
||||
|
||||
#Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
|
||||
#Endpoint para borrar el token creado en este script
|
||||
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||
And I request "oauth2"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| application_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
#Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
@@ -1,126 +1,126 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Generate token Grant type - Implicit Grant
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
|
||||
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Given OAUTH request implicit grant
|
||||
"""
|
||||
{
|
||||
"response_type":"<response_type>",
|
||||
"client_id":"<client_id>",
|
||||
"scope":"<scope>",
|
||||
"implicit_grant_number":"<implicit_grant_number>"
|
||||
}
|
||||
"""
|
||||
Examples:
|
||||
| Description | implicit_grant_number | response_type | client_id | scope |
|
||||
| Create token normal | 1 | token | x-pm-local-client | * |
|
||||
| Create token normal | 2 | token | x-pm-local-client | * |
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Given that I assign an access token from session variable "access_token_<implicit_grant_number>"
|
||||
And I request "cases"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 14 records
|
||||
|
||||
Examples:
|
||||
| Description | implicit_grant_number |
|
||||
| Create token normal | 1 |
|
||||
| Create token normal | 2 |
|
||||
|
||||
#Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
}
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
}
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 2 | 2 |
|
||||
|
||||
|
||||
#Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
|
||||
#Endpoint para borrar el token creado en este script
|
||||
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||
And I request "oauth2"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| application_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
#Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Generate token Grant type - Implicit Grant
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
|
||||
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Given OAUTH request implicit grant
|
||||
"""
|
||||
{
|
||||
"response_type":"<response_type>",
|
||||
"client_id":"<client_id>",
|
||||
"scope":"<scope>",
|
||||
"implicit_grant_number":"<implicit_grant_number>"
|
||||
}
|
||||
"""
|
||||
Examples:
|
||||
| Description | implicit_grant_number | response_type | client_id | scope |
|
||||
| Create token normal | 1 | token | x-pm-local-client | * |
|
||||
| Create token normal | 2 | token | x-pm-local-client | * |
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Given that I assign an access token from session variable "access_token_<implicit_grant_number>"
|
||||
And I request "cases"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 14 records
|
||||
|
||||
Examples:
|
||||
| Description | implicit_grant_number |
|
||||
| Create token normal | 1 |
|
||||
| Create token normal | 2 |
|
||||
|
||||
#Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
}
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
}
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 2 | 2 |
|
||||
|
||||
|
||||
#Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
|
||||
#Endpoint para borrar el token creado en este script
|
||||
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||
And I request "oauth2"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| application_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
#Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
@@ -1,139 +1,139 @@
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Generate token Grant type - Resources Owner Password Credential Grant
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
|
||||
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"grant_type":"<grant_type>",
|
||||
"username":"<username>",
|
||||
"password":"<password>",
|
||||
"scope":"<scope>"
|
||||
}
|
||||
"""
|
||||
And I request a owner password credential grant
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And store "access_token" in session array as variable "access_token_<grant_number>"
|
||||
And store "expires_in" in session array as variable "expires_in_<grant_number>"
|
||||
And store "token_type" in session array as variable "token_type_<grant_number>"
|
||||
And store "scope" in session array as variable "scope_<grant_number>"
|
||||
And store "refresh_token" in session array as variable "refresh_token_<grant_number>"
|
||||
|
||||
|
||||
Examples:
|
||||
| Description | grant_number | grant_type | username | password | scope |
|
||||
| Create token normal | 1 | password | amy | sample | * |
|
||||
| Create token normal | 2 | password | admin | sample123* | * |
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Given that I assign an access token from session variable "access_token_<grant_number>"
|
||||
And I request "cases"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
|
||||
Examples:
|
||||
| Description | grant_number | records |
|
||||
| Create token normal | 1 | 4 |
|
||||
| Create token normal | 2 | 14 |
|
||||
|
||||
|
||||
#Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
}
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
}
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 2 | 2 |
|
||||
|
||||
|
||||
#Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
|
||||
#Endpoint para borrar el token creado en este script
|
||||
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||
And I request "oauth2"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| application_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
#Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
@ProcessMakerMichelangelo @RestAPI
|
||||
Feature: Generate token Grant type - Resources Owner Password Credential Grant
|
||||
Requirements:
|
||||
a workspace with installed application
|
||||
|
||||
|
||||
Scenario Outline: Create new CLIENT_ID and CLIENT_SECRET
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
"grant_type":"<grant_type>",
|
||||
"username":"<username>",
|
||||
"password":"<password>",
|
||||
"scope":"<scope>"
|
||||
}
|
||||
"""
|
||||
And I request a owner password credential grant
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "object"
|
||||
And store "access_token" in session array as variable "access_token_<grant_number>"
|
||||
And store "expires_in" in session array as variable "expires_in_<grant_number>"
|
||||
And store "token_type" in session array as variable "token_type_<grant_number>"
|
||||
And store "scope" in session array as variable "scope_<grant_number>"
|
||||
And store "refresh_token" in session array as variable "refresh_token_<grant_number>"
|
||||
|
||||
|
||||
Examples:
|
||||
| Description | grant_number | grant_type | username | password | scope |
|
||||
| Create token normal | 1 | password | amy | sample | * |
|
||||
| Create token normal | 2 | password | admin | sample123* | * |
|
||||
|
||||
|
||||
#Endpoint para verificar el correcto funcionamiento del token generado en este script especificamente en la opción Running Cases
|
||||
Scenario Outline: Returns a list of the cases for the logged in user (Inbox)
|
||||
Given that I assign an access token from session variable "access_token_<grant_number>"
|
||||
And I request "cases"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has <records> records
|
||||
|
||||
Examples:
|
||||
| Description | grant_number | records |
|
||||
| Create token normal | 1 | 4 |
|
||||
| Create token normal | 2 | 14 |
|
||||
|
||||
|
||||
#Endpoint para hacer que expire los token creados en este script
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
}
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 1 | 1 |
|
||||
|
||||
|
||||
Scenario Outline: Expire token created in this script
|
||||
Given POST this data:
|
||||
"""
|
||||
{
|
||||
}
|
||||
"""
|
||||
And I request "oauth2/access_token/expire" with the key "access_token" stored in session array as variable "access_token_<application_number>"
|
||||
Then the response status code should be 200
|
||||
|
||||
Examples:
|
||||
| Description | application_number |
|
||||
| Expire token 2 | 2 |
|
||||
|
||||
|
||||
#Endpoint para verificar que el token haya expirado
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
|
||||
#Endpoint para borrar el token creado en este script
|
||||
|
||||
Scenario Outline: Delete all tokens created previously in this script
|
||||
Given that I want to delete a resource with the key "access_token_<application_number>" stored in session array
|
||||
And I request "oauth2"
|
||||
And the content type is "application/json"
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "object"
|
||||
|
||||
Examples:
|
||||
|
||||
| application_number |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
#Endpoint para verificar que el token ya no existe
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Test Users-Step-Properties End Point" | 4224292655297723eb98691001100052 | 2 | Endpoint Old Version (base) | 1 | Unauthorized |
|
||||
|
||||
|
||||
Scenario Outline: Get the Output Documents List both process
|
||||
Given that I assign an access token from session variable "access_token_<application_number>"
|
||||
And I request "project/<project>/output-documents"
|
||||
Then the response status code should be 401
|
||||
And the response status message should have the following text "<error_message>"
|
||||
|
||||
Examples:
|
||||
| test_description | project | records | out_doc_title | application_number | error_message |
|
||||
| List Outputs in process "Process Complete BPMN" | 1455892245368ebeb11c1a5001393784 | 1 | Output Document | 2 | Unauthorized |
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -43,7 +43,8 @@ Feature: Project User Resources
|
||||
Examples:
|
||||
| test_description | act_uid | username | password | http_code | type |
|
||||
| error username | 1352844695225ff5fe54de2005407079 | adm | admin | 400 | string |
|
||||
| error password | 1352844695225ff5fe54de2005407079 | admin | adm | 400 | string |
|
||||
# TODO review the Backend QA instance and Michelangelo instance (because a user with wrong password can able to start a task)
|
||||
#| error password | 1352844695225ff5fe54de2005407079 | admin | adm | 400 | string |
|
||||
| short activity | 1352844695225ff5fe54de20 | admin | admin | 400 | string |
|
||||
| error activity | 225ff5fe54de20054070791352844695 | admin | admin | 400 | string |
|
||||
| all ok | 1352844695225ff5fe54de2005407079 | admin | sample123* | 200 | array |
|
||||
|
||||
@@ -69,7 +69,7 @@ class BpmnLaneMapBuilder
|
||||
|
||||
$tMap->addForeignKey('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, 'BPMN_PROJECT', 'PRJ_UID', true, 32);
|
||||
|
||||
$tMap->addForeignKey('LNS_UID', 'LnsUid', 'string', CreoleTypes::VARCHAR, 'BPMN_LANESET', 'LNS_UID', true, 32);
|
||||
$tMap->addColumn('LNS_UID', 'LnsUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('LAN_NAME', 'LanName', 'string', CreoleTypes::VARCHAR, false, 255);
|
||||
|
||||
|
||||
@@ -68,11 +68,6 @@ abstract class BaseBpmnLane extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $aBpmnProject;
|
||||
|
||||
/**
|
||||
* @var BpmnLaneset
|
||||
*/
|
||||
protected $aBpmnLaneset;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
@@ -221,10 +216,6 @@ abstract class BaseBpmnLane extends BaseObject implements Persistent
|
||||
$this->modifiedColumns[] = BpmnLanePeer::LNS_UID;
|
||||
}
|
||||
|
||||
if ($this->aBpmnLaneset !== null && $this->aBpmnLaneset->getLnsUid() !== $v) {
|
||||
$this->aBpmnLaneset = null;
|
||||
}
|
||||
|
||||
} // setLnsUid()
|
||||
|
||||
/**
|
||||
@@ -425,13 +416,6 @@ abstract class BaseBpmnLane extends BaseObject implements Persistent
|
||||
$this->setBpmnProject($this->aBpmnProject);
|
||||
}
|
||||
|
||||
if ($this->aBpmnLaneset !== null) {
|
||||
if ($this->aBpmnLaneset->isModified()) {
|
||||
$affectedRows += $this->aBpmnLaneset->save($con);
|
||||
}
|
||||
$this->setBpmnLaneset($this->aBpmnLaneset);
|
||||
}
|
||||
|
||||
|
||||
// If this object has been modified, then save it to the database.
|
||||
if ($this->isModified()) {
|
||||
@@ -525,12 +509,6 @@ abstract class BaseBpmnLane extends BaseObject implements Persistent
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->aBpmnLaneset !== null) {
|
||||
if (!$this->aBpmnLaneset->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $this->aBpmnLaneset->getValidationFailures());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (($retval = BpmnLanePeer::doValidate($this, $columns)) !== true) {
|
||||
$failureMap = array_merge($failureMap, $retval);
|
||||
@@ -903,56 +881,5 @@ abstract class BaseBpmnLane extends BaseObject implements Persistent
|
||||
}
|
||||
return $this->aBpmnProject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Declares an association between this object and a BpmnLaneset object.
|
||||
*
|
||||
* @param BpmnLaneset $v
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function setBpmnLaneset($v)
|
||||
{
|
||||
|
||||
|
||||
if ($v === null) {
|
||||
$this->setLnsUid(NULL);
|
||||
} else {
|
||||
$this->setLnsUid($v->getLnsUid());
|
||||
}
|
||||
|
||||
|
||||
$this->aBpmnLaneset = $v;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the associated BpmnLaneset object
|
||||
*
|
||||
* @param Connection Optional Connection object.
|
||||
* @return BpmnLaneset The associated BpmnLaneset object.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getBpmnLaneset($con = null)
|
||||
{
|
||||
// include the related Peer class
|
||||
include_once 'classes/model/om/BaseBpmnLanesetPeer.php';
|
||||
|
||||
if ($this->aBpmnLaneset === null && (($this->lns_uid !== "" && $this->lns_uid !== null))) {
|
||||
|
||||
$this->aBpmnLaneset = BpmnLanesetPeer::retrieveByPK($this->lns_uid, $con);
|
||||
|
||||
/* The following can be used instead of the line above to
|
||||
guarantee the related object contains a reference
|
||||
to this object, but this level of coupling
|
||||
may be undesirable in many circumstances.
|
||||
As it can lead to a db query with many results that may
|
||||
never be used.
|
||||
$obj = BpmnLanesetPeer::retrieveByPK($this->lns_uid, $con);
|
||||
$obj->addBpmnLanesets($this);
|
||||
*/
|
||||
}
|
||||
return $this->aBpmnLaneset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -79,18 +79,6 @@ abstract class BaseBpmnLaneset extends BaseObject implements Persistent
|
||||
*/
|
||||
protected $aBpmnProcess;
|
||||
|
||||
/**
|
||||
* Collection to store aggregation of collBpmnLanes.
|
||||
* @var array
|
||||
*/
|
||||
protected $collBpmnLanes;
|
||||
|
||||
/**
|
||||
* The criteria used to select the current contents of collBpmnLanes.
|
||||
* @var Criteria
|
||||
*/
|
||||
protected $lastBpmnLaneCriteria = null;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
@@ -501,14 +489,6 @@ abstract class BaseBpmnLaneset extends BaseObject implements Persistent
|
||||
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
|
||||
}
|
||||
|
||||
if ($this->collBpmnLanes !== null) {
|
||||
foreach($this->collBpmnLanes as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted()) {
|
||||
$affectedRows += $referrerFK->save($con);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->alreadyInSave = false;
|
||||
}
|
||||
return $affectedRows;
|
||||
@@ -598,14 +578,6 @@ abstract class BaseBpmnLaneset extends BaseObject implements Persistent
|
||||
}
|
||||
|
||||
|
||||
if ($this->collBpmnLanes !== null) {
|
||||
foreach($this->collBpmnLanes as $referrerFK) {
|
||||
if (!$referrerFK->validate($columns)) {
|
||||
$failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->alreadyInValidation = false;
|
||||
}
|
||||
@@ -895,18 +867,6 @@ abstract class BaseBpmnLaneset extends BaseObject implements Persistent
|
||||
$copyObj->setLnsState($this->lns_state);
|
||||
|
||||
|
||||
if ($deepCopy) {
|
||||
// important: temporarily setNew(false) because this affects the behavior of
|
||||
// the getter/setter methods for fkey referrer objects.
|
||||
$copyObj->setNew(false);
|
||||
|
||||
foreach($this->getBpmnLanes() as $relObj) {
|
||||
$copyObj->addBpmnLane($relObj->copy($deepCopy));
|
||||
}
|
||||
|
||||
} // if ($deepCopy)
|
||||
|
||||
|
||||
$copyObj->setNew(true);
|
||||
|
||||
$copyObj->setLnsUid(''); // this is a pkey column, so set to default value
|
||||
@@ -1052,161 +1012,5 @@ abstract class BaseBpmnLaneset extends BaseObject implements Persistent
|
||||
}
|
||||
return $this->aBpmnProcess;
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporary storage of collBpmnLanes to save a possible db hit in
|
||||
* the event objects are add to the collection, but the
|
||||
* complete collection is never requested.
|
||||
* @return void
|
||||
*/
|
||||
public function initBpmnLanes()
|
||||
{
|
||||
if ($this->collBpmnLanes === null) {
|
||||
$this->collBpmnLanes = array();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If this collection has already been initialized with
|
||||
* an identical criteria, it returns the collection.
|
||||
* Otherwise if this BpmnLaneset has previously
|
||||
* been saved, it will retrieve related BpmnLanes from storage.
|
||||
* If this BpmnLaneset is new, it will return
|
||||
* an empty collection or the current collection, the criteria
|
||||
* is ignored on a new object.
|
||||
*
|
||||
* @param Connection $con
|
||||
* @param Criteria $criteria
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getBpmnLanes($criteria = null, $con = null)
|
||||
{
|
||||
// include the Peer class
|
||||
include_once 'classes/model/om/BaseBpmnLanePeer.php';
|
||||
if ($criteria === null) {
|
||||
$criteria = new Criteria();
|
||||
}
|
||||
elseif ($criteria instanceof Criteria)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
}
|
||||
|
||||
if ($this->collBpmnLanes === null) {
|
||||
if ($this->isNew()) {
|
||||
$this->collBpmnLanes = array();
|
||||
} else {
|
||||
|
||||
$criteria->add(BpmnLanePeer::LNS_UID, $this->getLnsUid());
|
||||
|
||||
BpmnLanePeer::addSelectColumns($criteria);
|
||||
$this->collBpmnLanes = BpmnLanePeer::doSelect($criteria, $con);
|
||||
}
|
||||
} else {
|
||||
// criteria has no effect for a new object
|
||||
if (!$this->isNew()) {
|
||||
// the following code is to determine if a new query is
|
||||
// called for. If the criteria is the same as the last
|
||||
// one, just return the collection.
|
||||
|
||||
|
||||
$criteria->add(BpmnLanePeer::LNS_UID, $this->getLnsUid());
|
||||
|
||||
BpmnLanePeer::addSelectColumns($criteria);
|
||||
if (!isset($this->lastBpmnLaneCriteria) || !$this->lastBpmnLaneCriteria->equals($criteria)) {
|
||||
$this->collBpmnLanes = BpmnLanePeer::doSelect($criteria, $con);
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->lastBpmnLaneCriteria = $criteria;
|
||||
return $this->collBpmnLanes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of related BpmnLanes.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct
|
||||
* @param Connection $con
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function countBpmnLanes($criteria = null, $distinct = false, $con = null)
|
||||
{
|
||||
// include the Peer class
|
||||
include_once 'classes/model/om/BaseBpmnLanePeer.php';
|
||||
if ($criteria === null) {
|
||||
$criteria = new Criteria();
|
||||
}
|
||||
elseif ($criteria instanceof Criteria)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
}
|
||||
|
||||
$criteria->add(BpmnLanePeer::LNS_UID, $this->getLnsUid());
|
||||
|
||||
return BpmnLanePeer::doCount($criteria, $distinct, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called to associate a BpmnLane object to this object
|
||||
* through the BpmnLane foreign key attribute
|
||||
*
|
||||
* @param BpmnLane $l BpmnLane
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function addBpmnLane(BpmnLane $l)
|
||||
{
|
||||
$this->collBpmnLanes[] = $l;
|
||||
$l->setBpmnLaneset($this);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If this collection has already been initialized with
|
||||
* an identical criteria, it returns the collection.
|
||||
* Otherwise if this BpmnLaneset is new, it will return
|
||||
* an empty collection; or if this BpmnLaneset has previously
|
||||
* been saved, it will retrieve related BpmnLanes from storage.
|
||||
*
|
||||
* This method is protected by default in order to keep the public
|
||||
* api reasonable. You can provide public methods for those you
|
||||
* actually need in BpmnLaneset.
|
||||
*/
|
||||
public function getBpmnLanesJoinBpmnProject($criteria = null, $con = null)
|
||||
{
|
||||
// include the Peer class
|
||||
include_once 'classes/model/om/BaseBpmnLanePeer.php';
|
||||
if ($criteria === null) {
|
||||
$criteria = new Criteria();
|
||||
}
|
||||
elseif ($criteria instanceof Criteria)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
}
|
||||
|
||||
if ($this->collBpmnLanes === null) {
|
||||
if ($this->isNew()) {
|
||||
$this->collBpmnLanes = array();
|
||||
} else {
|
||||
|
||||
$criteria->add(BpmnLanePeer::LNS_UID, $this->getLnsUid());
|
||||
|
||||
$this->collBpmnLanes = BpmnLanePeer::doSelectJoinBpmnProject($criteria, $con);
|
||||
}
|
||||
} else {
|
||||
// the following code is to determine if a new query is
|
||||
// called for. If the criteria is the same as the last
|
||||
// one, just return the collection.
|
||||
|
||||
$criteria->add(BpmnLanePeer::LNS_UID, $this->getLnsUid());
|
||||
|
||||
if (!isset($this->lastBpmnLaneCriteria) || !$this->lastBpmnLaneCriteria->equals($criteria)) {
|
||||
$this->collBpmnLanes = BpmnLanePeer::doSelectJoinBpmnProject($criteria, $con);
|
||||
}
|
||||
}
|
||||
$this->lastBpmnLaneCriteria = $criteria;
|
||||
|
||||
return $this->collBpmnLanes;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3284,55 +3284,6 @@ abstract class BaseBpmnProject extends BaseObject implements Persistent
|
||||
$l->setBpmnProject($this);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If this collection has already been initialized with
|
||||
* an identical criteria, it returns the collection.
|
||||
* Otherwise if this BpmnProject is new, it will return
|
||||
* an empty collection; or if this BpmnProject has previously
|
||||
* been saved, it will retrieve related BpmnLanes from storage.
|
||||
*
|
||||
* This method is protected by default in order to keep the public
|
||||
* api reasonable. You can provide public methods for those you
|
||||
* actually need in BpmnProject.
|
||||
*/
|
||||
public function getBpmnLanesJoinBpmnLaneset($criteria = null, $con = null)
|
||||
{
|
||||
// include the Peer class
|
||||
include_once 'classes/model/om/BaseBpmnLanePeer.php';
|
||||
if ($criteria === null) {
|
||||
$criteria = new Criteria();
|
||||
}
|
||||
elseif ($criteria instanceof Criteria)
|
||||
{
|
||||
$criteria = clone $criteria;
|
||||
}
|
||||
|
||||
if ($this->collBpmnLanes === null) {
|
||||
if ($this->isNew()) {
|
||||
$this->collBpmnLanes = array();
|
||||
} else {
|
||||
|
||||
$criteria->add(BpmnLanePeer::PRJ_UID, $this->getPrjUid());
|
||||
|
||||
$this->collBpmnLanes = BpmnLanePeer::doSelectJoinBpmnLaneset($criteria, $con);
|
||||
}
|
||||
} else {
|
||||
// the following code is to determine if a new query is
|
||||
// called for. If the criteria is the same as the last
|
||||
// one, just return the collection.
|
||||
|
||||
$criteria->add(BpmnLanePeer::PRJ_UID, $this->getPrjUid());
|
||||
|
||||
if (!isset($this->lastBpmnLaneCriteria) || !$this->lastBpmnLaneCriteria->equals($criteria)) {
|
||||
$this->collBpmnLanes = BpmnLanePeer::doSelectJoinBpmnLaneset($criteria, $con);
|
||||
}
|
||||
}
|
||||
$this->lastBpmnLaneCriteria = $criteria;
|
||||
|
||||
return $this->collBpmnLanes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Temporary storage of collBpmnParticipants to save a possible db hit in
|
||||
* the event objects are add to the collection, but the
|
||||
|
||||
@@ -3700,9 +3700,6 @@
|
||||
<foreign-key name="fk_bpmn_lane_project" foreignTable="BPMN_PROJECT">
|
||||
<reference local="PRJ_UID" foreign="PRJ_UID"/>
|
||||
</foreign-key>
|
||||
<foreign-key name="fk_bpmn_lane_laneset" foreignTable="BPMN_LANESET">
|
||||
<reference local="LNS_UID" foreign="LNS_UID"/>
|
||||
</foreign-key>
|
||||
<index name="BPMN_LANE_I_1">
|
||||
<index-column name="LAN_UID"/>
|
||||
</index>
|
||||
|
||||
@@ -1997,10 +1997,7 @@ CREATE TABLE `BPMN_LANE`
|
||||
KEY `BPMN_LANE_I_3`(`LNS_UID`),
|
||||
CONSTRAINT `fk_bpmn_lane_project`
|
||||
FOREIGN KEY (`PRJ_UID`)
|
||||
REFERENCES `BPMN_PROJECT` (`PRJ_UID`),
|
||||
CONSTRAINT `fk_bpmn_lane_laneset`
|
||||
FOREIGN KEY (`LNS_UID`)
|
||||
REFERENCES `BPMN_LANESET` (`LNS_UID`)
|
||||
REFERENCES `BPMN_PROJECT` (`PRJ_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- BPMN_PARTICIPANT
|
||||
|
||||
@@ -62,25 +62,25 @@ class Bpmn extends Handler
|
||||
|
||||
protected static $excludeFields = array(
|
||||
"activity" => array(
|
||||
"PRJ_UID", "PRO_UID", "BOU_ELEMENT", "BOU_ELEMENT_TYPE", "BOU_REL_POSITION",
|
||||
"PRJ_UID", "PRO_UID", "BOU_ELEMENT_TYPE", "BOU_REL_POSITION",
|
||||
"BOU_SIZE_IDENTICAL", "DIA_UID", "BOU_UID", "ELEMENT_UID"
|
||||
),
|
||||
"event" => array(
|
||||
"PRJ_UID", "PRO_UID", "BOU_ELEMENT", "BOU_ELEMENT_TYPE", "BOU_REL_POSITION",
|
||||
"PRJ_UID", "PRO_UID", "BOU_ELEMENT_TYPE", "BOU_REL_POSITION",
|
||||
"BOU_SIZE_IDENTICAL", "DIA_UID", "BOU_UID", "ELEMENT_UID", "EVN_ATTACHED_TO", "EVN_CONDITION"
|
||||
),
|
||||
"gateway" => array("BOU_ELEMENT", "BOU_ELEMENT_TYPE", "BOU_REL_POSITION", "BOU_SIZE_IDENTICAL", "BOU_UID",
|
||||
"gateway" => array("BOU_ELEMENT_TYPE", "BOU_REL_POSITION", "BOU_SIZE_IDENTICAL", "BOU_UID",
|
||||
"DIA_UID", "ELEMENT_UID", "PRJ_UID", "PRO_UID"
|
||||
),
|
||||
"artifact" => array(
|
||||
"PRJ_UID", "PRO_UID", "BOU_ELEMENT", "BOU_ELEMENT_TYPE", "BOU_REL_POSITION",
|
||||
"PRJ_UID", "PRO_UID", "BOU_ELEMENT_TYPE", "BOU_REL_POSITION",
|
||||
"BOU_SIZE_IDENTICAL", "DIA_UID", "BOU_UID", "ELEMENT_UID"
|
||||
),
|
||||
"flow" => array("PRJ_UID", "DIA_UID", "FLO_ELEMENT_DEST_PORT", "FLO_ELEMENT_ORIGIN_PORT"),
|
||||
"data" => array("PRJ_UID"),
|
||||
"participant" => array("PRJ_UID"),
|
||||
"laneset" => array(),
|
||||
"lane" => array()
|
||||
"laneset" => array("BOU_ELEMENT_TYPE", "BOU_SIZE_IDENTICAL", "BOU_UID"),
|
||||
"lane" => array("BOU_ELEMENT_TYPE", "BOU_SIZE_IDENTICAL", "BOU_UID")
|
||||
);
|
||||
|
||||
|
||||
@@ -182,12 +182,12 @@ class Bpmn extends Handler
|
||||
foreach ($this->getParticipants() as $participant) {
|
||||
$this->removeParticipant($participant["PAR_UID"]);
|
||||
}
|
||||
foreach ($this->getLanesets() as $laneset) {
|
||||
$this->removeLaneset($laneset["LNS_UID"]);
|
||||
}
|
||||
foreach ($this->getLanes() as $lane) {
|
||||
$this->removeLane($lane["LAN_UID"]);
|
||||
}
|
||||
foreach ($this->getLanesets() as $laneset) {
|
||||
$this->removeLaneset($laneset["LNS_UID"]);
|
||||
}
|
||||
if ($process = $this->getProcess("object")) {
|
||||
$process->delete();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user