Merge branch 'master' of bitbucket.org:colosa/processmaker
This commit is contained in:
23
features/backend/dynaforms_resources/dynaforms.feature
Normal file
23
features/backend/dynaforms_resources/dynaforms.feature
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
|
Feature: Dynaforms Resources
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given that I have a valid access_token
|
||||||
|
|
||||||
|
Scenario: Get a List of dynaforms of a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Get a single dynaform of a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Create a new dynaform for a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Create a copy of a dynaform and import it to another project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Update a dynaform of a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Delete a dynaform of a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
|
Feature: Input Documents Resources
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given that I have a valid access_token
|
||||||
|
|
||||||
|
Scenario: Get a List input documents of a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Get a single input document of a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Create a new input document for a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Update an input document for a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Delete an input document of a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
|
Feature: Output Documents Resources
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given that I have a valid access_token
|
||||||
|
|
||||||
|
Scenario: Get a List output documents of a project
|
||||||
|
Given I request "project/4224292655297723eb98691001100052/output-documents"
|
||||||
|
Then the response status code should be 200
|
||||||
|
And the content type is "application/json"
|
||||||
|
And the type is "array"
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Get a single output document of a project
|
||||||
|
Given I request "project/4224292655297723eb98691001100052/output-document/270088687529c8ace5e5272077582449"
|
||||||
|
Then the response status code should be 200
|
||||||
|
And the content type is "application/json"
|
||||||
|
And the type is "object"
|
||||||
|
|
||||||
|
Scenario: Create a new output document for a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Update a output document for a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Delete a output document of a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
21
features/backend/project_activity_resources/activity.feature
Normal file
21
features/backend/project_activity_resources/activity.feature
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
|
Feature: Project Activity Resources
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given that I have a valid access_token
|
||||||
|
|
||||||
|
Scenario: Get properties & definition of a activity.
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Get BPMN definition of an activity.
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Get properties data of the ProcessMaker engine of an activity.
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Update definition & properties of an activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Delete a project activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
|
Feature: Project Properties - Ad hoc Assignee Resources
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given that I have a valid access_token
|
||||||
|
|
||||||
|
Scenario: List AdHoc assignees of an activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Get a list of available AdHoc users and groups to be assigned to an activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Get a single AdHoc user or group of an activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Assign an AdHoc user or group to an activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Remove an AdHoc assignee from an activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
|
Feature: Project Properties - Step Resources
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given that I have a valid access_token
|
||||||
|
|
||||||
|
Scenario: List assigned steps to an Activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: List available steps to assign to an Activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Get a single step assigned to an Activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Assing a step to a Activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Unassign a step from an activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: List assigned triggers to a Step
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: List available triggers to assign to a Step
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Get a single trigger assigned to a Step
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Assign a trigger to a Step
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Update a trigger assignation of a Step
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Remove a trigger assignation of a Step
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
|
Feature: Project Properties - Assignee Resources
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given that I have a valid access_token
|
||||||
|
|
||||||
|
Scenario: List assignees of an activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Get a list of available users and groups to be assigned to an activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Get a single user or group of an activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Assign a user or group to an activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Remove assignee from an activity
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
32
features/backend/project_resources/project.feature
Normal file
32
features/backend/project_resources/project.feature
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
|
Feature: Project Resources
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given that I have a valid access_token
|
||||||
|
|
||||||
|
Scenario: Get a single project
|
||||||
|
|
||||||
|
Given I request "project/4224292655297723eb98691001100052"
|
||||||
|
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"
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: Create a new project
|
||||||
|
Given POST data from file "process_template_v1.json"
|
||||||
|
And I request "project"
|
||||||
|
Then the response status code should be 201
|
||||||
|
And the content type is "application/json"
|
||||||
|
And the type is "array"
|
||||||
|
|
||||||
|
Scenario: Update a project
|
||||||
|
Given PUT data from file "process_template_v2.json"
|
||||||
|
And I request "project"
|
||||||
|
Then the response status code should be 201
|
||||||
|
And the content type is "application/json"
|
||||||
|
And the type is "array"
|
||||||
|
|
||||||
|
Scenario: Delete a project <project_uid>
|
||||||
|
Given I request "project/<project_uid>"
|
||||||
|
Then the response status code should be 200
|
||||||
13
features/backend/project_resources/projects.feature
Normal file
13
features/backend/project_resources/projects.feature
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
|
Feature: Projects End Point.
|
||||||
|
Lists available projects/processes for an specific workspace
|
||||||
|
|
||||||
|
Scenario: Get a list of projects
|
||||||
|
Given that I have a valid access_token
|
||||||
|
And I request "projects"
|
||||||
|
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"
|
||||||
|
|
||||||
|
|
||||||
21
features/backend/triggers_resources/triggers.feature
Normal file
21
features/backend/triggers_resources/triggers.feature
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
@ProcessMakerMichelangelo @RestAPI
|
||||||
|
Feature: Triggers Resources
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given that I have a valid access_token
|
||||||
|
|
||||||
|
Scenario: Get a List of triggers of a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Get a single trigger of a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Create a new trigger for a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Update a trigger of a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
|
Scenario: Delete a trigger of a project
|
||||||
|
Given this scenario is not implemented yet
|
||||||
|
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
use Behat\Behat\Context\BehatContext;
|
use Behat\Behat\Context\BehatContext;
|
||||||
use Behat\Gherkin\Node\PyStringNode;
|
use Behat\Gherkin\Node\PyStringNode;
|
||||||
use Behat\Gherkin\Node\TableNode;
|
use Behat\Gherkin\Node\TableNode;
|
||||||
|
use Behat\Behat\Exception\PendingException;
|
||||||
/**
|
/**
|
||||||
* Rest context.
|
* Rest context.
|
||||||
*
|
*
|
||||||
@@ -936,6 +937,8 @@ class RestContext extends BehatContext
|
|||||||
$this->_headers['Content-Type'] = 'application/json; charset=UTF-8';
|
$this->_headers['Content-Type'] = 'application/json; charset=UTF-8';
|
||||||
$this->_requestBody = $string;
|
$this->_requestBody = $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -972,6 +975,7 @@ class RestContext extends BehatContext
|
|||||||
$sessionData->$varName = $varValue;
|
$sessionData->$varName = $varValue;
|
||||||
file_put_contents("session.data", json_encode($sessionData));
|
file_put_contents("session.data", json_encode($sessionData));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Then /^echo last response$/
|
* @Then /^echo last response$/
|
||||||
@@ -980,5 +984,55 @@ class RestContext extends BehatContext
|
|||||||
{
|
{
|
||||||
$this->printDebug("$this->_request\n$this->_response");
|
$this->printDebug("$this->_request\n$this->_response");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//*********** WEN
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Given /^POST data from file "([^"]*)"$/
|
||||||
|
*/
|
||||||
|
public function postDataFromFile($jsonFile)
|
||||||
|
{
|
||||||
|
$filePath = __DIR__ . "/../json/" . $jsonFile;
|
||||||
|
|
||||||
|
if(file_exists($filePath))
|
||||||
|
{
|
||||||
|
$fileData = file_get_contents($filePath);
|
||||||
|
$this->postThisData(new PyStringNode($fileData));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new \Exception("JSON File: $filePath not found\n\n" );
|
||||||
|
}
|
||||||
|
// throw new PendingException();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Given /^PUT data from file "([^"]*)"$/
|
||||||
|
*/
|
||||||
|
public function putDataFromFile($jsonFile)
|
||||||
|
{
|
||||||
|
$filePath = __DIR__ . "/../json/" . $jsonFile;
|
||||||
|
|
||||||
|
if(file_exists($filePath))
|
||||||
|
{
|
||||||
|
$fileData = file_get_contents($filePath);
|
||||||
|
$this->putThisData(new PyStringNode($fileData));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new \Exception("JSON File: $filePath not found\n\n" );
|
||||||
|
}
|
||||||
|
// throw new PendingException();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @Given /^This scenario is not implemented yet$/
|
||||||
|
* @Given /^this scenario is not implemented yet$/
|
||||||
|
*/
|
||||||
|
public function thisScenarioIsNotImplementedYet()
|
||||||
|
{
|
||||||
|
throw new PendingException();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
715
features/json/process_template_v1.json
Normal file
715
features/json/process_template_v1.json
Normal file
@@ -0,0 +1,715 @@
|
|||||||
|
{
|
||||||
|
"prj_uid": "6e60d25b2a779b263104f141c215466b",
|
||||||
|
"prj_name": "Project #1 (parallel-by-ev)",
|
||||||
|
"prj_description": "",
|
||||||
|
"diagrams": [
|
||||||
|
{
|
||||||
|
"dia_uid": "a5242da840064218638061532405176",
|
||||||
|
"pro_uid": "68269130852b04ccbda0558053566350",
|
||||||
|
"laneset": [],
|
||||||
|
"lanes": [],
|
||||||
|
"activities": [
|
||||||
|
{
|
||||||
|
"act_uid": "20130110852b04cd0da0710001476342",
|
||||||
|
"act_name": "Task # 1",
|
||||||
|
"act_type": "TASK",
|
||||||
|
"act_task_type": "EMPTY",
|
||||||
|
"act_is_for_compensation": false,
|
||||||
|
"act_start_quantity": 1,
|
||||||
|
"act_completion_quantity": 0,
|
||||||
|
"act_implementation": "",
|
||||||
|
"act_instantiate": false,
|
||||||
|
"act_script_type": "",
|
||||||
|
"act_script": "",
|
||||||
|
"act_loop_type": "NONE",
|
||||||
|
"act_test_before": null,
|
||||||
|
"act_loop_maximum": 0,
|
||||||
|
"act_loop_condition": null,
|
||||||
|
"act_loop_cardinality": 0,
|
||||||
|
"act_loop_behavior": null,
|
||||||
|
"act_is_adhoc": false,
|
||||||
|
"act_is_collapsed": false,
|
||||||
|
"act_completion_condition": null,
|
||||||
|
"act_ordering": null,
|
||||||
|
"act_cancel_remaining_instances": true,
|
||||||
|
"act_protocol": null,
|
||||||
|
"act_method": null,
|
||||||
|
"act_is_global": false,
|
||||||
|
"act_referer": null,
|
||||||
|
"act_default_flow": 0,
|
||||||
|
"act_master_diagram": null,
|
||||||
|
"bou_x": 334,
|
||||||
|
"bou_y": 110,
|
||||||
|
"bou_width": 100,
|
||||||
|
"bou_height": 50,
|
||||||
|
"bou_container": "bpmnDiagram",
|
||||||
|
"bou_element_id": "70770714052b04ccbda05a2045860900"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"act_uid": "55963679852b04cfdda1ca7057330775",
|
||||||
|
"act_name": "Task # 2",
|
||||||
|
"act_type": "TASK",
|
||||||
|
"act_task_type": "EMPTY",
|
||||||
|
"act_is_for_compensation": false,
|
||||||
|
"act_start_quantity": 1,
|
||||||
|
"act_completion_quantity": 0,
|
||||||
|
"act_implementation": "",
|
||||||
|
"act_instantiate": false,
|
||||||
|
"act_script_type": "",
|
||||||
|
"act_script": "",
|
||||||
|
"act_loop_type": "NONE",
|
||||||
|
"act_test_before": null,
|
||||||
|
"act_loop_maximum": 0,
|
||||||
|
"act_loop_condition": null,
|
||||||
|
"act_loop_cardinality": 0,
|
||||||
|
"act_loop_behavior": null,
|
||||||
|
"act_is_adhoc": false,
|
||||||
|
"act_is_collapsed": false,
|
||||||
|
"act_completion_condition": null,
|
||||||
|
"act_ordering": null,
|
||||||
|
"act_cancel_remaining_instances": true,
|
||||||
|
"act_protocol": null,
|
||||||
|
"act_method": null,
|
||||||
|
"act_is_global": false,
|
||||||
|
"act_referer": null,
|
||||||
|
"act_default_flow": 0,
|
||||||
|
"act_master_diagram": null,
|
||||||
|
"bou_x": 135,
|
||||||
|
"bou_y": 327,
|
||||||
|
"bou_width": 100,
|
||||||
|
"bou_height": 50,
|
||||||
|
"bou_container": "bpmnDiagram",
|
||||||
|
"bou_element_id": "70770714052b04ccbda05a2045860900"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"act_uid": "36275645952b04d03da2683059221904",
|
||||||
|
"act_name": "Task # 3",
|
||||||
|
"act_type": "TASK",
|
||||||
|
"act_task_type": "EMPTY",
|
||||||
|
"act_is_for_compensation": false,
|
||||||
|
"act_start_quantity": 1,
|
||||||
|
"act_completion_quantity": 0,
|
||||||
|
"act_implementation": "",
|
||||||
|
"act_instantiate": false,
|
||||||
|
"act_script_type": "",
|
||||||
|
"act_script": "",
|
||||||
|
"act_loop_type": "NONE",
|
||||||
|
"act_test_before": null,
|
||||||
|
"act_loop_maximum": 0,
|
||||||
|
"act_loop_condition": null,
|
||||||
|
"act_loop_cardinality": 0,
|
||||||
|
"act_loop_behavior": null,
|
||||||
|
"act_is_adhoc": false,
|
||||||
|
"act_is_collapsed": false,
|
||||||
|
"act_completion_condition": null,
|
||||||
|
"act_ordering": null,
|
||||||
|
"act_cancel_remaining_instances": true,
|
||||||
|
"act_protocol": null,
|
||||||
|
"act_method": null,
|
||||||
|
"act_is_global": false,
|
||||||
|
"act_referer": null,
|
||||||
|
"act_default_flow": 0,
|
||||||
|
"act_master_diagram": null,
|
||||||
|
"bou_x": 336,
|
||||||
|
"bou_y": 329,
|
||||||
|
"bou_width": 100,
|
||||||
|
"bou_height": 50,
|
||||||
|
"bou_container": "bpmnDiagram",
|
||||||
|
"bou_element_id": "70770714052b04ccbda05a2045860900"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"act_uid": "39924412652b04d0bda3cc4088664712",
|
||||||
|
"act_name": "Task # 4",
|
||||||
|
"act_type": "TASK",
|
||||||
|
"act_task_type": "EMPTY",
|
||||||
|
"act_is_for_compensation": false,
|
||||||
|
"act_start_quantity": 1,
|
||||||
|
"act_completion_quantity": 0,
|
||||||
|
"act_implementation": "",
|
||||||
|
"act_instantiate": false,
|
||||||
|
"act_script_type": "",
|
||||||
|
"act_script": "",
|
||||||
|
"act_loop_type": "NONE",
|
||||||
|
"act_test_before": null,
|
||||||
|
"act_loop_maximum": 0,
|
||||||
|
"act_loop_condition": null,
|
||||||
|
"act_loop_cardinality": 0,
|
||||||
|
"act_loop_behavior": null,
|
||||||
|
"act_is_adhoc": false,
|
||||||
|
"act_is_collapsed": false,
|
||||||
|
"act_completion_condition": null,
|
||||||
|
"act_ordering": null,
|
||||||
|
"act_cancel_remaining_instances": true,
|
||||||
|
"act_protocol": null,
|
||||||
|
"act_method": null,
|
||||||
|
"act_is_global": false,
|
||||||
|
"act_referer": null,
|
||||||
|
"act_default_flow": 0,
|
||||||
|
"act_master_diagram": null,
|
||||||
|
"bou_x": 467,
|
||||||
|
"bou_y": 331,
|
||||||
|
"bou_width": 100,
|
||||||
|
"bou_height": 50,
|
||||||
|
"bou_container": "bpmnDiagram",
|
||||||
|
"bou_element_id": "70770714052b04ccbda05a2045860900"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"act_uid": "81865611252b04d14da4f39027749188",
|
||||||
|
"act_name": "Task # 5",
|
||||||
|
"act_type": "TASK",
|
||||||
|
"act_task_type": "EMPTY",
|
||||||
|
"act_is_for_compensation": false,
|
||||||
|
"act_start_quantity": 1,
|
||||||
|
"act_completion_quantity": 0,
|
||||||
|
"act_implementation": "",
|
||||||
|
"act_instantiate": false,
|
||||||
|
"act_script_type": "",
|
||||||
|
"act_script": "",
|
||||||
|
"act_loop_type": "NONE",
|
||||||
|
"act_test_before": null,
|
||||||
|
"act_loop_maximum": 0,
|
||||||
|
"act_loop_condition": null,
|
||||||
|
"act_loop_cardinality": 0,
|
||||||
|
"act_loop_behavior": null,
|
||||||
|
"act_is_adhoc": false,
|
||||||
|
"act_is_collapsed": false,
|
||||||
|
"act_completion_condition": null,
|
||||||
|
"act_ordering": null,
|
||||||
|
"act_cancel_remaining_instances": true,
|
||||||
|
"act_protocol": null,
|
||||||
|
"act_method": null,
|
||||||
|
"act_is_global": false,
|
||||||
|
"act_referer": null,
|
||||||
|
"act_default_flow": 0,
|
||||||
|
"act_master_diagram": null,
|
||||||
|
"bou_x": 634,
|
||||||
|
"bou_y": 331,
|
||||||
|
"bou_width": 100,
|
||||||
|
"bou_height": 50,
|
||||||
|
"bou_container": "bpmnDiagram",
|
||||||
|
"bou_element_id": "70770714052b04ccbda05a2045860900"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"act_uid": "43669577152b05b69daabe5029145631",
|
||||||
|
"act_name": "Task # 6",
|
||||||
|
"act_type": "TASK",
|
||||||
|
"act_task_type": "EMPTY",
|
||||||
|
"act_is_for_compensation": false,
|
||||||
|
"act_start_quantity": 1,
|
||||||
|
"act_completion_quantity": 0,
|
||||||
|
"act_implementation": "",
|
||||||
|
"act_instantiate": false,
|
||||||
|
"act_script_type": "",
|
||||||
|
"act_script": "",
|
||||||
|
"act_loop_type": "NONE",
|
||||||
|
"act_test_before": null,
|
||||||
|
"act_loop_maximum": 0,
|
||||||
|
"act_loop_condition": null,
|
||||||
|
"act_loop_cardinality": 0,
|
||||||
|
"act_loop_behavior": null,
|
||||||
|
"act_is_adhoc": false,
|
||||||
|
"act_is_collapsed": false,
|
||||||
|
"act_completion_condition": null,
|
||||||
|
"act_ordering": null,
|
||||||
|
"act_cancel_remaining_instances": true,
|
||||||
|
"act_protocol": null,
|
||||||
|
"act_method": null,
|
||||||
|
"act_is_global": false,
|
||||||
|
"act_referer": null,
|
||||||
|
"act_default_flow": 0,
|
||||||
|
"act_master_diagram": null,
|
||||||
|
"bou_x": 429,
|
||||||
|
"bou_y": 531,
|
||||||
|
"bou_width": 100,
|
||||||
|
"bou_height": 50,
|
||||||
|
"bou_container": "bpmnDiagram",
|
||||||
|
"bou_element_id": "70770714052b04ccbda05a2045860900"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"events": [
|
||||||
|
{
|
||||||
|
"evn_uid": "55171305452b04cd3da08c9074517180",
|
||||||
|
"evn_name": "Start # 1",
|
||||||
|
"evn_type": "START",
|
||||||
|
"evn_marker": "MESSAGE",
|
||||||
|
"evn_is_interrupting": true,
|
||||||
|
"evn_cancel_activity": false,
|
||||||
|
"evn_activity_ref": null,
|
||||||
|
"evn_wait_for_completion": false,
|
||||||
|
"evn_error_name": null,
|
||||||
|
"evn_error_code": null,
|
||||||
|
"evn_escalation_name": null,
|
||||||
|
"evn_escalation_code": null,
|
||||||
|
"evn_message": "LEAD",
|
||||||
|
"evn_operation_name": null,
|
||||||
|
"evn_operation_implementation_ref": null,
|
||||||
|
"evn_time_date": null,
|
||||||
|
"evn_time_cycle": null,
|
||||||
|
"evn_time_duration": null,
|
||||||
|
"evn_behavior": "CATCH",
|
||||||
|
"bou_x": 367,
|
||||||
|
"bou_y": 32,
|
||||||
|
"bou_width": 33,
|
||||||
|
"bou_height": 33,
|
||||||
|
"bou_container": "bpmnDiagram",
|
||||||
|
"bou_element_id": "70770714052b04ccbda05a2045860900"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"evn_uid": "57589846552b05b73daea69075516155",
|
||||||
|
"evn_name": "End # 1",
|
||||||
|
"evn_type": "END",
|
||||||
|
"evn_marker": "EMPTY",
|
||||||
|
"evn_is_interrupting": true,
|
||||||
|
"evn_cancel_activity": false,
|
||||||
|
"evn_activity_ref": null,
|
||||||
|
"evn_wait_for_completion": false,
|
||||||
|
"evn_error_name": null,
|
||||||
|
"evn_error_code": null,
|
||||||
|
"evn_escalation_name": null,
|
||||||
|
"evn_escalation_code": null,
|
||||||
|
"evn_message": "",
|
||||||
|
"evn_operation_name": null,
|
||||||
|
"evn_operation_implementation_ref": null,
|
||||||
|
"evn_time_date": null,
|
||||||
|
"evn_time_cycle": null,
|
||||||
|
"evn_time_duration": null,
|
||||||
|
"evn_behavior": "THROW",
|
||||||
|
"bou_x": 579,
|
||||||
|
"bou_y": 621,
|
||||||
|
"bou_width": 33,
|
||||||
|
"bou_height": 33,
|
||||||
|
"bou_container": "bpmnDiagram",
|
||||||
|
"bou_element_id": "70770714052b04ccbda05a2045860900"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"gateways": [
|
||||||
|
{
|
||||||
|
"gat_uid": "37050857352b04ceada1799074850936",
|
||||||
|
"gat_name": "Parallel by Evaluation # 1",
|
||||||
|
"gat_type": "PARALLEL_EVALUATION",
|
||||||
|
"gat_direction": null,
|
||||||
|
"gat_instantiate": false,
|
||||||
|
"gat_event_gateway_type": "NONE",
|
||||||
|
"gat_activation_count": 0,
|
||||||
|
"gat_waiting_for_start": true,
|
||||||
|
"gat_default_flow": 0,
|
||||||
|
"bou_x": 363,
|
||||||
|
"bou_y": 205,
|
||||||
|
"bou_width": 45,
|
||||||
|
"bou_height": 45,
|
||||||
|
"bou_container": "bpmnDiagram",
|
||||||
|
"bou_element_id": "70770714052b04ccbda05a2045860900"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"gat_uid": "96977315752b04d25da5fb6015463105",
|
||||||
|
"gat_name": "Parallel Join # 1",
|
||||||
|
"gat_type": "PARALLEL_JOIN",
|
||||||
|
"gat_direction": null,
|
||||||
|
"gat_instantiate": false,
|
||||||
|
"gat_event_gateway_type": "NONE",
|
||||||
|
"gat_activation_count": 0,
|
||||||
|
"gat_waiting_for_start": true,
|
||||||
|
"gat_default_flow": 0,
|
||||||
|
"bou_x": 391,
|
||||||
|
"bou_y": 457,
|
||||||
|
"bou_width": 45,
|
||||||
|
"bou_height": 45,
|
||||||
|
"bou_container": "bpmnDiagram",
|
||||||
|
"bou_element_id": "70770714052b04ccbda05a2045860900"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"flows": [
|
||||||
|
{
|
||||||
|
"flo_uid": "85852223452b04cd9da0d24062477197",
|
||||||
|
"flo_type": "SEQUENCE",
|
||||||
|
"flo_name": null,
|
||||||
|
"flo_element_origin": "55171305452b04cd3da08c9074517180",
|
||||||
|
"flo_element_origin_type": "bpmnEvent",
|
||||||
|
"flo_element_dest": "20130110852b04cd0da0710001476342",
|
||||||
|
"flo_element_dest_type": "bpmnActivity",
|
||||||
|
"flo_is_inmediate": true,
|
||||||
|
"flo_condition": null,
|
||||||
|
"flo_state": [
|
||||||
|
{
|
||||||
|
"x": 382,
|
||||||
|
"y": 67
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 382,
|
||||||
|
"y": 87
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 383,
|
||||||
|
"y": 87
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 383,
|
||||||
|
"y": 108
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"flo_x1": 382,
|
||||||
|
"flo_y1": 114,
|
||||||
|
"flo_x2": 388,
|
||||||
|
"flo_y2": 114
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flo_uid": "98521752352b04cf9da1bc8031684305",
|
||||||
|
"flo_type": "SEQUENCE",
|
||||||
|
"flo_name": null,
|
||||||
|
"flo_element_origin": "20130110852b04cd0da0710001476342",
|
||||||
|
"flo_element_origin_type": "bpmnActivity",
|
||||||
|
"flo_element_dest": "37050857352b04ceada1799074850936",
|
||||||
|
"flo_element_dest_type": "bpmnGateway",
|
||||||
|
"flo_is_inmediate": true,
|
||||||
|
"flo_condition": null,
|
||||||
|
"flo_state": [
|
||||||
|
{
|
||||||
|
"x": 383,
|
||||||
|
"y": 163
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 383,
|
||||||
|
"y": 184
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 386,
|
||||||
|
"y": 184
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 386,
|
||||||
|
"y": 205
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"flo_x1": 383,
|
||||||
|
"flo_y1": 205,
|
||||||
|
"flo_x2": 386,
|
||||||
|
"flo_y2": 205
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flo_uid": "51012823052b04d00da25b0076746454",
|
||||||
|
"flo_type": "SEQUENCE",
|
||||||
|
"flo_name": null,
|
||||||
|
"flo_element_origin": "37050857352b04ceada1799074850936",
|
||||||
|
"flo_element_origin_type": "bpmnGateway",
|
||||||
|
"flo_element_dest": "55963679852b04cfdda1ca7057330775",
|
||||||
|
"flo_element_dest_type": "bpmnActivity",
|
||||||
|
"flo_is_inmediate": true,
|
||||||
|
"flo_condition": null,
|
||||||
|
"flo_state": [
|
||||||
|
{
|
||||||
|
"x": 386,
|
||||||
|
"y": 250
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 386,
|
||||||
|
"y": 287
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 184,
|
||||||
|
"y": 287
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 184,
|
||||||
|
"y": 325
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"flo_x1": 386,
|
||||||
|
"flo_y1": 325,
|
||||||
|
"flo_x2": 223,
|
||||||
|
"flo_y2": 325
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flo_uid": "21566164052b04d06da2be5053173210",
|
||||||
|
"flo_type": "SEQUENCE",
|
||||||
|
"flo_name": null,
|
||||||
|
"flo_element_origin": "37050857352b04ceada1799074850936",
|
||||||
|
"flo_element_origin_type": "bpmnGateway",
|
||||||
|
"flo_element_dest": "36275645952b04d03da2683059221904",
|
||||||
|
"flo_element_dest_type": "bpmnActivity",
|
||||||
|
"flo_is_inmediate": true,
|
||||||
|
"flo_condition": null,
|
||||||
|
"flo_state": [
|
||||||
|
{
|
||||||
|
"x": 386,
|
||||||
|
"y": 250
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 386,
|
||||||
|
"y": 288
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 385,
|
||||||
|
"y": 288
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 385,
|
||||||
|
"y": 327
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"flo_x1": 386,
|
||||||
|
"flo_y1": 336,
|
||||||
|
"flo_x2": 439,
|
||||||
|
"flo_y2": 336
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flo_uid": "13502002652b04d0eda4297008861549",
|
||||||
|
"flo_type": "SEQUENCE",
|
||||||
|
"flo_name": null,
|
||||||
|
"flo_element_origin": "37050857352b04ceada1799074850936",
|
||||||
|
"flo_element_origin_type": "bpmnGateway",
|
||||||
|
"flo_element_dest": "39924412652b04d0bda3cc4088664712",
|
||||||
|
"flo_element_dest_type": "bpmnActivity",
|
||||||
|
"flo_is_inmediate": true,
|
||||||
|
"flo_condition": null,
|
||||||
|
"flo_state": [
|
||||||
|
{
|
||||||
|
"x": 386,
|
||||||
|
"y": 250
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 386,
|
||||||
|
"y": 289
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 516,
|
||||||
|
"y": 289
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 516,
|
||||||
|
"y": 329
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"flo_x1": 386,
|
||||||
|
"flo_y1": 341,
|
||||||
|
"flo_x2": 556,
|
||||||
|
"flo_y2": 341,
|
||||||
|
"_action": "CREATE"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flo_uid": "51780192952b04d1ada5389065057435",
|
||||||
|
"flo_type": "SEQUENCE",
|
||||||
|
"flo_name": null,
|
||||||
|
"flo_element_origin": "37050857352b04ceada1799074850936",
|
||||||
|
"flo_element_origin_type": "bpmnGateway",
|
||||||
|
"flo_element_dest": "81865611252b04d14da4f39027749188",
|
||||||
|
"flo_element_dest_type": "bpmnActivity",
|
||||||
|
"flo_is_inmediate": true,
|
||||||
|
"flo_condition": null,
|
||||||
|
"flo_state": [
|
||||||
|
{
|
||||||
|
"x": 386,
|
||||||
|
"y": 250
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 386,
|
||||||
|
"y": 289
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 683,
|
||||||
|
"y": 289
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 683,
|
||||||
|
"y": 329
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"flo_x1": 386,
|
||||||
|
"flo_y1": 329,
|
||||||
|
"flo_x2": 683,
|
||||||
|
"flo_y2": 329
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flo_uid": "11527570252b04d29da6573070436369",
|
||||||
|
"flo_type": "SEQUENCE",
|
||||||
|
"flo_name": null,
|
||||||
|
"flo_element_origin": "36275645952b04d03da2683059221904",
|
||||||
|
"flo_element_origin_type": "bpmnActivity",
|
||||||
|
"flo_element_dest": "96977315752b04d25da5fb6015463105",
|
||||||
|
"flo_element_dest_type": "bpmnGateway",
|
||||||
|
"flo_is_inmediate": true,
|
||||||
|
"flo_condition": null,
|
||||||
|
"flo_state": [
|
||||||
|
{
|
||||||
|
"x": 385,
|
||||||
|
"y": 382
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 385,
|
||||||
|
"y": 419
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 414,
|
||||||
|
"y": 419
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 414,
|
||||||
|
"y": 457
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"flo_x1": 385,
|
||||||
|
"flo_y1": 480,
|
||||||
|
"flo_x2": 414,
|
||||||
|
"flo_y2": 480
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flo_uid": "99492263452b04d2dda6d16026220307",
|
||||||
|
"flo_type": "SEQUENCE",
|
||||||
|
"flo_name": null,
|
||||||
|
"flo_element_origin": "39924412652b04d0bda3cc4088664712",
|
||||||
|
"flo_element_origin_type": "bpmnActivity",
|
||||||
|
"flo_element_dest": "96977315752b04d25da5fb6015463105",
|
||||||
|
"flo_element_dest_type": "bpmnGateway",
|
||||||
|
"flo_is_inmediate": true,
|
||||||
|
"flo_condition": null,
|
||||||
|
"flo_state": [
|
||||||
|
{
|
||||||
|
"x": 516,
|
||||||
|
"y": 384
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 516,
|
||||||
|
"y": 420
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 414,
|
||||||
|
"y": 420
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 414,
|
||||||
|
"y": 457
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"flo_x1": 516,
|
||||||
|
"flo_y1": 480,
|
||||||
|
"flo_x2": 414,
|
||||||
|
"flo_y2": 480
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flo_uid": "61995297952b04d31da7337053386832",
|
||||||
|
"flo_type": "SEQUENCE",
|
||||||
|
"flo_name": null,
|
||||||
|
"flo_element_origin": "81865611252b04d14da4f39027749188",
|
||||||
|
"flo_element_origin_type": "bpmnActivity",
|
||||||
|
"flo_element_dest": "96977315752b04d25da5fb6015463105",
|
||||||
|
"flo_element_dest_type": "bpmnGateway",
|
||||||
|
"flo_is_inmediate": true,
|
||||||
|
"flo_condition": null,
|
||||||
|
"flo_state": [
|
||||||
|
{
|
||||||
|
"x": 683,
|
||||||
|
"y": 384
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 683,
|
||||||
|
"y": 480
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 436,
|
||||||
|
"y": 480
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"flo_x1": 683,
|
||||||
|
"flo_y1": 503,
|
||||||
|
"flo_x2": 436,
|
||||||
|
"flo_y2": 503
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flo_uid": "52373453752b04d34da7826007505462",
|
||||||
|
"flo_type": "SEQUENCE",
|
||||||
|
"flo_name": null,
|
||||||
|
"flo_element_origin": "55963679852b04cfdda1ca7057330775",
|
||||||
|
"flo_element_origin_type": "bpmnActivity",
|
||||||
|
"flo_element_dest": "96977315752b04d25da5fb6015463105",
|
||||||
|
"flo_element_dest_type": "bpmnGateway",
|
||||||
|
"flo_is_inmediate": true,
|
||||||
|
"flo_condition": null,
|
||||||
|
"flo_state": [
|
||||||
|
{
|
||||||
|
"x": 184,
|
||||||
|
"y": 380
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 184,
|
||||||
|
"y": 480
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 391,
|
||||||
|
"y": 480
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"flo_x1": 184,
|
||||||
|
"flo_y1": 503,
|
||||||
|
"flo_x2": 391,
|
||||||
|
"flo_y2": 503
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flo_uid": "98839915852b05b6cdab1d9031584510",
|
||||||
|
"flo_type": "SEQUENCE",
|
||||||
|
"flo_name": null,
|
||||||
|
"flo_element_origin": "96977315752b04d25da5fb6015463105",
|
||||||
|
"flo_element_origin_type": "bpmnGateway",
|
||||||
|
"flo_element_dest": "43669577152b05b69daabe5029145631",
|
||||||
|
"flo_element_dest_type": "bpmnActivity",
|
||||||
|
"flo_is_inmediate": true,
|
||||||
|
"flo_condition": null,
|
||||||
|
"flo_state": [
|
||||||
|
{
|
||||||
|
"x": 414,
|
||||||
|
"y": 457
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 414,
|
||||||
|
"y": 437
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 478,
|
||||||
|
"y": 437
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 478,
|
||||||
|
"y": 529
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"flo_x1": 414,
|
||||||
|
"flo_y1": 600,
|
||||||
|
"flo_x2": 443,
|
||||||
|
"flo_y2": 600
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"flo_uid": "30547450952b05b75daefd9056968485",
|
||||||
|
"flo_type": "SEQUENCE",
|
||||||
|
"flo_name": null,
|
||||||
|
"flo_element_origin": "43669577152b05b69daabe5029145631",
|
||||||
|
"flo_element_origin_type": "bpmnActivity",
|
||||||
|
"flo_element_dest": "57589846552b05b73daea69075516155",
|
||||||
|
"flo_element_dest_type": "bpmnEvent",
|
||||||
|
"flo_is_inmediate": true,
|
||||||
|
"flo_condition": null,
|
||||||
|
"flo_state": [
|
||||||
|
{
|
||||||
|
"x": 478,
|
||||||
|
"y": 529
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 478,
|
||||||
|
"y": 509
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 594,
|
||||||
|
"y": 509
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 594,
|
||||||
|
"y": 619
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"flo_x1": 478,
|
||||||
|
"flo_y1": 664,
|
||||||
|
"flo_x2": 531,
|
||||||
|
"flo_y2": 664
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"artifacts": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -296,7 +296,7 @@ class DynaForm
|
|||||||
$processUid = $arrayDataUid["PRO_UID"];
|
$processUid = $arrayDataUid["PRO_UID"];
|
||||||
|
|
||||||
//Verify data
|
//Verify data
|
||||||
if (!$this->dynaFormAssignedStep($dynaFormUid, $processUid)) {
|
if ($this->dynaFormAssignedStep($dynaFormUid, $processUid)) {
|
||||||
throw (new \Exception("You cannot delete this Dynaform while it is assigned to a step"));
|
throw (new \Exception("You cannot delete this Dynaform while it is assigned to a step"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ class OutputDocument
|
|||||||
$aRow['OUT_DOC_TITLE'] = $outputDocumentObj['OUT_DOC_TITLE'];
|
$aRow['OUT_DOC_TITLE'] = $outputDocumentObj['OUT_DOC_TITLE'];
|
||||||
$aRow['OUT_DOC_DESCRIPTION'] = $outputDocumentObj['OUT_DOC_DESCRIPTION'];
|
$aRow['OUT_DOC_DESCRIPTION'] = $outputDocumentObj['OUT_DOC_DESCRIPTION'];
|
||||||
} else {
|
} else {
|
||||||
$outputDocArray[] = array('out_doc_uid' => $aRow['OUT_DOC_UID'],
|
$outputDocArray = array('out_doc_uid' => $aRow['OUT_DOC_UID'],
|
||||||
'out_doc_title' => $aRow['OUT_DOC_TITLE'],
|
'out_doc_title' => $aRow['OUT_DOC_TITLE'],
|
||||||
'out_doc_description' => $aRow['OUT_DOC_DESCRIPTION'],
|
'out_doc_description' => $aRow['OUT_DOC_DESCRIPTION'],
|
||||||
'out_doc_filename' => $aRow['OUT_DOC_FILENAME'],
|
'out_doc_filename' => $aRow['OUT_DOC_FILENAME'],
|
||||||
|
|||||||
@@ -296,5 +296,44 @@ class ProcessSupervisor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Assign a supervisor of a process
|
||||||
|
*
|
||||||
|
* @param string $sProcessUID
|
||||||
|
* @param string $sUsrUID
|
||||||
|
* @param string $sTypeUID
|
||||||
|
* @access public
|
||||||
|
*/
|
||||||
|
public function addSupervisor($sProcessUID, $sUsrUID, $sTypeUID)
|
||||||
|
{
|
||||||
|
$oProcessUser = new \ProcessUser ( );
|
||||||
|
$puType = 'SUPERVISOR';
|
||||||
|
if ($sTypeUID == 'Group') {
|
||||||
|
$puType = 'GROUP_SUPERVISOR';
|
||||||
|
}
|
||||||
|
|
||||||
|
$oTypeAssigneeG = \GroupwfPeer::retrieveByPK( $sUsrUID );
|
||||||
|
$oTypeAssigneeU = \UsersPeer::retrieveByPK( $sUsrUID );
|
||||||
|
|
||||||
|
if (is_null( $oTypeAssigneeG ) && is_null( $oTypeAssigneeU ) ) {
|
||||||
|
throw (new \Exception( 'This id: '. $sUsrUID .' do not correspond to a registered ' .$sTypeUID ));
|
||||||
|
}
|
||||||
|
if (is_null( $oTypeAssigneeG ) && ! is_null( $oTypeAssigneeU) ) {
|
||||||
|
$type = "user";
|
||||||
|
if ( $type != $assType ) {
|
||||||
|
throw (new \Exception( 'This id: '. $sUsrUID .' do not correspond to a registered ' .$sTypeUID ));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (! is_null( $oTypeAssigneeG ) && is_null( $oTypeAssigneeU ) ) {
|
||||||
|
$type = "group";
|
||||||
|
if ( $type != $assType ) {
|
||||||
|
throw (new \Exception( 'This id: '. $sUsrUID .' do not correspond to a registered ' .$sTypeUID ));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$oProcessUser->create(array('PU_UID' => \G::generateUniqueID(), 'PRO_UID' => $sProcessUID, 'USR_UID' => $sUsrUID, 'PU_TYPE' => $puType));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class ProcessSupervisors extends Api
|
|||||||
*
|
*
|
||||||
* @url GET /:prjUid/supervisors
|
* @url GET /:prjUid/supervisors
|
||||||
*/
|
*/
|
||||||
public function doGetProjectSupervisors($prjUid, $filter = '', $start = null, $limit = null)
|
public function doGetSupervisors($prjUid, $filter = '', $start = null, $limit = null)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$supervisor = new \BusinessModel\ProcessSupervisor();
|
$supervisor = new \BusinessModel\ProcessSupervisor();
|
||||||
@@ -38,7 +38,7 @@ class ProcessSupervisors extends Api
|
|||||||
*
|
*
|
||||||
* @url GET /:prjUid/inputdocument-supervisor
|
* @url GET /:prjUid/inputdocument-supervisor
|
||||||
*/
|
*/
|
||||||
public function doGetProjectInputDocumentSupervisor($prjUid)
|
public function doGetInputDocumentSupervisor($prjUid)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$supervisor = new \BusinessModel\ProcessSupervisor();
|
$supervisor = new \BusinessModel\ProcessSupervisor();
|
||||||
@@ -57,7 +57,7 @@ class ProcessSupervisors extends Api
|
|||||||
*
|
*
|
||||||
* @url GET /:prjUid/dynaform-supervisor
|
* @url GET /:prjUid/dynaform-supervisor
|
||||||
*/
|
*/
|
||||||
public function doGetProjectDynaformSupervisor($prjUid)
|
public function doGetDynaformSupervisor($prjUid)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$supervisor = new \BusinessModel\ProcessSupervisor();
|
$supervisor = new \BusinessModel\ProcessSupervisor();
|
||||||
@@ -128,4 +128,28 @@ class ProcessSupervisors extends Api
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @url POST /:prjUid/supervisor
|
||||||
|
*
|
||||||
|
* @param string $prjUid
|
||||||
|
* @param string $sup_uid
|
||||||
|
* @param string $sup_type {@choice user,group}
|
||||||
|
*
|
||||||
|
* @status 201
|
||||||
|
*/
|
||||||
|
public function doPostSupervisors($prjUid, $sup_uid, $sup_type)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$supervisor = new \BusinessModel\ProcessSupervisor();
|
||||||
|
$sup_type=ucwords($sup_type);
|
||||||
|
$arrayData = $supervisor->addSupervisor($prjUid, $sup_uid, $sup_type);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
//Response
|
||||||
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
|
}
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user