Merge branch 'master' of bitbucket.org:colosa/processmaker

This commit is contained in:
Erik Amaru Ortiz
2014-01-16 11:35:54 -04:00
7 changed files with 296 additions and 233 deletions

View File

@@ -1,103 +1,128 @@
@ProcessMakerMichelangelo @RestAPI
Feature: Input Documents Resources
Background:
Given that I have a valid access_token
#GET /api/1.0/{workspace}/project/{prj_uid}/input-documents
# Get a List Input Documents of a Project
Scenario: Get a List Input Documents of a Project
Given that I have a valid access_token
And I request "project/14414793652a5d718b65590036026581/input-documents"
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 "array"
And the json data is an empty array
And the response has 0 records
#POST /api/1.0/{workspace}/project/{prj_uid}/input-document
# Create a new Input Document for a Project
Scenario: Create "My InputDocument1" for a Project
Given that I have a valid access_token
And POST this data:
#Create a new Input Document for a Project
Scenario Outline: Create a new Inputs Documents for a Project
Given POST this data:
"""
{
"inp_doc_title": "My InputDocument1",
"inp_doc_description": "My InputDocument1 DESCRIPTION",
"inp_doc_form_needed": "VIRTUAL",
"inp_doc_original": "ORIGINAL",
"inp_doc_published": "PRIVATE",
"inp_doc_versioning": 1,
"inp_doc_destination_path": "",
"inp_doc_tags": "INPUT"
"inp_doc_title": "<inp_doc_title>",
"inp_doc_description": "<inp_doc_description>",
"inp_doc_form_needed": "<inp_doc_form_needed>",
"inp_doc_original": "<inp_doc_original>",
"inp_doc_published": "<inp_doc_published>",
"inp_doc_versioning": "<inp_doc_versioning>",
"inp_doc_destination_path": "<inp_doc_destination_path>",
"inp_doc_tags": "<inp_doc_tags>"
}
"""
And I request "project/14414793652a5d718b65590036026581/input-document"
And the content type is "application/json"
And I request "project/<project>/input-document"
Then the response status code should be 201
And the content type is "application/json"
And the response charset is "UTF-8"
And the type is "object"
And store "inp_doc_uid" in session array as variable "indoc1"
And store "inp_doc_uid" in session array as variable "inp_doc_uid_<inp_doc_number>"
#POST /api/1.0/{workspace}/project/{prj_uid}/input-document
# Create a new Input Document for a Project
Scenario: Create "My InputDocument2" for a Project
Given that I have a valid access_token
And POST this data:
"""
{
"inp_doc_title": "My InputDocument2",
"inp_doc_description": "My InputDocument2 DESCRIPTION",
"inp_doc_form_needed": "VIRTUAL",
"inp_doc_original": "ORIGINAL",
"inp_doc_published": "PRIVATE",
"inp_doc_versioning": 1,
"inp_doc_destination_path": "",
"inp_doc_tags": "INPUT"
}
"""
And I request "project/14414793652a5d718b65590036026581/input-document"
Examples:
| project | inp_doc_number | inp_doc_title | inp_doc_description | inp_doc_form_needed | inp_doc_original | inp_doc_published | inp_doc_versioning | inp_doc_destination_path | inp_doc_tags": "INPUT |
| 14414793652a5d718b65590036026581 | 1 | My InputDocument1 | My InputDocument1 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | 2 | My InputDocument2 | My InputDocument2 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | 3 | My InputDocument3 | My InputDocument3 DESCRIPTION | REAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | 4 | My InputDocument4 | My InputDocument4 DESCRIPTION | VREAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | 5 | My InputDocument5 | My InputDocument5 DESCRIPTION | VIRTUAL | COPY | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | 6 | My InputDocument6 | My InputDocument6 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 0 | | INPUT |
| 14414793652a5d718b65590036026581 | 7 | My InputDocument7 | My InputDocument7 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | /my/path | INPUT |
| 14414793652a5d718b65590036026581 | 8 | My InputDocument8 | My InputDocument8 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | 9 | My InputDocument9 | My InputDocument9 DESCRIPTION | REAL | ORIGINAL | PRIVATE | 1 | | INPUT |
#GET /api/1.0/{workspace}/project/{prj_uid}/input-documents
# Get a List Input Documents of a Project
Scenario: Get a List Input Documents of a Project
And I request "project/14414793652a5d718b65590036026581/input-documents"
And the content type is "application/json"
Then the response status code should be 201
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "object"
And store "inp_doc_uid" in session array as variable "indoc2"
And the type is "array"
And the response has 9 records
#PUT /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
# Update an Input Document for a Project
Scenario: Update an Input Document for a Project
Given that I have a valid access_token
And PUT this data:
Scenario Outline: Update an Input Document for a Project
Given PUT this data:
"""
{
"inp_doc_title": "My InputDocument1 Modified",
"inp_doc_description": "My InputDocument1 DESCRIPTION Modified",
"inp_doc_form_needed": "VIRTUAL",
"inp_doc_original": "ORIGINAL",
"inp_doc_published": "PRIVATE"
"inp_doc_title": "<inp_doc_title>",
"inp_doc_description": "<inp_doc_description>",
"inp_doc_form_needed": "<inp_doc_form_needed>",
"inp_doc_original": "<inp_doc_original>",
"inp_doc_published": "<inp_doc_published>",
"inp_doc_versioning": "<inp_doc_versioning>",
"inp_doc_destination_path": "<inp_doc_destination_path>",
"inp_doc_tags": "<inp_doc_tags>"
}
"""
And that I want to update a resource with the key "indoc1" stored in session array
And I request "project/14414793652a5d718b65590036026581/input-document"
And that I want to update a resource with the key "inp_doc_uid" stored in session array as variable "inp_doc_uid_<inp_doc_number>"
And I request "project/<project>/input-document"
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:
| project | inp_doc_number | inp_doc_title | inp_doc_description | inp_doc_form_needed | inp_doc_original | inp_doc_published | inp_doc_versioning | inp_doc_destination_path | inp_doc_tags |
| 14414793652a5d718b65590036026581 | 1 | My InputDocument1 'UPDATE' | My InputDocument1 DESCRIPTION-update| VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | 2 | My InputDocument2 'UPDATE' | My InputDocument2 DESCRIPTION-update| VREAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | 3 | My InputDocument3 'UPDATE' | My InputDocument3 DESCRIPTION-update| REAL | ORIGINAL | PRIVATE | 1 | | INPUT |
Scenario Outline: Get a input Document
Given that I want to get a resource with the key "inp_doc_uid" stored in session array as variable "inp_doc_uid_<inp_doc_number>"
And I request "project/<project>/input-document"
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"
And that "inp_doc_title" is set to "My InputDocument1 Modified"
And that "inp_doc_title" is set to "<inp_doc_title>"
And that "inp_doc_description" is set to "<inp_doc_description>"
And that "inp_doc_form_needed" is set to "<inp_doc_form_needed>"
Examples:
| project | inp_doc_number | inp_doc_title | inp_doc_description | inp_doc_form_needed |
| 14414793652a5d718b65590036026581 | 1 | My InputDocument1 'UPDATE' | My InputDocument1 DESCRIPTION-update| VIRTUAL |
| 14414793652a5d718b65590036026581 | 2 | My InputDocument2 'UPDATE' | My InputDocument2 DESCRIPTION-update| VREAL |
| 14414793652a5d718b65590036026581 | 3 | My InputDocument3 'UPDATE' | My InputDocument3 DESCRIPTION-update| REAL |
#GET /api/1.0/{workspace}/project/{prj_uid}/input-documents
# Get a List Input Documents of a Project
Scenario: Get a List Input Documents of a Project
Given that I have a valid access_token
And I request "project/14414793652a5d718b65590036026581/input-documents"
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 "array"
And the "inp_doc_title" property in row 0 equals "My InputDocument1 Modified"
And the "inp_doc_description" property in row 0 equals "My InputDocument1 DESCRIPTION Modified"
#GET /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
# Get a single Input Document of a Project
Scenario: Get a single Input Document of a Project
Given that I have a valid access_token
And that I want to get a resource with the key "indoc1" stored in session array
Given that I want to get a resource with the key "inp_doc_uid_1" stored in session array
And I request "project/14414793652a5d718b65590036026581/input-document"
And the content type is "application/json"
Then the response status code should be 200
@@ -106,34 +131,80 @@ Feature: Input Documents Resources
And that "inp_doc_title" is set to "My InputDocument1 Modified"
And that "inp_doc_description" is set to "My InputDocument1 DESCRIPTION Modified"
#DELETE /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
# Delete an Input Document of a Project
Scenario: Delete a previously created Input Document
Given that I have a valid access_token
And that I want to delete a resource with the key "indoc1" stored in session array
And I request "project/14414793652a5d718b65590036026581/input-document"
And the content type is "application/json"
Then the response status code should be 200
And the response charset is "UTF-8"
#DELETE /api/1.0/{workspace}/project/{prj_uid}/input-document/{inp_doc_uid}
# Delete an Input Document of a Project
Scenario: Delete a previously created Input Document
Given that I have a valid access_token
And that I want to delete a resource with the key "indoc2" stored in session array
And I request "project/14414793652a5d718b65590036026581/input-document"
Scenario Outline: Delete a previously created Input Document
Given that I want to delete a resource with the key "inp_out_uid" stored in session array as variable "inp_doc_uid_<inp_doc_number>"
And I request "project/<project>/input-document"
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:
| project | inp_doc_number |
| 14414793652a5d718b65590036026581 | 1 |
| 14414793652a5d718b65590036026581 | 2 |
| 14414793652a5d718b65590036026581 | 3 |
| 14414793652a5d718b65590036026581 | 4 |
| 14414793652a5d718b65590036026581 | 5 |
| 14414793652a5d718b65590036026581 | 6 |
| 14414793652a5d718b65590036026581 | 7 |
| 14414793652a5d718b65590036026581 | 8 |
| 14414793652a5d718b65590036026581 | 9 |
#GET /api/1.0/{workspace}/project/{prj_uid}/input-documents
# Get a List Input Documents of a Project
Scenario: Get a List Input Documents of a Project
Given that I have a valid access_token
And I request "project/14414793652a5d718b65590036026581/input-documents"
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 "array"
And the json data is an empty array
And the response has 0 records
#POST /api/1.0/{workspace}/project/{prj_uid}/input-document
#Create a new Input Document for a Project
Scenario Outline: Create a new Inputs Documents for a Project
Given POST this data:
"""
{
"inp_doc_title": "<inp_doc_title>",
"inp_doc_description": "<inp_doc_description>",
"inp_doc_form_needed": "<inp_doc_form_needed>",
"inp_doc_original": "<inp_doc_original>",
"inp_doc_published": "<inp_doc_published>",
"inp_doc_versioning": "<inp_doc_versioning>",
"inp_doc_destination_path": "<inp_doc_destination_path>",
"inp_doc_tags": "<inp_doc_tags>"
}
"""
And I request "project/<project>/input-document"
Then the response status code should be 400
Examples:
| project | inp_doc_title | inp_doc_description | inp_doc_form_needed | inp_doc_original | inp_doc_published | inp_doc_versioning | inp_doc_destination_path | inp_doc_tags |
| 14414793652a5d718b65590036 | My InputDocument1 | My InputDocument1 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument2 !@#$%^&*€¤½¼‘¾¡²¤³ | My InputDocument2 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument3 | My InputDocument3 !@#$%^&*€¤½¼‘¾¡²¤³| REAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument4 | My InputDocument4 DESCRIPTION | VRESAMPLE12334$%#@ | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument5 | My InputDocument5 DESCRIPTION | VIRTUAL | COORIGI 123@#$%$% | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument6 | My InputDocument6 DESCRIPTION | VIRTUAL | ORIGINAL | PRIV123234@##$$%% | 0 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument7 | My InputDocument7 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 87 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument8 | My InputDocument8 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | /my#@$#%/path324@$@@ | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument9 | My InputDocument9 DESCRIPTION | REAL | ORIGINAL | PRIVATE | 1 | | INPU455 @##$$³¤¤ |
| | My InputDocument10 | My InputDocument10 DESCRIPTION | VIRTUAL | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument11 | My InputDocument11 DESCRIPTION | | ORIGINAL | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument12 | My InputDocument12 DESCRIPTION | REAL | | PRIVATE | 1 | | INPUT |
| 14414793652a5d718b65590036026581 | My InputDocument13 | My InputDocument13 DESCRIPTION | VREAL | ORIGINAL | | 1 | | INPUT |

