Arreglo de conflicto

This commit is contained in:
Brayan Osmar Pereyra Suxo
2014-03-18 12:38:35 -04:00
8 changed files with 143 additions and 277 deletions

View File

@@ -11,7 +11,6 @@ Feature: Case Scheduler Resources
"sch_option": "3",
"sch_name": "Test scheduler #1",
"sch_del_user_name": "admin",
"sch_del_user_pass": "admin",
"tas_uid": "46941969352af5be2ab3f39001216717",
"sch_start_time": "18:00",
"sch_start_date": "2014-01-20",
@@ -54,7 +53,6 @@ Feature: Case Scheduler Resources
{
"sch_name": "Test scheduler #1 modify",
"sch_del_user_name": "admin",
"sch_del_user_pass": "admin",
"tas_uid": "46941969352af5be2ab3f39001216717",
"sch_start_time": "20:00",
"sch_start_date": "2014-02-01",

View File

@@ -21,7 +21,6 @@ Feature: Case Scheduler Main Tests
"""
{
"sch_del_user_name": "<sch_del_user_name>",
"sch_del_user_pass": "<sch_del_user_pass>",
"tas_uid": "<tas_uid>",
"sch_name": "<sch_name>",
"sch_option": "<sch_option>",
@@ -46,20 +45,20 @@ Feature: Case Scheduler Main Tests
Examples:
| test_description | sch_uid_number | sch_del_user_name | sch_del_user_pass | tas_uid | sch_name | sch_option | sch_start_date | sch_end_date | sch_start_time | sch_week_days | sch_start_day | sch_start_day_opt_1 | sch_months | sch_start_day_opt_2 | sch_repeat_every | error_code |
| Create with Daily | 1 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ | 1 | 2014-01-30 | 2014-02-20 | 12:00 | | | | | | | 201 |
| Create with Weekly, sch_week_days=monday | 2 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly monday 345%$# | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 1 | | | | | | 201 |
| Create with Weekly, sch_week_days=tuesday, wednesday, thursday, friday, saturday, sunday | 3 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly 345%$# | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 2\|3\|4\|5\|6\|7 | | | | | | 201 |
| Create with Monthly and day of month, day of month=1, of the month(s)=3,4 | 4 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 1 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 3\|4 | | | 201 |
| Create with Monthly and day of month, day of month=1, of the month=1,2,5,6,7,8,9,10,11,12 | 5 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 2 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 1\|2\|5\|6\|7\|8\|9\|10\|11\|12 | | | 201 |
| Create with Monthly and the day=first and Monday | 6 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 3 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 1\|7 | | 201 |
| Create with Monthly and the day=second and Saturday | 7 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 4 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 2\|6 | | 201 |
| Create with Monthly and the day=Third and Friday | 8 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 5 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 3\|5 | | 201 |
| Create with Monthly and the day=second and Thursday | 9 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 6 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 2\|4 | | 201 |
| Create with Monthly and the day=last and Wednesday | 10 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 7 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 5\|3 | | 201 |
| Create with Monthly and the day=last and Wednesday, of the month=1,2,6,7,8,9,10,11,12 | 11 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 8 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 1\|2\|6\|7\|8\|9\|10\|11\|12 | 5\|3 | | 201 |
| Create with One time only | 12 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-One Time only 678%$@ | 4 | | | 20:00 | | | | | | | 201 |
| Create with Every | 13 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Every 987&%@ | 5 | | | | | | | | | 12.30 | 201 |
| test_description | sch_uid_number | sch_del_user_name | tas_uid | sch_name | sch_option | sch_start_date | sch_end_date | sch_start_time | sch_week_days | sch_start_day | sch_start_day_opt_1 | sch_months | sch_start_day_opt_2 | sch_repeat_every | error_code |
| Create with Daily | 1 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ | 1 | 2014-01-30 | 2014-02-20 | 12:00 | | | | | | | 201 |
| Create with Weekly, sch_week_days=monday | 2 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly monday 345%$# | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 1 | | | | | | 201 |
| Create with Weekly, sch_week_days=tuesday, wednesday, thursday, friday, saturday, sunday | 3 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly 345%$# | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 2\|3\|4\|5\|6\|7 | | | | | | 201 |
| Create with Monthly and day of month, day of month=1, of the month(s)=3,4 | 4 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 1 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 3\|4 | | | 201 |
| Create with Monthly and day of month, day of month=1, of the month=1,2,5,6,7,8,9,10,11,12 | 5 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 2 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 1\|2\|5\|6\|7\|8\|9\|10\|11\|12 | | | 201 |
| Create with Monthly and the day=first and Monday | 6 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 3 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 1\|7 | | 201 |
| Create with Monthly and the day=second and Saturday | 7 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 4 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 2\|6 | | 201 |
| Create with Monthly and the day=Third and Friday | 8 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 5 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 3\|5 | | 201 |
| Create with Monthly and the day=second and Thursday | 9 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 6 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 2\|4 | | 201 |
| Create with Monthly and the day=last and Wednesday | 10 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 7 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 5\|3 | | 201 |
| Create with Monthly and the day=last and Wednesday, of the month=1,2,6,7,8,9,10,11,12 | 11 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 8 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 1\|2\|6\|7\|8\|9\|10\|11\|12 | 5\|3 | | 201 |
| Create with One time only | 12 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-One Time only 678%$@ | 4 | | | 20:00 | | | | | | | 201 |
| Create with Every | 13 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Every 987&%@ | 5 | | | | | | | | | 12.30 | 201 |
Scenario: Create a new case scheduler with same name
@@ -69,7 +68,6 @@ Feature: Case Scheduler Main Tests
"sch_option": "5",
"sch_name": "Case Scheduler-Every 987&%@",
"sch_del_user_name": "admin",
"sch_del_user_pass": "admin",
"tas_uid": "46941969352af5be2ab3f39001216717",
"sch_start_time": "",
"sch_start_date": "",
@@ -101,7 +99,6 @@ Feature: Case Scheduler Main Tests
"""
{
"sch_del_user_name": "<sch_del_user_name>",
"sch_del_user_pass": "<sch_del_user_pass>",
"tas_uid": "<tas_uid>",
"sch_name": "<sch_name>",
"sch_option": "<sch_option>",
@@ -125,12 +122,12 @@ Feature: Case Scheduler Main Tests
Examples:
| test_description | sch_uid_number | sch_del_user_name | sch_del_user_pass | tas_uid | sch_name | sch_option | sch_start_date | sch_end_date | sch_start_time | sch_week_days | sch_start_day | sch_start_day_opt_1 | sch_months | sch_start_day_opt_2 | sch_repeat_every |sch_state |
| Update Daily | 1 | admin | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Daily 123@#$ | 1 | 2014-02-30 | 2014-03-20 | 12:30 | | | | | | |ACTIVE |
| Update Weekly, sch_week_days=monday | 2 | admin | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Weekly monday 345%$# | 2 | 2014-03-20 | 2014-04-20 | 08:30 | 2 | | | | | |ACTIVE |
| Update Monthly and day of month, day of month=1, of the month(s)=3,4 | 4 | admin | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Monthly 567&^% 1 | 3 | 2014-04-21 | 2014-05-18 | 18:30 | | 1 | 18 | 3\|4\|5 | | |ACTIVE |
| Update One time only | 12 | admin | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-One Time only 678%$@ | 4 | | | 20:30 | | | | | | |ACTIVE |
| Update Every | 13 | admin | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Every 987&%@ | 5 | | | | | | | | | 18.30 |ACTIVE |
| test_description | sch_uid_number | sch_del_user_name | tas_uid | sch_name | sch_option | sch_start_date | sch_end_date | sch_start_time | sch_week_days | sch_start_day | sch_start_day_opt_1 | sch_months | sch_start_day_opt_2 | sch_repeat_every |sch_state |
| Update Daily | 1 | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Daily 123@#$ | 1 | 2014-02-30 | 2014-03-20 | 12:30 | | | | | | |ACTIVE |
| Update Weekly, sch_week_days=monday | 2 | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Weekly monday 345%$# | 2 | 2014-03-20 | 2014-04-20 | 08:30 | 2 | | | | | |ACTIVE |
| Update Monthly and day of month, day of month=1, of the month(s)=3,4 | 4 | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Monthly 567&^% 1 | 3 | 2014-04-21 | 2014-05-18 | 18:30 | | 1 | 18 | 3\|4\|5 | | |ACTIVE |
| Update One time only | 12 | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-One Time only 678%$@ | 4 | | | 20:30 | | | | | | |ACTIVE |
| Update Every | 13 | admin | 1352844695225ff5fe54de2005407079 | Update Case Scheduler-Every 987&%@ | 5 | | | | | | | | | 18.30 |ACTIVE |
Scenario Outline: Get a single case scheduler of a project and check some properties

View File

@@ -10,7 +10,6 @@ Feature: Output Documents Negative Tests
"""
{
"sch_del_user_name": "<sch_del_user_name>",
"sch_del_user_pass": "<sch_del_user_pass>",
"tas_uid": "<tas_uid>",
"sch_name": "<sch_name>",
"sch_option": "<sch_option>",
@@ -32,28 +31,28 @@ Feature: Output Documents Negative Tests
Examples:
| test_description | sch_del_user_name | sch_del_user_pass | tas_uid | sch_name | sch_option | sch_start_date | sch_end_date | sch_start_time | sch_week_days | sch_start_day | sch_start_day_opt_1 | sch_months | sch_start_day_opt_2 | sch_repeat_every | error_code | error_message |
| Invalid sch_option | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 21 | 20 | 2014-01-30 | 2014-02-20 | 12:00 | | | | | | | 400 | sch_option |
| Invalid sch_del_user_name | sample | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly monday 345%$# | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 1 | | | | | | 400 | User |
| Invalid sch_del_user_pass | admin | sample | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly 345%$# 22 | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 2\|3\|5\|6\|7 | | | | | | 400 | password |
| Invalid tas_uid | admin | admin | 00000000000005be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 1 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 3\|4 | | | 400 | Task not found |
| Invalid sch_start_time | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 2 | 3 | 2014-03-21 | 2014-04-18 | 39:00:99 | | 1 | 15 | 1\|2\|5\|6\|7\|8\|9\|10\|11\|12 | | | 400 | sch_start_time |
| Invalid sch_start_date | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 3 | 3 | 2014-20-35 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 1\|7 | | 400 | sch_start_date |
| Invalid sch_week_days | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 4 | 2 | 2014-03-21 | 2014-04-18 | 18:00 | 8\|9\|10 | | | | | | 400 | sch_week_days |
| Invalid sch_start_date | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 5 | 3 | 2014-33-76 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 3\|5 | | 400 | sch_start_date |
| Invalid sch_start_day_opt_1 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 6 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 87 | 3\|4\|5 | 2\|4 | | 400 | sch_start_day_opt_1 |
| Invalid sch_start_day_opt_2 | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 7 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 9\|10 | | 400 | sch_start_day_opt_2 |
| Invalid sch_months | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 8 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 13\|54\|65 | 5\|3 | | 400 | sch_months |
| Invalid sch_end_date | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 23 | 1 | 2014-01-30 | 2015-54-87 | 12:00 | | | | | | | 400 | sch_end_date |
| Invalid sch_repeat_every | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Every 987&%@ 10 | 5 | | | | | | | | | 43:30 | 400 | sch_repeat_every |
| Field requered sch_option | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 11 | | 2014-01-30 | 2014-02-20 | 12:00 | | | | | | | 400 | sch_option |
| Field requered sch_name | admin | admin | 46941969352af5be2ab3f39001216717 | | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 1 | | | | | | 400 | sch_name |
| Field requered sch_del_user_name | | sample | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly 345%$# 12 | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 2\|3\|4\|5\|6\|7 | | | | | | 400 | User |
| Field requered sch_del_user_pass | admin | | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 113 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 3\|4 | | | 400 | password |
| Field requered tas_uid | admin | admin | | Case Scheduler-Monthly 567&^% 14 | 3 | 2014-03-21 | 2014-04-18 | 39:00:99 | | 1 | 15 | 1\|2\|5\|6\|7\|8\|9\|10\|11\|12 | | | 400 | tas_uid |
| Field requered sch_start_time | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 15 | 3 | 2014-20-35 | 2014-04-18 | | | 2 | | 3\|4\|5 | 1\|7 | | 400 | sch_start_time |
| Field requered sch_start_date | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 16 | 3 | | 2014-04-18 | 18:00 | 8\|9\|10 | 2 | | 3\|4\|5 | 2\|6 | | 400 | sch_start_date |
| Field requered sch_week_days | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly monday 345%$# 17 | 2 | 2014-02-20 | 2014-03-20 | 08:00 | | | | | | | 400 | sch_week_days |
| Field requered sch_start_day | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 18 | 3 | 2014-33-76 | 2014-04-18 | 18:00 | | | | 3\|4\|5 | 3\|5 | | 400 | sch_start_day |
| Field requered sch_months | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 19 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 16 | | 2\|4 | | 400 | sch_months |
| Field requered sch_end_date | admin | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 24 | 1 | 2014-01-30 | | 12:00 | | | | | | | 400 | sch_end_date |
| test_description | sch_del_user_name | tas_uid | sch_name | sch_option | sch_start_date | sch_end_date | sch_start_time | sch_week_days | sch_start_day | sch_start_day_opt_1 | sch_months | sch_start_day_opt_2 | sch_repeat_every | error_code | error_message |
| Invalid sch_option | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 21 | 20 | 2014-01-30 | 2014-02-20 | 12:00 | | | | | | | 400 | sch_option |
| Invalid sch_del_user_name | sample | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly monday 345%$# | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 1 | | | | | | 400 | User |
| Invalid sch_del_user_pass | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly 345%$# 22 | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 2\|3\|5\|6\|7 | | | | | | 400 | password |
| Invalid tas_uid | admin | 00000000000005be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 1 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 3\|4 | | | 400 | Task not found |
| Invalid sch_start_time | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 2 | 3 | 2014-03-21 | 2014-04-18 | 39:00:99 | | 1 | 15 | 1\|2\|5\|6\|7\|8\|9\|10\|11\|12 | | | 400 | sch_start_time |
| Invalid sch_start_date | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 3 | 3 | 2014-20-35 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 1\|7 | | 400 | sch_start_date |
| Invalid sch_week_days | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 4 | 2 | 2014-03-21 | 2014-04-18 | 18:00 | 8\|9\|10 | | | | | | 400 | sch_week_days |
| Invalid sch_start_date | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 5 | 3 | 2014-33-76 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 3\|5 | | 400 | sch_start_date |
| Invalid sch_start_day_opt_1 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 6 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 87 | 3\|4\|5 | 2\|4 | | 400 | sch_start_day_opt_1 |
| Invalid sch_start_day_opt_2 | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 7 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 3\|4\|5 | 9\|10 | | 400 | sch_start_day_opt_2 |
| Invalid sch_months | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 8 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 2 | | 13\|54\|65 | 5\|3 | | 400 | sch_months |
| Invalid sch_end_date | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 23 | 1 | 2014-01-30 | 2015-54-87 | 12:00 | | | | | | | 400 | sch_end_date |
| Invalid sch_repeat_every | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Every 987&%@ 10 | 5 | | | | | | | | | 43:30 | 400 | sch_repeat_every |
| Field requered sch_option | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 11 | | 2014-01-30 | 2014-02-20 | 12:00 | | | | | | | 400 | sch_option |
| Field requered sch_name | admin | 46941969352af5be2ab3f39001216717 | | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 1 | | | | | | 400 | sch_name |
| Field requered sch_del_user_name | | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly 345%$# 12 | 2 | 2014-02-20 | 2014-03-20 | 08:00 | 2\|3\|4\|5\|6\|7 | | | | | | 400 | User |
| Field requered sch_del_user_pass | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 113 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 15 | 3\|4 | | | 400 | password |
| Field requered tas_uid | admin | | Case Scheduler-Monthly 567&^% 14 | 3 | 2014-03-21 | 2014-04-18 | 39:00:99 | | 1 | 15 | 1\|2\|5\|6\|7\|8\|9\|10\|11\|12 | | | 400 | tas_uid |
| Field requered sch_start_time | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 15 | 3 | 2014-20-35 | 2014-04-18 | | | 2 | | 3\|4\|5 | 1\|7 | | 400 | sch_start_time |
| Field requered sch_start_date | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 16 | 3 | | 2014-04-18 | 18:00 | 8\|9\|10 | 2 | | 3\|4\|5 | 2\|6 | | 400 | sch_start_date |
| Field requered sch_week_days | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Weekly monday 345%$# 17 | 2 | 2014-02-20 | 2014-03-20 | 08:00 | | | | | | | 400 | sch_week_days |
| Field requered sch_start_day | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 18 | 3 | 2014-33-76 | 2014-04-18 | 18:00 | | | | 3\|4\|5 | 3\|5 | | 400 | sch_start_day |
| Field requered sch_months | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Monthly 567&^% 19 | 3 | 2014-03-21 | 2014-04-18 | 18:00 | | 1 | 16 | | 2\|4 | | 400 | sch_months |
| Field requered sch_end_date | admin | 46941969352af5be2ab3f39001216717 | Case Scheduler-Daily 123@#$ 24 | 1 | 2014-01-30 | | 12:00 | | | | | | | 400 | sch_end_date |

View File

@@ -372,6 +372,8 @@ class WebApplication
\Propel::init(PATH_CONFIG . "databases.php");
\Bootstrap::LoadTranslationObject(defined( 'SYS_LANG' ) ? SYS_LANG : "en");
return true;
}
}

View File

@@ -20,7 +20,6 @@ class CaseScheduler
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_UID );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_NAME );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_DEL_USER_NAME );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_DEL_USER_PASS );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_DEL_USER_UID );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::PRO_UID );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::TAS_UID );
@@ -78,7 +77,6 @@ class CaseScheduler
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_UID );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_NAME );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_DEL_USER_NAME );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_DEL_USER_PASS );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::SCH_DEL_USER_UID );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::PRO_UID );
$oCriteria->addSelectColumn( \CaseSchedulerPeer::TAS_UID );
@@ -190,42 +188,15 @@ class CaseScheduler
* Checks if the user exists
*
* @param string $userName Name
* @param string $userPass Password
* @param string $sProcessUID Process
* @param string $sTaskUID Task
*
* return message
*/
public function getUser($userName, $userPass, $sProcessUID, $sTaskUID)
public function getUser($userName, $sTaskUID)
{
try {
$sPRO_UID = $sProcessUID;
$sTASKS = $sTaskUID;
$sWS_USER = trim( $userName );
$sWS_PASS = trim( $userPass );
if (\G::is_https()) {
$http = 'https://';
} else {
$http = 'http://';
}
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
@$client = new \SoapClient( $endpoint );
$user = $sWS_USER;
$pass = $sWS_PASS;
$params = array ('userid' => $user,'password' => $pass);
$result = $client->__SoapCall('login', array ($params));
$fields['status_code'] = $result->status_code;
$fields['message'] = 'ProcessMaker WebService version: ' . $result->version . "\n" . $result->message;
$fields['version'] = $result->version;
$fields['time_stamp'] = $result->timestamp;
$messageCode = 1;
\G::LoadClass( 'Task' );
\G::LoadClass( 'User' );
\G::LoadClass( 'TaskUser' );
\G::LoadClass( 'Groupwf' );
if (! class_exists( 'GroupUser' )) {
\G::LoadClass( 'GroupUser' );
}
if ($result->status_code == 0) {
$oCriteria = new \Criteria( 'workflow' );
$oCriteria->addSelectColumn( \UsersPeer::USR_UID );
$oCriteria->addSelectColumn( \TaskUserPeer::USR_UID );
@@ -256,9 +227,6 @@ class CaseScheduler
$messageCode = $aRow['USR_UID'];
$oDataset->next();
}
} else {
throw (new \Exception( $result->message));
}
return $messageCode;
} catch (\Exception $e) {
throw $e;
@@ -295,12 +263,13 @@ class CaseScheduler
if ($this->existsName($sProcessUID, $aData['SCH_NAME'])) {
throw (new \Exception( 'Duplicate Case Scheduler name'));
}
$mUser = $this->getUser($aData['SCH_DEL_USER_NAME'], $aData['SCH_DEL_USER_PASS'], $sProcessUID, $aData['TAS_UID']);
$mUser = $this->getUser($aData['SCH_DEL_USER_NAME'], $aData['TAS_UID']);
$oUser = \UsersPeer::retrieveByPK( $mUser );
if (is_null($oUser)) {
throw (new \Exception($mUser));
}
$aData['SCH_DEL_USER_PASS'] = md5( $aData['SCH_DEL_USER_PASS']);
$oUserPass = $oUser->getUsrPassword();
$aData['SCH_DEL_USER_PASS'] = $oUserPass;
if ($sOption != '5') {
$pattern="/^([0-1][0-9]|[2][0-3])[\:]([0-5][0-9])$/";
if (!preg_match($pattern, $aData['SCH_START_TIME'])) {
@@ -586,12 +555,13 @@ class CaseScheduler
if ($this->existsNameUpdate($sSchUID, $aData['SCH_NAME'])) {
throw (new \Exception( 'Duplicate Case Scheduler name'));
}
$mUser = $this->getUser($aData['SCH_DEL_USER_NAME'], $aData['SCH_DEL_USER_PASS'], $sProcessUID, $aData['TAS_UID']);
$mUser = $this->getUser($aData['SCH_DEL_USER_NAME'], $aData['TAS_UID']);
$oUser = \UsersPeer::retrieveByPK( $mUser );
if (is_null($oUser)) {
throw (new \Exception($mUser));
}
$aData['SCH_DEL_USER_PASS'] = md5( $aData['SCH_DEL_USER_PASS']);
$oUserPass = $oUser->getUsrPassword();
$aData['SCH_DEL_USER_PASS'] = $oUserPass;
if ($sOption != '5') {
$pattern="/^([0-1][0-9]|[2][0-3])[\:]([0-5][0-9])$/";
if (!preg_match($pattern, $aData['SCH_START_TIME'])) {
@@ -850,12 +820,11 @@ class CaseScheduler
/**
* Delete a case scheduler of a project
*
* @param string $sProcessUID
* @param string $sSchUID
*
* @access public
*/
public function deleteCaseScheduler($sProcessUID, $sSchUID)
public function deleteCaseScheduler($sSchUID)
{
try {
require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes". PATH_SEP . "model" . PATH_SEP . "CaseScheduler.php");

View File

@@ -237,17 +237,11 @@ class Cases
{
continue;
}
$aRow["APP_NUMBER"] = $row["APP_NUMBER"];
$aRow["APP_STATUS"] = $row["APP_STATUS"];
$aRow["PRO_UID"] = $row["PRO_UID"];
$aRow["DEL_INDEX"] = $row["DEL_INDEX"];
$arrayData[] = array(
"guid" => $aRow["APP_UID"],
"name" => $aRow["APP_NUMBER"],
"status" => $aRow["APP_STATUS"],
"delIndex" => $aRow["DEL_INDEX"],
"processId" => $aRow["PRO_UID"]
);
\G::LoadClass('wsBase');
$ws = new \wsBase();
$fields = $ws->getCaseInfo($caseUid, $row["DEL_INDEX"]);
//Return
return $fields;
}
}
$case = array();
@@ -269,13 +263,8 @@ class Cases
return $arrayData;
}
} else {
$arrayData = array();
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\AppCacheViewPeer::APP_UID);
$criteria->addSelectColumn(\AppCacheViewPeer::DEL_INDEX);
$criteria->addSelectColumn(\AppCacheViewPeer::APP_NUMBER);
$criteria->addSelectColumn(\AppCacheViewPeer::APP_STATUS);
$criteria->addSelectColumn(\AppCacheViewPeer::PRO_UID);
$criteria->add(\AppCacheViewPeer::USR_UID, $userUid);
$criteria->add(\AppCacheViewPeer::APP_UID, $caseUid);
$criteria->add(
@@ -295,16 +284,14 @@ class Cases
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
while ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
$arrayData[] = array(
"guid" => $row["APP_UID"],
"name" => $row["APP_NUMBER"],
"status" => $row["APP_STATUS"],
"delIndex" => $row["DEL_INDEX"],
"processId" => $row["PRO_UID"]
);
}
return $arrayData;
\G::LoadClass('wsBase');
$ws = new \wsBase();
$fields = $ws->getCaseInfo($caseUid, $row["DEL_INDEX"]);
//Return
return $fields;
}
} catch (\Exception $e) {
throw $e;
}
@@ -361,17 +348,20 @@ class Cases
*
* @param string $prjUid Unique id of Project
* @param string $usrUid Unique id of User
* @param string $caseUid Unique id of Case
* @param string $actUid Unique id of Case
* @param array $variables
*
* return array Return an array with Task Case
*/
public function addCaseImpersonate($prjUid, $usrUid, $caseUid, $variables)
public function addCaseImpersonate($prjUid, $usrUid, $actUid, $variables)
{
try {
\G::LoadClass('wsBase');
$ws = new \wsBase();
$fields = $ws->newCaseImpersonate($prjUid, $usrUid, $variables, '1352844695225ff5fe54de2005407079');
if ($variables) {
$variables = array_shift($variables);
}
$fields = $ws->newCaseImpersonate($prjUid, $usrUid, $variables, $actUid);
//Return
return $fields;
} catch (\Exception $e) {
@@ -405,6 +395,7 @@ class Cases
}
/**
<<<<<<< HEAD
* Put cancel case
*
* @access public
@@ -455,6 +446,32 @@ class Cases
$case = new \Cases();
$case->pauseCase( $app_uid, $del_index, $usr_uid, $unpaused_date );
}
=======
* Reassign Case
*
* @param string $caseUid Unique id of Case
* @param string $userUid Unique id of User
* @param string $delIndex
* @param string $bExecuteTriggersBeforeAssignment
*
* return array Return an array with Task Case
*/
public function updateRouteCase($caseUid, $userUid, $delIndex)
{
try {
\G::LoadClass('wsBase');
$ws = new \wsBase();
$fields = $ws->derivateCase($userUid, $caseUid, $delIndex, $bExecuteTriggersBeforeAssignment = false);
//Return
return $fields;
} catch (\Exception $e) {
throw $e;
}
}
}
>>>>>>> 9eaec8c26aa7492684f15ad1df02c3500a3b6c13
/**
* Put unpause case

View File

@@ -18,6 +18,7 @@ class Cases extends Api
/**
* Get list Cases To Do
*
* @access public
* @param array $request_data , Data for list
* @return array
*
@@ -29,8 +30,6 @@ class Cases extends Api
public function doGetCasesListToDo($request_data = array())
{
try {
\G::pr($this->getUserId());
die('fin');
$request_data['action'] = 'todo';
$request_data['userId'] = $this->getUserId();
$oCases = new \BusinessModel\Cases();
@@ -44,6 +43,7 @@ class Cases extends Api
/**
* Get list Cases Draft
*
* @access public
* @param array $request_data , Data for list
* @return array
*
@@ -68,6 +68,7 @@ class Cases extends Api
/**
* Get list Cases Participated
*
* @access public
* @param array $request_data , Data for list
* @return array
*
@@ -92,6 +93,7 @@ class Cases extends Api
/**
* Get list Cases Unassigned
*
* @access public
* @param array $request_data , Data for list
* @return array
*
@@ -116,6 +118,7 @@ class Cases extends Api
/**
* Get list Cases Paused
*
* @access public
* @param array $request_data , Data for list
* @return array
*
@@ -140,6 +143,7 @@ class Cases extends Api
/**
* Get list Cases Advanced Search
*
* @access public
* @param array $request_data , Data for list
* @return array
*
@@ -172,8 +176,7 @@ class Cases extends Api
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$arrayData = $cases->getCaseInfo($cas_uid, $userUid);
$response = $arrayData;
return $response;
return $arrayData;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
@@ -189,8 +192,7 @@ class Cases extends Api
try {
$cases = new \BusinessModel\Cases();
$arrayData = $cases->getTaskCase($cas_uid);
$response = $arrayData;
return $response;
return $arrayData;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
@@ -210,8 +212,7 @@ class Cases extends Api
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$arrayData = $cases->addCase($prj_uid, $act_uid, $userUid, $variables);
$response = $arrayData;
return $response;
return $arrayData;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
@@ -225,13 +226,12 @@ class Cases extends Api
* @param string $act_uid {@from body} {@min 32}{@max 32}
* @param array $variables {@from body}
*/
public function doPostCaseImpersonate($prj_uid, $usr_uid, $act_uid, $variables)
public function doPostCaseImpersonate($prj_uid, $usr_uid, $act_uid, $variables=null)
{
try {
$cases = new \BusinessModel\Cases();
$arrayData = $cases->addCaseImpersonate($prj_uid, $usr_uid, $act_uid, $variables);
$response = $arrayData;
return $response;
return $arrayData;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
@@ -250,9 +250,9 @@ class Cases extends Api
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$arrayData = $cases->updateReassignCase($cas_uid, $userUid, $del_index, $usr_uid_source, $usr_uid_target);
$response = $arrayData;
return $response;
} catch (\Exception $e) { throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
return $arrayData;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
}
@@ -263,124 +263,13 @@ class Cases extends Api
* @param string $usr_uid_source {@from body} {@min 32}{@max 32}
* @param string $usr_uid_target {@from body} {@min 32}{@max 32}
*/
public function doPutRouteCase($cas_uid, $del_index, $usr_uid_source, $usr_uid_target)
public function doPutRouteCase($cas_uid, $del_index)
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$arrayData = $cases->updateRouteCase($cas_uid, $userUid, $del_index, $usr_uid_source, $usr_uid_target);
$response = $arrayData;
return $response;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
}
/**
* Cancel Case
*
* @param string $cas_uid {@min 1}{@max 32}
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*
* @url PUT /:cas_uid/cancel-case
*/
public function doPutCancelCase($cas_uid)
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases->putCancelCase($cas_uid, $userUid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
}
/**
* Pause Case
*
* @param string $cas_uid {@min 1}{@max 32}
* @param string $unpaused_date {@from body}
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*
* @url PUT /:cas_uid/pause-case
*/
public function doPutPauseCase($cas_uid, $unpaused_date = null)
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
if ($unpaused_date == null) {
$cases->putPauseCase($cas_uid, $userUid);
} else {
$cases->putPauseCase($cas_uid, $userUid, false, $unpaused_date);
}
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
}
/**
* Unpause Case
*
* @param string $cas_uid {@min 1}{@max 32}
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*
* @url PUT /:cas_uid/unpause-case
*/
public function doPutUnpauseCase($cas_uid)
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases->putUnpauseCase($cas_uid, $userUid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
}
/**
* Unpause Case
*
* @param string $cas_uid {@min 1}{@max 32}
* @param string $tri_uid {@min 1}{@max 32}
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*
* @url PUT /:cas_uid/execute-trigger/:tri_uid
*/
public function doPutExecuteTriggerCase($cas_uid, $tri_uid)
{
try {
$userUid = $this->getUserId();
$cases = new \BusinessModel\Cases();
$cases->putExecuteTriggerCase($cas_uid, $tri_uid, $userUid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
}
/**
* Delete Case
*
* @param string $cas_uid {@min 1}{@max 32}
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*
* @url DELETE /:cas_uid
*/
public function doDeleteCase($cas_uid)
{
try {
$cases = new \BusinessModel\Cases();
$cases->deleteCase($cas_uid);
$arrayData = $cases->updateRouteCase($cas_uid, $userUid, $del_index);
return $arrayData;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}

View File

@@ -108,7 +108,7 @@ class CaseScheduler extends Api
{
try {
$caseScheduler = new \BusinessModel\CaseScheduler();
$caseScheduler->deleteCaseScheduler($prjUid, $schUid);
$caseScheduler->deleteCaseScheduler($schUid);
} catch (\Exception $e) {
//response
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
@@ -128,11 +128,6 @@ class CaseSchedulerStructure
*/
public $sch_del_user_name;
/**
* @var string {@from body} {@min 0} {@max 100}
*/
public $sch_del_user_pass;
/**
* @var string {@from body} {@min 0} {@max 100}
*/