View File

@@ -16,7 +16,7 @@ Feature: Output Documents Resources
@2: TEST FOR GET SINGLE OUTPUT DOCUMENT /--------------------------------------------------------------------
Scenario: Get a single output document of a project
Given I request "project/4224292655297723eb98691001100052/output-document/270088687529c8ace5e5272077582449"
Given I request "project/4224292655297723eb98691001100052/output-document/59969646352d6cd3caa0751003892895"
Then the response status code should be 200
And the response charset is "UTF-8"
And the content type is "application/json"
@@ -63,14 +63,24 @@ Feature: Output Documents Resources
Examples:
| project | out_doc_number | out_doc_title | out_doc_description |out_doc_filename | out_doc_template | out_doc_report_generator | out_doc_landscape | out_doc_media | out_doc_left_margin | out_doc_right_margin | out_doc_top_margin | out_doc_bottom_margin | out_doc_generate | out_doc_type | out_doc_current_revision | out_doc_field_mapping | out_doc_versioning | out_doc_destination_path | out_doc_tags | out_doc_pdf_security_enabled | out_doc_pdf_security_open_password | out_doc_pdf_security_owner_password | out_doc_pdf_security_permissions |
| 4224292655297723eb98691001100052 | 1 | Endpoint Old Version | Output Document old version - EndPoint | Output 1 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY | Output Document old version PDF SECURITY | Output 2 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | 3 | Endpoint Old Version Doc | Output Document old version solo doc | Output 3 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 4 | Endpoint Old Version PDF | Output Document old version solo pdf | Output 4 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | 5 | Endpoint New Version | Output Document new version - EndPoint | Output 5 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY | Output Document new version PDF SECURITY | Output 6 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | 7 | Endpoint New Version Doc | Output Document new version solo doc | Output 7 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 8 | Endpoint New Version PDF | Output Document new version solo pdf | Output 8 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | 1 | Endpoint Old Version | Output Document old version - EndPoint | Output 1 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY | Output Document old version PDF SECURITY | Output 2 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | 3 | Endpoint Old Version Doc | Output Document old version solo doc | Output 3 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 4 | Endpoint Old Version PDF | Output Document old version solo pdf | Output 4 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | 5 | Endpoint New Version | Output Document new version - EndPoint | Output 5 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY | Output Document new version PDF SECURITY | Output 6 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | 7 | Endpoint New Version Doc | Output Document new version solo doc | Output 7 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 8 | Endpoint New Version PDF | Output Document new version solo pdf | Output 8 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | 9 | test !@#$%^&*€¤¾½²³€¼½¼ | Output Document old version - EndPoint | Output 9 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 10 | Endpoint Old1 | test %^&*¤¾½²³ | Output 10 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | 11 | Endpoint Old Version Doc 2 | Output Document old version solo doc | Output @#$%^&*€¤ | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 12 | Endpoint Old Version PDF 3 | Output Document old version solo pdf | Output 11 | sample @#$%^&*€¤ | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | 13 | Endpoint New Version Doc 14 | Output Document new version solo doc | Output 12 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | DOC | HTML | 0 | 324#$%%^^@@ | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 14 | Endpoint New Version 16 | Output Document new version - EndPoint | Output 13 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | 23rg@#$% | | 0 | | | |
| 4224292655297723eb98691001100052 | 15 | Endpoint New Version PDF SECURI17 | Output Document new version PDF SECURITY | Output 14 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | vfv23@$@% | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | 16 | Endpoint New Version PDF 19 | Output Document new version solo pdf | Output 15 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample432@$#@$¼€¼½ | sample | print |
| 4224292655297723eb98691001100052 | 17 | Endpoint New Version 20 | Output Document new version - EndPoint | Output 16 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | sample432@$#@$¼€¼½ | |
@4: TEST FOR GET OUTPUT DOCUMENT /--------------------------------------------------------------------
@@ -80,7 +90,7 @@ Feature: Output Documents Resources
And the response charset is "UTF-8"
And the content type is "application/json"
And the type is "array"
And the response has 10 records
And the response has 19 records
@5: TEST FOR PUT UPDATE OUTPUT DOCUMENT /--------------------------------------------------------------------
@@ -123,10 +133,10 @@ Feature: Output Documents Resources
Examples:
| project | out_doc_number | out_doc_title | out_doc_description |out_doc_filename | out_doc_template | out_doc_report_generator | out_doc_landscape | out_doc_media | out_doc_left_margin | out_doc_right_margin | out_doc_top_margin | out_doc_bottom_margin | out_doc_generate | out_doc_type | out_doc_current_revision | out_doc_field_mapping | out_doc_versioning | out_doc_destination_path | out_doc_tags | out_doc_pdf_security_enabled | out_doc_pdf_security_open_password | out_doc_pdf_security_owner_password | out_doc_pdf_security_permissions |
| 4224292655297723eb98691001100052 | 1 | Endpoint Old Version UPDATE | Output Document old version - UPDATE | Output 1 | | HTML2PDF | 0 | Letter | 20 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY UPDATE | Output UPDATE old version PDF SECURITY | Output 2 | | HTML2PDF | 1 | Legal | 20 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\| modify\|copy |
| 4224292655297723eb98691001100052 | 5 | Endpoint New Version UPDATE | Output UPDATE new version - EndPoint | Output 5 | | TCPDF | 0 | Letter | 30 | 20 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY UPDATE | Output UPDATE new version PDF SECURITY | Output 6 | | TCPDF | 1 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy |
| 4224292655297723eb98691001100052 | 1 | Endpoint Old Version UPDATE | Output Document old version - UPDATE | Output 1 | | HTML2PDF | 0 | Letter | 20 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY UPDATE | Output UPDATE old version PDF SECURITY | Output 2 | | HTML2PDF | 1 | Legal | 20 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy |
| 4224292655297723eb98691001100052 | 5 | Endpoint New Version UPDATE | Output UPDATE new version - EndPoint | Output 5 | | TCPDF | 0 | Letter | 30 | 20 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY UPDATE | Output UPDATE new version PDF SECURITY | Output 6 | | TCPDF | 1 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy |
@@ -146,10 +156,10 @@ Feature: Output Documents Resources
Examples:
| project | out_doc_number | out_doc_title | out_doc_description |out_doc_filename |
| 4224292655297723eb98691001100052 | 1 | Endpoint Old Version UPDATE | Output Document old version - UPDATE | Output 1 |
| 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY UPDATE | Output UPDATE old version PDF SECURITY | Output 2 |
| 4224292655297723eb98691001100052 | 5 | Endpoint New Version UPDATE | Output UPDATE new version - EndPoint | Output 5 |
| 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY UPDATE | Output UPDATE new version PDF SECURITY | Output 6 |
| 4224292655297723eb98691001100052 | 1 | Endpoint Old Version UPDATE | Output Document old version - UPDATE | Output 1 |
| 4224292655297723eb98691001100052 | 2 | Endpoint Old Version PDF SECURITY UPDATE | Output UPDATE old version PDF SECURITY | Output 2 |
| 4224292655297723eb98691001100052 | 5 | Endpoint New Version UPDATE | Output UPDATE new version - EndPoint | Output 5 |
| 4224292655297723eb98691001100052 | 6 | Endpoint New Version PDF SECURITY UPDATE | Output UPDATE new version PDF SECURITY | Output 6 |
@@ -167,14 +177,23 @@ Feature: Output Documents Resources
Examples:
| project | out_doc_number |
| 4224292655297723eb98691001100052 | 1 |
| 4224292655297723eb98691001100052 | 2 |
| 4224292655297723eb98691001100052 | 3 |
| 4224292655297723eb98691001100052 | 4 |
| 4224292655297723eb98691001100052 | 5 |
| 4224292655297723eb98691001100052 | 6 |
| 4224292655297723eb98691001100052 | 7 |
| 4224292655297723eb98691001100052 | 8 |
| 4224292655297723eb98691001100052 | 1 |
| 4224292655297723eb98691001100052 | 2 |
| 4224292655297723eb98691001100052 | 3 |
| 4224292655297723eb98691001100052 | 4 |
| 4224292655297723eb98691001100052 | 5 |
| 4224292655297723eb98691001100052 | 6 |
| 4224292655297723eb98691001100052 | 7 |
| 4224292655297723eb98691001100052 | 8 |
| 4224292655297723eb98691001100052 | 9 |
| 4224292655297723eb98691001100052 | 10 |
| 4224292655297723eb98691001100052 | 11 |
| 4224292655297723eb98691001100052 | 12 |
| 4224292655297723eb98691001100052 | 13 |
| 4224292655297723eb98691001100052 | 14 |
| 4224292655297723eb98691001100052 | 15 |
| 4224292655297723eb98691001100052 | 16 |
| 4224292655297723eb98691001100052 | 17 |
@8: TEST FOR GET OUTPUT DOCUMENT /--------------------------------------------------------------------
@@ -224,10 +243,6 @@ Feature: Output Documents Resources
Examples:
| project | out_doc_title | out_doc_description |out_doc_filename | out_doc_template | out_doc_report_generator | out_doc_landscape | out_doc_media | out_doc_left_margin | out_doc_right_margin | out_doc_top_margin | out_doc_bottom_margin | out_doc_generate | out_doc_type | out_doc_current_revision | out_doc_field_mapping | out_doc_versioning | out_doc_destination_path | out_doc_tags | out_doc_pdf_security_enabled | out_doc_pdf_security_open_password | out_doc_pdf_security_owner_password | out_doc_pdf_security_permissions |
| 4224292655297723eb98691001100052 | test !@#$%^&*€¤¾½²³€¼½¼ | Output Document old version - EndPoint | Output 1 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint Old1 | test %^&*¤¾½²³ | Output 2 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | Endpoint Old Version Doc 2 | Output Document old version solo doc | Output @#$%^&*€¤ | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint Old Version PDF 3 | Output Document old version solo pdf | Output 4 | sample @#$%^&*€¤ | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | Endpoint New Version 4 | Output Document new version - EndPoint | Output 5 | | @#$%¼¤¾½ | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURIT5 | Output Document new version PDF SECURITY | Output 6 | | TCPDF | 34 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | Endpoint New Version Doc6 | Output Document new version solo doc | Output 7 | | TCPDF | 0 | Legal!@#$$$%^&| 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 0 | | | |
@@ -235,18 +250,11 @@ Feature: Output Documents Resources
| 4224292655297723eb98691001100052 | Endpoint New Version8 | Output Document new version - EndPoint | Output 9 | | TCPDF | 1 | Letter | 30 | 30,7.98 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURIT9 | Output Document new version PDF SECURITY | Output 10 | | TCPDF | 0 | Legal | 25 | 25 | 25,54.98 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | Endpoint New Version Doc10 | Output Document new version solo doc | Output 11 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25,34.09 | WORD | HTML | 0 | | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF 11 | Output Document new version solo pdf | Output 12 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDFtest@#$$ | HTML | 0 | | 1 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | Endpoint New Version 12 | Output Document new version - EndPoint | Output 13 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTMLsample2@#| 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF 11 | Output Document new version solo pdf | Output 12 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDtest@#$$ | HTML | 0 | | 1 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURI13 | Output Document new version PDF SECURITY | Output 14 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 45,988.566 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | Endpoint New Version Doc 14 | Output Document new version solo doc | Output 15 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 0 | 324#$%%^^@@ | 1 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF 15 | Output Document new version solo pdf | Output 16 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1,99.98 | | | 1 | sample | sample | print |
| 4224292655297723eb98691001100052 | Endpoint New Version 16 | Output Document new version - EndPoint | Output 16 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | 23rg@#$% | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURI17 | Output Document new version PDF SECURITY | Output 17 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | vfv23@$@% | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | Endpoint New Version Doc 18 | Output Document new version solo doc | Output 18 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 23454 | | | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF 19 | Output Document new version solo pdf | Output 19 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | PDF | HTML | 0 | | 1 | | | 1 | sample432@$#@$¼€¼½ | sample | print |
| 4224292655297723eb98691001100052 | Endpoint New Version 20 | Output Document new version - EndPoint | Output 20 | | TCPDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | sample432@$#@$¼€¼½ | |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURI22 | Output Document new version PDF SECURITY | Output 21 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|form\|aaa |
| 4224292655297723eb98691001100052 | Endpoint New Version PDF SECURI22 | Output Document new version PDF SECURITY | Output 21 | | TCPDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modfy\|cop\|for\|aaa |
| 4224292655297723eb98691001100052 | | Output Document old version - EndPoint | Output 22 | | HTML2PDF | 1 | Letter | 30 | 30 | 30 | 30 | BOTH | HTML | 0 | | 0 | | | 0 | | | |
| 4224292655297723eb98691001100052 | Endpoint Old Version PDF SECURITY | | Output 23 | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | BOTH | HTML | 0 | | 1 | | | 1 | sample | sample | print\|modify\|copy\|forms |
| 4224292655297723eb98691001100052 | Endpoint Old Version Doc | Output Document old version solo doc | | | HTML2PDF | 0 | Legal | 25 | 25 | 25 | 25 | WORD | HTML | 0 | | 1 | | | 0 | | | |

View File

@@ -1,109 +1,124 @@
@ProcessMakerMichelangelo @RestAPI
Feature: Process supervisor Resources
Background:
Given that I have a valid access_token
@1: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisors
Scenario: Get a List of process supervisor of a project
Given that I have a valid access_token
And I request "project/85794888452ceeef3675164057928956/process-supervisors"
Given that I request "project/85794888452ceeef3675164057928956/process-supervisors"
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 "array"
And the response has 1 records
@2: TEST FOR GET A SPECIFIC PROCESS SUPERVISOR /--------------------------------------------------------------------
#GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/{pu_uid}
Scenario: Get a specific process supervisor of a project
Given that I have a valid access_token
And I request "project/85794888452ceeef3675164057928956/process-supervisor/70662784652cef0878516f7085532841"
Given that I request "project/85794888452ceeef3675164057928956/process-supervisor/70662784652cef0878516f7085532841"
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"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#GET /api/1.0/{workspace}/project/{prj_uid}/available-process-supervisors
Scenario: Get a List of available process supervisor of a project
Given that I have a valid access_token
And I request "project/85794888452ceeef3675164057928956/available-process-supervisors"
Given that I request "project/85794888452ceeef3675164057928956/available-process-supervisors"
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 "array"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#GET /api/1.0/{workspace}/project/{prj_uid}/available-process-supervisors
Scenario: Get a List of available groups process supervisor of a project
Given that I have a valid access_token
And I request "project/85794888452ceeef3675164057928956/available-process-supervisors?obj_type=group"
Given that I request "project/85794888452ceeef3675164057928956/available-process-supervisors?obj_type=group"
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 "array"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#GET /api/1.0/{workspace}/project/{prj_uid}/available-process-supervisors
Scenario: Get a List of available users process supervisor of a project
Given that I have a valid access_token
And I request "project/85794888452ceeef3675164057928956/available-process-supervisors?obj_type=user"
Given that I request "project/85794888452ceeef3675164057928956/available-process-supervisors?obj_type=user"
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 "array"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/dynaforms
Scenario: Get a List of dynaforms process supervisor of a project
Given that I have a valid access_token
And I request "project/85794888452ceeef3675164057928956/process-supervisor/dynaforms"
Given that I request "project/85794888452ceeef3675164057928956/process-supervisor/dynaforms"
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 "array"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/dynaform/{pu_uid}
Scenario: Get a specific process supervisor of a project
Given that I have a valid access_token
And I request "project/85794888452ceeef3675164057928956/process-supervisor/dynaform/78069721352ceef1fd61878075214306"
Given that I request "project/85794888452ceeef3675164057928956/process-supervisor/dynaform/78069721352ceef1fd61878075214306"
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"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/available-dynaforms
Scenario: Get a List of available dynaforms process supervisor of a project
Given that I have a valid access_token
And I request "project/85794888452ceeef3675164057928956/process-supervisor/available-dynaforms"
Given that I request "project/85794888452ceeef3675164057928956/process-supervisor/available-dynaforms"
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 "array"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/input-documents
Scenario: Get a List of input-documents process supervisor of a project
Given that I have a valid access_token
And I request "project/85794888452ceeef3675164057928956/process-supervisor/input-documents"
Given that I request "project/85794888452ceeef3675164057928956/process-supervisor/input-documents"
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 "array"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/available-input-documents
Scenario: Get a List of input-documents process supervisor of a project
Given that I have a valid access_token
And I request "project/85794888452ceeef3675164057928956/process-supervisor/available-input-documents"
Given that I request "project/85794888452ceeef3675164057928956/process-supervisor/available-input-documents"
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 "array"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#GET /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/input-document/{pu_uid}
Scenario: Get a specific process supervisor of a project
Given that I have a valid access_token
And I request "project/85794888452ceeef3675164057928956/process-supervisor/input-document/37709187452ceef4f601dd3045365506"
Given that I request "project/85794888452ceeef3675164057928956/process-supervisor/input-document/37709187452ceef4f601dd3045365506"
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"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#POST /api/1.0/{workspace}/project/{prj_uid}/process-supervisor
Scenario: Assign a group process supervisor of a project
Given that I have a valid access_token
And POST this data:
Given that I POST this data:
"""
{
"pu_type": "GROUP_SUPERVISOR",
@@ -117,10 +132,11 @@ Feature: Process supervisor Resources
And the type is "object"
And store "pu_uid" in session array as variable "pug_uid"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#POST /api/1.0/{workspace}/project/{prj_uid}/process-supervisor
Scenario: Assign a user process supervisor of a project
Given that I have a valid access_token
And POST this data:
Given that I POST this data:
"""
{
"pu_type": "SUPERVISOR",
@@ -134,10 +150,11 @@ Feature: Process supervisor Resources
And the type is "object"
And store "pu_uid" in session array as variable "puu_uid"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#POST /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/dynaform
Scenario: Assign a dynaform process supervisor of a project
Given that I have a valid access_token
And POST this data:
Given that I POST this data:
"""
{
"dyn_uid": "78212661352ceef2dc4e987081647602"
@@ -150,10 +167,11 @@ Feature: Process supervisor Resources
And the type is "object"
And store "pud_uid" in session array as variable "pud_uid"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#POST /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/input-document
Scenario: Assign a dynaform process supervisor of a project
Given that I have a valid access_token
And POST this data:
Given that I POST this data:
"""
{
"inp_doc_uid": "25205290452ceef570741c3067266323"
@@ -166,37 +184,41 @@ Feature: Process supervisor Resources
And the type is "object"
And store "pui_uid" in session array as variable "pui_uid"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#DELETE /api/1.0/{workspace}/project/{prj_uid}/process-supervisor
Scenario: Delete a user process supervisor of a project
Given that I have a valid access_token
And that I want to delete a resource with the key "pug_uid" stored in session array
Given that I want to delete a resource with the key "pug_uid" stored in session array
And I request "project/85794888452ceeef3675164057928956/process-supervisor"
And the content type is "application/json"
Then the response status code should be 200
And the response charset is "UTF-8"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#DELETE /api/1.0/{workspace}/project/{prj_uid}/process-supervisor
Scenario: Delete a user process supervisor of a project
Given that I have a valid access_token
And that I want to delete a resource with the key "puu_uid" stored in session array
Given that I want to delete a resource with the key "puu_uid" stored in session array
And I request "project/85794888452ceeef3675164057928956/process-supervisor"
And the content type is "application/json"
Then the response status code should be 200
And the response charset is "UTF-8"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#DELETE /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/dynaform
Scenario: Delete a dynaform process supervisor of a project
Given that I have a valid access_token
And that I want to delete a resource with the key "pud_uid" stored in session array
Given that I want to delete a resource with the key "pud_uid" stored in session array
And I request "project/85794888452ceeef3675164057928956/process-supervisor/dynaform"
And the content type is "application/json"
Then the response status code should be 200
And the response charset is "UTF-8"
@3: TEST FOR GET PROCESS SUPERVISOR /--------------------------------------------------------------------
#DELETE /api/1.0/{workspace}/project/{prj_uid}/process-supervisor/input-document
Scenario: Delete a input-document process supervisor of a project
Given that I have a valid access_token
And that I want to delete a resource with the key "pui_uid" stored in session array
Given that want to delete a resource with the key "pui_uid" stored in session array
And I request "project/85794888452ceeef3675164057928956/process-supervisor/input-document"
And the content type is "application/json"
Then the response status code should be 200

View File

@@ -925,8 +925,16 @@ class RestContext extends BehatContext
public function theResponseStatusCodeShouldBe($httpStatus)
{
if ((string)$this->_response->getStatusCode() !== $httpStatus) {
$message="";
if($bodyResponse=json_decode($this->_response->getBody(true))){
if(isset($bodyResponse->error->message)){
$message = $bodyResponse->error->message;
}
}
throw new \Exception('HTTP code does not match ' . $httpStatus .
' (actual: ' . $this->_response->getStatusCode() . ")\n\n"
' (actual: ' . $this->_response->getStatusCode() . ") - $message\n\n"
);
}
}

View File

@@ -144,8 +144,9 @@ class CaseScheduler
$sDateTmp = date( 'Y-m-d' );
}
$sTimeTmp = $aData['SCH_START_TIME'];
// $aData['SCH_START_TIME'] = date( 'Y-m-d', strtotime( $sDateTmp ) ) . ' ' . date( 'H:i:s', strtotime( $sTimeTmp ) );
// $aData['SCH_START_DATE'] = date( 'Y-m-d', strtotime( $sDateTmp ) ) . ' ' . date( 'H:i:s', strtotime( $sTimeTmp ) );
//echo $sDateTmp ." ------- " .$sTimeTmp; die();
// $aData['SCH_START_TIME'] = date( 'Y-m-d', strtotime( $sDateTmp ) ) . ' ' . date( 'H:i:s', strtotime( $sTimeTmp ) );
// $aData['SCH_START_DATE'] = date( 'Y-m-d', strtotime( $sDateTmp ) ) . ' ' . date( 'H:i:s', strtotime( $sTimeTmp ) );
$nActualTime = $aData['SCH_START_TIME']; // time();
$sValue = '';
$sDaysPerformTask = '';
@@ -167,8 +168,8 @@ class CaseScheduler
$aData['SCH_WEEK_DAYS'] = '1|2|3|4|5|'; //check
break;
case '3': // Every [n] Days
$sDaysPerformTask = $aData['SCH_DAYS_PERFORM_TASK_OPT_3'];
$aData['SCH_DAYS_PERFORM_TASK'] = $aData['SCH_DAYS_PERFORM_TASK'] . '|' . $aData['SCH_DAYS_PERFORM_TASK_OPT_3'];
$sDaysPerformTask = $aData['SCH_DAYS_PERFORM_TASK'];
$aData['SCH_DAYS_PERFORM_TASK'] = $aData['SCH_DAYS_PERFORM_TASK'];
break;
}
break;
@@ -182,47 +183,22 @@ class CaseScheduler
$sWeeks = '';
if (! empty( $aData['SCH_WEEK_DAYS'] )) {
$aWeekDays = $aData['SCH_WEEK_DAYS'];
foreach ($aWeekDays as $value) {
$sWeeks = $sWeeks . $value . '|';
}
}
if (! empty( $aData['SCH_WEEK_DAYS_2'] )) {
$aWeekDays2 = $aData['SCH_WEEK_DAYS_2'];
foreach ($aWeekDays2 as $value) {
$sWeeks = $sWeeks . $value . '|';
}
}
}
$sStartTime = $aData['SCH_START_TIME'];
$aData['SCH_WEEK_DAYS'] = $sWeeks;
$sWeeks = $aData['SCH_WEEK_DAYS'];
break;
case '3':
$nStartDay = $aData['SCH_START_DAY'];
if ($nStartDay == 1) {
$aData['SCH_START_DAY'] = $nStartDay . '|' . $aData['SCH_START_DAY_OPT_1'];
} else {
$aData['SCH_START_DAY'] = $nStartDay . '|' . $aData['SCH_START_DAY_OPT_2_WEEKS'] . '|' . $aData['SCH_START_DAY_OPT_2_DAYS_WEEK'];
$aData['SCH_START_DAY'] = $nStartDay . '|' . $aData['SCH_START_DAY_OPT_2'];
}
$sMonths = '';
if (! empty( $aData['SCH_MONTHS'] )) {
$aMonths = $aData['SCH_MONTHS'];
foreach ($aMonths as $value) {
$sMonths = $sMonths . $value . '|';
}
}
if (! empty( $aData['SCH_MONTHS_2'] )) {
$aMonths2 = $aData['SCH_MONTHS_2'];
foreach ($aMonths2 as $value) {
$sMonths = $sMonths . $value . '|';
}
}
if (! empty( $aData['SCH_MONTHS_3'] )) {
$aMonths3 = $aData['SCH_MONTHS_3'];
foreach ($aMonths3 as $value) {
$sMonths = $sMonths . $value . '|';
}
}
$aData['SCH_MONTHS'] = $sMonths;
$sMonths = $aData['SCH_MONTHS'];
$sStartDay = $aData['SCH_START_DAY'];
$sValue = $nStartDay;
break;
@@ -246,16 +222,11 @@ class CaseScheduler
}
}
} else {
/* echo $sOption; echo " - ";
echo $sValue; echo " - "; echo $nActualTime; echo " - "; echo $sDaysPerformTask; echo " - "; echo $sWeeks;
echo " - "; echo $sStartDay; echo " - "; echo $sMonths; echo " - "; echo $sDateTmp; die();
*/
echo $sOption."*". $sValue."*". $nActualTime."*". $sDaysPerformTask."*". $sWeeks."*". $sStartDay ."*". $sMonths."<br>";
echo "1*".$sOption." 2*". $sValue." 3*". $nActualTime." 4*". $sDaysPerformTask." 5*". $sWeeks." 6*". $sStartDay ." 7*". $sMonths."<br>";
$aData['SCH_TIME_NEXT_RUN'] = $oCaseScheduler->updateNextRun( $sOption, $sValue, $nActualTime, $sDaysPerformTask, $sWeeks, $sStartDay, $sMonths, $sDateTmp );
echo $aData['SCH_TIME_NEXT_RUN']; die ();
}
echo "<br> SCH_TIME_NEXT_RUN ".$aData['SCH_TIME_NEXT_RUN'];
}
} else {
if ($sOption == '4') {
$aData['SCH_END_DATE'] = $aData['SCH_START_TIME'];
@@ -350,8 +321,8 @@ class CaseScheduler
$aData['SCH_WEEK_DAYS'] = '1|2|3|4|5|';
break;
case '3': // Every [n] Days
$sDaysPerformTask = $aData['SCH_DAYS_PERFORM_TASK_OPT_3'];
$aData['SCH_DAYS_PERFORM_TASK'] = $aData['SCH_DAYS_PERFORM_TASK'] . '|' . $aData['SCH_DAYS_PERFORM_TASK_OPT_3'];
$sDaysPerformTask = $aData['SCH_DAYS_PERFORM_TASK'];
$aData['SCH_DAYS_PERFORM_TASK'] = $aData['SCH_DAYS_PERFORM_TASK'];
break;
}
break;
@@ -366,51 +337,25 @@ class CaseScheduler
$sWeeks = '';
if (! empty( $aData['SCH_WEEK_DAYS'] )) {
$aWeekDays = $aData['SCH_WEEK_DAYS'];
foreach ($aWeekDays as $value) {
$sWeeks = $sWeeks . $value . '|';
}
}
if (! empty( $aData['SCH_WEEK_DAYS_2'] )) {
$aWeekDays2 = $aData['SCH_WEEK_DAYS_2'];
foreach ($aWeekDays2 as $value) {
$sWeeks = $sWeeks . $value . '|';
}
}
}
$sStartTime = $aData['SCH_START_TIME'];
$aData['SCH_WEEK_DAYS'] = $sWeeks;
$sWeeks = $aData['SCH_WEEK_DAYS'];
break;
case '3':
$nStartDay = $aData['SCH_START_DAY'];
if ($nStartDay == 1) {
$aData['SCH_START_DAY'] = $nStartDay . '|' . $aData['SCH_START_DAY_OPT_1'];
/* if ($nStartDay == 1) {
$aData['SCH_START_DAY'] = $nStartDay;
} else {
$aData['SCH_START_DAY'] = $nStartDay . '|' . $aData['SCH_START_DAY_OPT_2_WEEKS'] . '|' . $aData['SCH_START_DAY_OPT_2_DAYS_WEEK'];
}
}*/
$sMonths = '';
if (! empty( $aData['SCH_MONTHS'] )) {
$aMonths = $aData['SCH_MONTHS'];
foreach ($aMonths as $value) {
$sMonths = $sMonths . $value . '|';
}
}
if (! empty( $aData['SCH_MONTHS_2'] )) {
$aMonths2 = $aData['SCH_MONTHS_2'];
foreach ($aMonths2 as $value) {
$sMonths = $sMonths . $value . '|';
}
}
if (! empty( $aData['SCH_MONTHS_3'] )) {
$aMonths3 = $aData['SCH_MONTHS_3'];
foreach ($aMonths3 as $value) {
$sMonths = $sMonths . $value . '|';
}
}
$aData['SCH_MONTHS'] = $sMonths;
$sStartDay = $aData['SCH_START_DAY'];
$sValue = $nStartDay;
break;
}
if (trim( $aData['SCH_END_DATE'] ) != '') {
$aData['SCH_END_DATE'] = $aData['SCH_END_DATE'];

View File

@@ -231,7 +231,7 @@ class OutputDocument
$pemission = $aData['out_doc_pdf_security_permissions'];
$pemission = explode("|", $pemission);
foreach ($pemission as $row) {
if ($row == "print" || $row == "modify" || $row == "copy" || $row == "forms") {
if ($row == "print" || $row == "modify" || $row == "copy" || $row == "forms" || $row == "") {
$aData['out_doc_pdf_security_permissions'] = $aData['out_doc_pdf_security_permissions'];
} else {
throw (new \Exception( 'invalid value specified for `out_doc_pdf_security_permissions`'));
@@ -288,7 +288,7 @@ class OutputDocument
$pemission = $aData['out_doc_pdf_security_permissions'];
$pemission = explode("|", $pemission);
foreach ($pemission as $row) {
if ($row == "print" || $row == "modify" || $row == "copy" || $row == "forms") {
if ($row == "print" || $row == "modify" || $row == "copy" || $row == "forms" || $row == "") {
$aData['out_doc_pdf_security_permissions'] = $aData['out_doc_pdf_security_permissions'];
} else {
throw (new \Exception( 'invalid value specified for `out_doc_pdf_security_permissions`'));

View File

@@ -205,10 +205,19 @@ class CaseSchedulerStructure
public $sch_week_days;
/**
* @var string {@from body} {@min 0} {@max 6}
* @var string {@from body} {@choice 1,2}
*/
public $sch_start_day;
/**
* @var string {@from body}
*/
public $sch_start_day_opt_1;
/**
* @var string {@from body}
*/
public $sch_start_day_opt_2;
/**
* @var string {@from body} {@min 0} {@max 24}
*/