diff --git a/apiary.apib b/apiary.apib index 62db6ef01..918f59ce8 100644 --- a/apiary.apib +++ b/apiary.apib @@ -4,12 +4,72 @@ HOST: http://www.processmaker.com/api/1.0/{workspace}/ Welcome to ProcessMaker API documentation. All comments can be written in (support [Markdown](http://daringfireball.net/projects/markdown/syntax) syntax) - ***(This API is under development yet, please wait for a final v1 release) *** + *(This API is under development yet, please wait for a final v1 release)* --- +-- +Status & Error Codes +This section standardizes the status & error codes used in our system. If it isn't defined here, it MUST NOT be returned. + +#Success + 200 | Ok | Success, payload accompanies response if appropriate. + 201 | Created | Success, the requested resource was created. + 202 | Accepted | Success, but results are not immediately available. + 204 | No Content | Success, no response payload. + 207 | Partial Success | Used for mult-part requests where some items may result in different statuses. + +#Failure + 400 | Invalid Request | One or more parameters were invalid. + 401 | Unauthorized | Unauthorized; missing API key. + 402 | Request Failed | Request failed; insufficient permission. + 403 | Forbidden | Request rejected; invalid API key. + 404 | Not Found | Some object in the request was invalid. + 405 | UNUSED | Method not allowed. + 406 | Not Acceptable | Not acceptable; use application/json; charset=utf-8 + 408 | UNUSED | Request Timeout. + 409 | UNUSED | Conflict. + 410 | UNUSED | Gone. + 413 | Request Too Large | Request too large; send <= 100 messages per batch. + 415 | Request Unparsable | Request unparsable; check POST JSON. + 422 | Request Rejected | Request rejected; could not send message to recipient. + +#Error + 500 | Internal Server Error | Internal service error, ALL HELL IS BREAKING LOOSE! AAAAAAAAHHHHHH!!!!! + 501 | Not Implemented | Method or service not yet implemented. + 503 | Service Unavailable + 507 | UNUSED | Insufficient Storage + + +-- + +-- +Failure Response + +Failure response will be returned when a application failure is present + +##Example +###Request: + > GET /api/1.0/{workspace}/project/{invalid-uid} +###Response: + < 400 + < Content-Type: application/json + { + "code": 32, + "message": "project id invalid", + "errors" : [ + { + "workspace": "workflow", + "method": "POST", + "dev_message": "The uid is invalid because the database does not have a record with that index", + "more_info" : "http://processmaker.com/errors-code/43438" + }, + ] + } + +-- + -- Processmaker OAuth2 ---- #1. Registering an Application First Login on ProcessMaker and go to the following url: @@ -21,23 +81,31 @@ Register your application and get your Client ID and Client Secret credentials. Authorize your app, with following url: - Link: http:///sys/en/neoclassic/oauth2/authorize?response_type=code&client_id=[your-client-d]&scope=view_processes%20edit_processes -After request the url above, it will redirect to the User Login and after that a authorization screen will be displayed to authorize the application. + Link: http:///sys/en/neoclassic/oauth2/authorize?response_type=code&client_id={your-client-d}&scope=view_processes%20edit_processes -Currently there are just two scopes available: "processes_view" and "processes_edit" +Required Parameters | Description | Valid Values +------------------- |:------------- |:--------------------------- +response_type | Response type | **code** +client_id | The Client ID | +scope | API Scope | **view_process**, **edit_process** -After user authorize the application, ProcessMaker will redirect to "URL Redirect" especified on App registration +>***Note.-*** Scope value can have multiples values separated by a single space or its url encode equivalent %20. + +When url above is requested, it will redirect to the User Login and after that a authorization screen will be displayed to authorize the application. + +After the User authorize the application, ProcessMaker will redirect to "URL Redirect (Callback)" of the application. #3. Getting **Access Token** +![Alt text](http://upload.wikimedia.org/wikipedia/commons/7/71/Authentication_flow_for_the_Sent.ly_Plus_API.png "Optional title") + -- Getting Access Token using the **Authorization Code** -Required Parameters | -------------------- | ---------------- -Joan | saag paneer -Sally | vindaloo -Erin | lamb madras +Required Parameters | Description +:------------------ | :------------ +grant_type | Grant type to use, currently we just implementing **authorization_code** +code | Authorization code. POST /token > Authorization: Basic eC1wbS1sb2NhbC1jbGllbnQ6MTc5YWQ0NWM2Y2UyY2I5N2NmMTAyOWUyMTIwNDZlODE= @@ -46,7 +114,7 @@ POST /token "grant_type": "authorization_code", "code": "b4b1b216ab95ef3437f9c68e6c2bf8f7224fd284" } -< 201 +< 200 < Content-Type: application/json { "access_token": "265a378d39998ecfe723dbf04e621c4944950f96", @@ -57,14 +125,22 @@ POST /token } Getting Access Token using the **Refresh Token** + +Required Parameters | Description +:------------------- | :---------------- +grant_type | Grant type, to retrieve a new access token use: **refresh_token** +refresh_token | The refresh token. + + + POST /token > Authorization: Basic eC1wbS1sb2NhbC1jbGllbnQ6MTc5YWQ0NWM2Y2UyY2I5N2NmMTAyOWUyMTIwNDZlODE= > Content-Type: application/json { "grant_type": "authorization_code", - "code": "b4b1b216ab95ef3437f9c68e6c2bf8f7224fd284" + "refresh_token": "c54adcfdb1d99d10be3be3b77ec32a2e402ef7e3" } -< 201 +< 200 < Content-Type: application/json { "access_token": "265a378d39998ecfe723dbf04e621c4944950f96", @@ -75,305 +151,244 @@ POST /token } -- -Error Response -This is the class/response returned when there is a error +Project Resources -- -Error -GET /project/{invalid-uid} +Edit project attributes +GET /project/{prj_uid}/ < 200 < Content-Type: application/json -{ - "error": { - "code": 43438, - "message": "project id invalid", - "errors" : [ - { - "code": 43438, - "message": "project id invalid", - "dev-message": "The uid is invalid because the database does not have a record with that index", - "more-info" : "http://processmaker.com/errors-code/43438" - }, - ] - } +{ + "prj_uid": "154619055527bbbbea27110004783861", + "prj_title": "Project #1", + "prj_description": "Project #1 Description", + "prj_calendar": "", + "prj_category": "", + "prj_summary_dynaform": "", + "prj_derivation_screen": "", + "prj_debug": "", + "prj_show_message": "", + "prj_subprocess": "", + "prj_tri_deleted": "", + "prj_tri_cancelled": "", + "prj_tri_paused": "", + "prj_tri_reasingned": "" } -- -Process Resources +Project Diagram Resources The following is a section of resources related to ProcessMaker Process Definition -- -Resource to get a process information a its design definition -GET /process +List project `diagrams` +GET /project/{prj_uid}/diagrams +< 200 +< Content-Type: application/json +[ + { + "diag_uid": "a5242da840064218638061532405176", + "pro_uid": "8061532405176da5242da84006421863", + "laneset": [], + "lanes": [], + "activities": + [ + { + "act_uid": "278251934525d8ebbfb8565093239226", + "act_name": "Task", + "act_type": "EMPTY", + "bou_x": 235, + "bou_y": 280, + "bou_width": 120, + "bou_height": 60, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + }, + { + "act_uid": "326395445525d8ec1fb8768023935580", + "act_name": "Task", + "act_type": "EMPTY", + "bou_x":611, + "bou_y":170, + "bou_width":120, + "bou_height":60, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + }, + { + "act_uid": "588707952525d8ec4fb88c2038077596", + "act_name": "Task", + "act_type": "EMPTY", + "bou_x":630, + "bou_y":404, + "bou_width":120, + "bou_height":60, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + } + ], + "events": + [ + { + "evn_uid": "960500897525d8eb8fb84b4013700338", + "evn_name":null, + "evn_type":null, + "evn_marker":null, + "evn_is_interrupting":true, + "evn_attached_to":null, + "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_condition":null, + "evn_message":null, + "evn_operation_name":null, + "evn_operation_implementation_ref":null, + "evn_time_date":null, + "evn_time_cycle":null, + "evn_time_duration":null, + "evn_behavior":null, + "bou_x":87, + "bou_y":261, + "bou_width":33, + "bou_height":33, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + }, + { + "evn_uid": "941908090525d8ec7fb8a07093841901", + "evn_name":null, + "evn_type":null, + "evn_marker":null, + "evn_is_interrupting":true, + "evn_attached_to":null, + "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_condition":null, + "evn_message":null, + "evn_operation_name":null, + "evn_operation_implementation_ref":null, + "evn_time_date":null, + "evn_time_cycle":null, + "evn_time_duration":null, + "evn_behavior":null, + "bou_x":903, + "bou_y":303, + "bou_width":33, + "bou_height":33, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + } + ], + "gateways": + [ + { + "gat_uid": "403208160525d8ebefb86a0059076243", + "gat_name":null, + "bou_x":481, + "bou_y":306, + "bou_width":45, + "bou_height":45, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + } + ], + "flows": + [ + { + "flo_uid": "724155752525d8ec9fb8de2003171877", + "flo_type": "SEQUENCE", + "flo_name":null, + "flo_element_origin": "960500897525d8eb8fb84b4013700338", + "flo_element_origin_type": "bpmnEvent", + "flo_element_dest": "278251934525d8ebbfb8565093239226", + "flo_element_dest_type": "bpmnActivity", + "flo_is_inmediate":true, + "flo_condition":null, + "flo_state": + [ + {"x":104,"y":261}, + {"x":104,"y":241}, + {"x":168,"y":241}, + {"x":168,"y":309}, + {"x":233,"y":309} + ] + }, + { + "flo_uid": "891030650525d8eccfb92c9033321037", + "flo_type": "SEQUENCE", + "flo_name":null, + "flo_element_origin": "278251934525d8ebbfb8565093239226", + "flo_element_origin_type": "bpmnActivity", + "flo_element_dest": "403208160525d8ebefb86a0059076243", + "flo_element_dest_type": "bpmnGateway", + "flo_is_inmediate":true, + "flo_condition":null, + "flo_state": + [ + {"x":294,"y":278}, + {"x":294,"y":258}, + {"x":387,"y":258}, + {"x":387,"y":329}, + {"x":481,"y":329} + ] + }, + { + "flo_uid": "785603906525d8ecffb9879037717215", + "flo_type": "SEQUENCE", + "flo_name":null, + "flo_element_origin": "403208160525d8ebefb86a0059076243", + "flo_element_origin_type": "bpmnGateway", + "flo_element_dest": "326395445525d8ec1fb8768023935580", + "flo_element_dest_type": "bpmnActivity", + "flo_is_inmediate":true, + "flo_condition":null, + "flo_state": + [ + {"x":504,"y":306}, + {"x":504,"y":199}, + {"x":609,"y":199} + ] + }, + { + "flo_uid": "531073186525d8ed2fb9d51058983227", + "flo_type": "SEQUENCE", + "flo_name":null, + "flo_element_dest": "588707952525d8ec4fb88c2038077596", + "flo_element_origin": "403208160525d8ebefb86a0059076243", + "flo_element_origin_type": "bpmnGateway", + "flo_element_dest_type": "bpmnActivity", + "flo_is_inmediate":true, + "flo_condition":null, + "flo_state": + [ + {"x":481,"y":329}, + {"x":461,"y":329}, + {"x":461,"y":433}, + {"x":628,"y":433} + ] + } + ], + "artifacts": [] + } +] + +Get a single project `diagram` +GET /project/{prj_uid}/diagram/{dia_uid} < 200 < Content-Type: application/json { - "totalCount": "2", - "processes": [ - { - "PRO_UID": "95053096751af47fbeee6a3088674612", - "PRO_PARENT": "44313230351ae0168e63669021546957", - "PRO_STATUS": "ACTIVE", - "PRO_CATEGORY": "31826415551af47d55e71f9071744090", - "PRO_CREATE_DATE": "2013-06-04 11:02:00", - "PRO_DEBUG": "1", - "USR_UID": "00000000000000000000000000000001", - "USR_USERNAME": "admin", - "USR_FIRSTNAME": "Administrator", - "USR_LASTNAME": " ", - "CATEGORY_UID": "31826415551af47d55e71f9071744090", - "CATEGORY_NAME": "sample cat", - "PRO_CATEGORY_LABEL": "sample cat", - "PRO_TITLE": "sample", - "PRO_DESCRIPTION": "test", - "PRO_DEBUG_LABEL": "On", - "PRO_STATUS_LABEL": "Active", - "PRO_CREATE_USER_LABEL": "Administrator ", - "CASES_COUNT_TO_DO": "1", - "CASES_COUNT_COMPLETED": "1", - "CASES_COUNT_DRAFT": "2", - "CASES_COUNT_CANCELLED": 0, - "CASES_COUNT": 4 - }, - { - "PRO_UID": "44313230351ae0168e63669021546957", - "PRO_PARENT": "44313230351ae0168e63669021546957", - "PRO_STATUS": "ACTIVE", - "PRO_CATEGORY": "", - "PRO_CREATE_DATE": "2013-06-04 11:02:00", - "PRO_DEBUG": "0", - "USR_UID": "00000000000000000000000000000001", - "USR_USERNAME": "admin", - "USR_FIRSTNAME": "Administrator", - "USR_LASTNAME": " ", - "CATEGORY_UID": null, - "CATEGORY_NAME": null, - "PRO_CATEGORY_LABEL": "No Category", - "PRO_TITLE": "test", - "PRO_DESCRIPTION": "test", - "PRO_DEBUG_LABEL": "Off", - "PRO_STATUS_LABEL": "Active", - "PRO_CREATE_USER_LABEL": "Administrator ", - "CASES_COUNT_TO_DO": "3", - "CASES_COUNT_COMPLETED": "1", - "CASES_COUNT_DRAFT": 0, - "CASES_COUNT_CANCELLED": 0, - "CASES_COUNT": 4 - } - ] -} - -Resource to get a process information a its design definition -GET /project/{uid} -< 200 -< Content-Type: application/json -{ - "prj_uid" : "8061532405176da5242da84006421863", - "prj_name" : "sample", - "prj_description" : "sample desc", - "diagrams": - [ - { - "pro_uid": "8061532405176da5242da84006421863", - "laneset": [], - "lanes": [], - "activities": - [ - { - "act_uid": "278251934525d8ebbfb8565093239226", - "act_name": "Task", - "act_type": "EMPTY", - "bou_x": 235, - "bou_y": 280, - "bou_width": 120, - "bou_height": 60, - "bou_container": "bpmnDiagram", - "bou_element_id": "pm_canvas" - }, - { - "act_uid": "326395445525d8ec1fb8768023935580", - "act_name": "Task", - "act_type": "EMPTY", - "bou_x":611, - "bou_y":170, - "bou_width":120, - "bou_height":60, - "bou_container": "bpmnDiagram", - "bou_element_id": "pm_canvas" - }, - { - "act_uid": "588707952525d8ec4fb88c2038077596", - "act_name": "Task", - "act_type": "EMPTY", - "bou_x":630, - "bou_y":404, - "bou_width":120, - "bou_height":60, - "bou_container": "bpmnDiagram", - "bou_element_id": "pm_canvas" - } - ], - "events": - [ - { - "evn_uid": "960500897525d8eb8fb84b4013700338", - "evn_name":null, - "evn_type":null, - "evn_marker":null, - "evn_is_interrupting":true, - "evn_attached_to":null, - "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_condition":null, - "evn_message":null, - "evn_operation_name":null, - "evn_operation_implementation_ref":null, - "evn_time_date":null, - "evn_time_cycle":null, - "evn_time_duration":null, - "evn_behavior":null, - "bou_x":87, - "bou_y":261, - "bou_width":33, - "bou_height":33, - "bou_container": "bpmnDiagram", - "bou_element_id": "pm_canvas" - }, - { - "evn_uid": "941908090525d8ec7fb8a07093841901", - "evn_name":null, - "evn_type":null, - "evn_marker":null, - "evn_is_interrupting":true, - "evn_attached_to":null, - "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_condition":null, - "evn_message":null, - "evn_operation_name":null, - "evn_operation_implementation_ref":null, - "evn_time_date":null, - "evn_time_cycle":null, - "evn_time_duration":null, - "evn_behavior":null, - "bou_x":903, - "bou_y":303, - "bou_width":33, - "bou_height":33, - "bou_container": "bpmnDiagram", - "bou_element_id": "pm_canvas" - } - ], - "gateways": - [ - { - "gat_uid": "403208160525d8ebefb86a0059076243", - "gat_name":null, - "bou_x":481, - "bou_y":306, - "bou_width":45, - "bou_height":45, - "bou_container": "bpmnDiagram", - "bou_element_id": "pm_canvas" - } - ], - "flows": - [ - { - "flo_uid": "724155752525d8ec9fb8de2003171877", - "flo_type": "SEQUENCE", - "flo_name":null, - "flo_element_origin": "960500897525d8eb8fb84b4013700338", - "flo_element_origin_type": "bpmnEvent", - "flo_element_dest": "278251934525d8ebbfb8565093239226", - "flo_element_dest_type": "bpmnActivity", - "flo_is_inmediate":true, - "flo_condition":null, - "flo_state": - [ - {"x":104,"y":261}, - {"x":104,"y":241}, - {"x":168,"y":241}, - {"x":168,"y":309}, - {"x":233,"y":309} - ] - }, - { - "flo_uid": "891030650525d8eccfb92c9033321037", - "flo_type": "SEQUENCE", - "flo_name":null, - "flo_element_origin": "278251934525d8ebbfb8565093239226", - "flo_element_origin_type": "bpmnActivity", - "flo_element_dest": "403208160525d8ebefb86a0059076243", - "flo_element_dest_type": "bpmnGateway", - "flo_is_inmediate":true, - "flo_condition":null, - "flo_state": - [ - {"x":294,"y":278}, - {"x":294,"y":258}, - {"x":387,"y":258}, - {"x":387,"y":329}, - {"x":481,"y":329} - ] - }, - { - "flo_uid": "785603906525d8ecffb9879037717215", - "flo_type": "SEQUENCE", - "flo_name":null, - "flo_element_origin": "403208160525d8ebefb86a0059076243", - "flo_element_origin_type": "bpmnGateway", - "flo_element_dest": "326395445525d8ec1fb8768023935580", - "flo_element_dest_type": "bpmnActivity", - "flo_is_inmediate":true, - "flo_condition":null, - "flo_state": - [ - {"x":504,"y":306}, - {"x":504,"y":199}, - {"x":609,"y":199} - ] - }, - { - "flo_uid": "531073186525d8ed2fb9d51058983227", - "flo_type": "SEQUENCE", - "flo_name":null, - "flo_element_dest": "588707952525d8ec4fb88c2038077596", - "flo_element_origin": "403208160525d8ebefb86a0059076243", - "flo_element_origin_type": "bpmnGateway", - "flo_element_dest_type": "bpmnActivity", - "flo_is_inmediate":true, - "flo_condition":null, - "flo_state": - [ - {"x":481,"y":329}, - {"x":461,"y":329}, - {"x":461,"y":433}, - {"x":628,"y":433} - ] - } - ], - "artifacts": [] - } - ] -} - -Resource to save a new process with its design definition - -POST /process -> Content-Type: application/json -{ + "diag_uid": "a5242da840064218638061532405176", "pro_uid": "8061532405176da5242da84006421863", + "laneset": [], + "lanes": [], "activities": [ { @@ -385,183 +400,7 @@ POST /process "bou_width": 120, "bou_height": 60, "bou_container": "bpmnDiagram", - "bou_element_id": "pm_canvas", - "_extended": - { - "properties": - { - "definition": - { - "tas_priority_variable": "@@SYS_SYS", - "tas_derivation_screen_tpl": "MyTemplate.html" - }, - "assignment_rules": - { - "tas_assign_type": "SELF_SERVICE_EVALUATE", - "tas_assign_variable": "@@SYS_NEXT_USER_TO_BE_ASSIGNED", - "tas_group_variable": "@@SYS_GROUP_TO_BE_ASSIGNED", - "tas_selfservice_timeout": 0, - "tas_selfservice_time": "1", - "tas_selfservice_time_unit": "HOURS", - "tas_selfservice_trigger_uid": "00000000000000000000000000000001" - }, - "timing_control": - { - "tas_transfer_fly": "FALSE", - "tas_duration": "1", - "tas_timeunit": "HOURS", - "tas_type_day": "2", - "tas_calendar": "" - }, - "permissions": - { - "tas_type": "ADHOC" - }, - "case_labels": - { - "tas_def_title": "----- bla bla bla bla bla", - "tas_def_description": "----- bla bla bla bla bla" - }, - "notifications": - { - "send_email": "TRUE", - "tas_def_subject_message": "----- bla bla bla bla bla", - "tas_def_message_type": "text", - "tas_def_message": "----- bla bla bla bla bla", - "tas_def_message_template": "MyTemplate.html" - } - }, - "steps": - { - "steps": - [ - { - "step_uid": "800335382526013ee5406d6046561388", - "step_type_obj": "DYNAFORM", - "step_uid_obj": "480515388526013e03f5323091406324", - "step_position": 1, - "step_mode": "EDIT" - }, - { - "step_uid": "88095604352602cb5509565073250365", - "step_type_obj": "OUTPUT_DOCUMENT", - "step_uid_obj": "86369594352602caa32c5c3004407686", - "step_position": 2, - "step_mode": "" - } - ], - "conditions": - [ - { - "step_uid": "800335382526013ee5406d6046561388", - "step_type_obj": "DYNAFORM", - "step_uid_obj": "480515388526013e03f5323091406324", - "step_condition": "1 == 1", - "step_position": 1 - }, - { - "step_uid": "88095604352602cb5509565073250365", - "step_type_obj": "OUTPUT_DOCUMENT", - "step_uid_obj": "86369594352602caa32c5c3004407686", - "step_condition": "", - "step_position": 2 - } - ], - "triggers": - [ - { - "step_uid": "800335382526013ee5406d6046561388", - "step_type_obj": "DYNAFORM", - "step_uid_obj": "480515388526013e03f5323091406324", - "step_position": 1, - "before": - [ - { - "tri_uid": "287964159526013c6c64bb1071946215", - "st_condition": "'a' == 'a'", - "st_position": 1 - }, - { - "tri_uid": "502389187526013d4304108061369115", - "st_condition": "", - "st_position": 2 - } - ], - "after": [] - }, - { - "step_uid": "88095604352602cb5509565073250365", - "step_type_obj": "OUTPUT_DOCUMENT", - "step_uid_obj": "86369594352602caa32c5c3004407686", - "step_position": 2, - "before": [], - "after": [] - }, - { - "step_uid": "", - "step_type_obj": "", - "step_uid_obj": "", - "step_position": 3, - "before_assignment": - [ - { - "tri_uid": "287964159526013c6c64bb1071946215", - "st_condition": "", - "st_position": 1 - } - ], - "before_routing": - [ - { - "tri_uid": "287964159526013c6c64bb1071946215", - "st_condition": "", - "st_position": 1 - } - ], - "after_routing": - [ - { - "tri_uid": "287964159526013c6c64bb1071946215", - "st_condition": "", - "st_position": 1 - } - ] - } - ] - }, - "users": - [ - { - "usr_uid": "00000000000000000000000000000001", - "tu_type": 1, - "tu_relation": 1 - }, - { - "usr_uid": "232161377508595bd707c70063037530", - "tu_type": 1, - "tu_relation": 1 - }, - { - "usr_uid": "4494108395125254d622141027311419", - "tu_type": 1, - "tu_relation": 2 - } - ], - "users_adhoc": - [ - { - "usr_uid": "00000000000000000000000000000001", - "tu_type": 2, - "tu_relation": 1 - }, - { - "usr_uid": "4494108395125254d622141027311419", - "tu_type": 2, - "tu_relation": 2 - } - ] - }, - "_action": "CREATE" + "bou_element_id": "pm_canvas" }, { "act_uid": "326395445525d8ec1fb8768023935580", @@ -572,62 +411,7 @@ POST /process "bou_width":120, "bou_height":60, "bou_container": "bpmnDiagram", - "bou_element_id": "pm_canvas", - "_extended": - { - "properties": - { - "definition": - { - "tas_priority_variable": "@@SYS_SYS", - "tas_derivation_screen_tpl": "MyTemplate.html" - }, - "assignment_rules": - { - "tas_assign_type": "SELF_SERVICE_EVALUATE", - "tas_assign_variable": "@@SYS_NEXT_USER_TO_BE_ASSIGNED", - "tas_group_variable": "@@SYS_GROUP_TO_BE_ASSIGNED", - "tas_selfservice_timeout": 0, - "tas_selfservice_time": "1", - "tas_selfservice_time_unit": "HOURS", - "tas_selfservice_trigger_uid": "00000000000000000000000000000001" - }, - "timing_control": - { - "tas_transfer_fly": "FALSE", - "tas_duration": "1", - "tas_timeunit": "HOURS", - "tas_type_day": "2", - "tas_calendar": "" - }, - "permissions": - { - "tas_type": "ADHOC" - }, - "case_labels": - { - "tas_def_title": "----- bla bla bla bla bla", - "tas_def_description": "----- bla bla bla bla bla" - }, - "notifications": - { - "send_email": "TRUE", - "tas_def_subject_message": "----- bla bla bla bla bla", - "tas_def_message_type": "text", - "tas_def_message": "----- bla bla bla bla bla", - "tas_def_message_template": "MyTemplate.html" - } - }, - "steps": - { - "steps": [], - "conditions": [], - "triggers": [] - }, - "users": [], - "users_adhoc": [] - }, - "_action": "CREATE" + "bou_element_id": "pm_canvas" }, { "act_uid": "588707952525d8ec4fb88c2038077596", @@ -638,62 +422,7 @@ POST /process "bou_width":120, "bou_height":60, "bou_container": "bpmnDiagram", - "bou_element_id": "pm_canvas", - "_extended": - { - "properties": - { - "definition": - { - "tas_priority_variable": "@@SYS_SYS", - "tas_derivation_screen_tpl": "MyTemplate.html" - }, - "assignment_rules": - { - "tas_assign_type": "SELF_SERVICE_EVALUATE", - "tas_assign_variable": "@@SYS_NEXT_USER_TO_BE_ASSIGNED", - "tas_group_variable": "@@SYS_GROUP_TO_BE_ASSIGNED", - "tas_selfservice_timeout": 0, - "tas_selfservice_time": "1", - "tas_selfservice_time_unit": "HOURS", - "tas_selfservice_trigger_uid": "00000000000000000000000000000001" - }, - "timing_control": - { - "tas_transfer_fly": "FALSE", - "tas_duration": "1", - "tas_timeunit": "HOURS", - "tas_type_day": "2", - "tas_calendar": "" - }, - "permissions": - { - "tas_type": "ADHOC" - }, - "case_labels": - { - "tas_def_title": "----- bla bla bla bla bla", - "tas_def_description": "----- bla bla bla bla bla" - }, - "notifications": - { - "send_email": "TRUE", - "tas_def_subject_message": "----- bla bla bla bla bla", - "tas_def_message_type": "text", - "tas_def_message": "----- bla bla bla bla bla", - "tas_def_message_template": "MyTemplate.html" - } - }, - "steps": - { - "steps": [], - "conditions": [], - "triggers": [] - }, - "users": [], - "users_adhoc": [] - }, - "_action": "CREATE" + "bou_element_id": "pm_canvas" } ], "events": @@ -725,9 +454,7 @@ POST /process "bou_width":33, "bou_height":33, "bou_container": "bpmnDiagram", - "bou_element_id": "pm_canvas", - "_extended":{}, - "_action": "CREATE" + "bou_element_id": "pm_canvas" }, { "evn_uid": "941908090525d8ec7fb8a07093841901", @@ -756,9 +483,7 @@ POST /process "bou_width":33, "bou_height":33, "bou_container": "bpmnDiagram", - "bou_element_id": "pm_canvas", - "_extended":{} - ,"_action": "CREATE" + "bou_element_id": "pm_canvas" } ], "gateways": @@ -771,9 +496,7 @@ POST /process "bou_width":45, "bou_height":45, "bou_container": "bpmnDiagram", - "bou_element_id": "pm_canvas", - "_extended":{}, - "_action": "CREATE" + "bou_element_id": "pm_canvas" } ], "flows": @@ -795,8 +518,7 @@ POST /process {"x":168,"y":241}, {"x":168,"y":309}, {"x":233,"y":309} - ], - "_action": "CREATE" + ] }, { "flo_uid": "891030650525d8eccfb92c9033321037", @@ -815,8 +537,7 @@ POST /process {"x":387,"y":258}, {"x":387,"y":329}, {"x":481,"y":329} - ], - "_action": "CREATE" + ] }, { "flo_uid": "785603906525d8ecffb9879037717215", @@ -833,16 +554,15 @@ POST /process {"x":504,"y":306}, {"x":504,"y":199}, {"x":609,"y":199} - ], - "_action": "CREATE" + ] }, { "flo_uid": "531073186525d8ed2fb9d51058983227", "flo_type": "SEQUENCE", "flo_name":null, + "flo_element_dest": "588707952525d8ec4fb88c2038077596", "flo_element_origin": "403208160525d8ebefb86a0059076243", "flo_element_origin_type": "bpmnGateway", - "flo_element_dest": "588707952525d8ec4fb88c2038077596", "flo_element_dest_type": "bpmnActivity", "flo_is_inmediate":true, "flo_condition":null, @@ -852,785 +572,961 @@ POST /process {"x":461,"y":329}, {"x":461,"y":433}, {"x":628,"y":433} - ], - "_action": "CREATE" + ] } ], "artifacts": [] -}javascript:UserVoice.showPopupWidget(); +} + +Create a new project `diagram` +POST /project/{prj_uid}/diagram/{dia_uid} +> Content-Type: application/json +{ + "dia_uid": "a5242da840064218638061532405176", + "pro_uid": "8061532405176da5242da84006421863", + "laneset": [], + "lanes": [], + "activities": + [ + { + "act_uid": "278251934525d8ebbfb8565093239226", + "act_name": "Task", + "act_type": "EMPTY", + "bou_x": 235, + "bou_y": 280, + "bou_width": 120, + "bou_height": 60, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + }, + { + "act_uid": "326395445525d8ec1fb8768023935580", + "act_name": "Task", + "act_type": "EMPTY", + "bou_x":611, + "bou_y":170, + "bou_width":120, + "bou_height":60, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + }, + { + "act_uid": "588707952525d8ec4fb88c2038077596", + "act_name": "Task", + "act_type": "EMPTY", + "bou_x":630, + "bou_y":404, + "bou_width":120, + "bou_height":60, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + } + ], + "events": + [ + { + "evn_uid": "960500897525d8eb8fb84b4013700338", + "evn_name":null, + "evn_type":null, + "evn_marker":null, + "evn_is_interrupting":true, + "evn_attached_to":null, + "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_condition":null, + "evn_message":null, + "evn_operation_name":null, + "evn_operation_implementation_ref":null, + "evn_time_date":null, + "evn_time_cycle":null, + "evn_time_duration":null, + "evn_behavior":null, + "bou_x":87, + "bou_y":261, + "bou_width":33, + "bou_height":33, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + }, + { + "evn_uid": "941908090525d8ec7fb8a07093841901", + "evn_name":null, + "evn_type":null, + "evn_marker":null, + "evn_is_interrupting":true, + "evn_attached_to":null, + "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_condition":null, + "evn_message":null, + "evn_operation_name":null, + "evn_operation_implementation_ref":null, + "evn_time_date":null, + "evn_time_cycle":null, + "evn_time_duration":null, + "evn_behavior":null, + "bou_x":903, + "bou_y":303, + "bou_width":33, + "bou_height":33, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + } + ], + "gateways": + [ + { + "gat_uid": "403208160525d8ebefb86a0059076243", + "gat_name":null, + "bou_x":481, + "bou_y":306, + "bou_width":45, + "bou_height":45, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + } + ], + "flows": + [ + { + "flo_uid": "724155752525d8ec9fb8de2003171877", + "flo_type": "SEQUENCE", + "flo_name":null, + "flo_element_origin": "960500897525d8eb8fb84b4013700338", + "flo_element_origin_type": "bpmnEvent", + "flo_element_dest": "278251934525d8ebbfb8565093239226", + "flo_element_dest_type": "bpmnActivity", + "flo_is_inmediate":true, + "flo_condition":null, + "flo_state": + [ + {"x":104,"y":261}, + {"x":104,"y":241}, + {"x":168,"y":241}, + {"x":168,"y":309}, + {"x":233,"y":309} + ] + }, + { + "flo_uid": "891030650525d8eccfb92c9033321037", + "flo_type": "SEQUENCE", + "flo_name":null, + "flo_element_origin": "278251934525d8ebbfb8565093239226", + "flo_element_origin_type": "bpmnActivity", + "flo_element_dest": "403208160525d8ebefb86a0059076243", + "flo_element_dest_type": "bpmnGateway", + "flo_is_inmediate":true, + "flo_condition":null, + "flo_state": + [ + {"x":294,"y":278}, + {"x":294,"y":258}, + {"x":387,"y":258}, + {"x":387,"y":329}, + {"x":481,"y":329} + ] + }, + { + "flo_uid": "785603906525d8ecffb9879037717215", + "flo_type": "SEQUENCE", + "flo_name":null, + "flo_element_origin": "403208160525d8ebefb86a0059076243", + "flo_element_origin_type": "bpmnGateway", + "flo_element_dest": "326395445525d8ec1fb8768023935580", + "flo_element_dest_type": "bpmnActivity", + "flo_is_inmediate":true, + "flo_condition":null, + "flo_state": + [ + {"x":504,"y":306}, + {"x":504,"y":199}, + {"x":609,"y":199} + ] + }, + { + "flo_uid": "531073186525d8ed2fb9d51058983227", + "flo_type": "SEQUENCE", + "flo_name":null, + "flo_element_dest": "588707952525d8ec4fb88c2038077596", + "flo_element_origin": "403208160525d8ebefb86a0059076243", + "flo_element_origin_type": "bpmnGateway", + "flo_element_dest_type": "bpmnActivity", + "flo_is_inmediate":true, + "flo_condition":null, + "flo_state": + [ + {"x":481,"y":329}, + {"x":461,"y":329}, + {"x":461,"y":433}, + {"x":628,"y":433} + ] + } + ], + "artifacts": [] +} < 201 < Content-Type: application/json -{ "success": true, "url": "Saved Successfully" } - -This resource allows you to update process information and design - -*NOTE.- There are three fields that are automatically filled by the system: -PRO_UPDATE_DATE, PRO_CREATE_DATE and PRO_CREATE_USER* -PUT /process/{id} -{javascript:UserVoice.showPopupWidget(); - "process": { - "PRO_UID": "28814925552289251e5a8d5026402706", - "PRO_TITLE": "Sample 1", - "PRO_DESCRIPTION" : "Process Sample #1 Description", - "PRO_PARENT": "28814925552289251e5a8d5026402706", - "PRO_TIME": 1, - "PRO_TIMEUNIT": "DAYS", - "PRO_STATUS": "ACTIVE", - "PRO_TYPE_DAY": "", - "PRO_TYPE": "NORMAL", - "PRO_ASSIGNMENT": "FALSE", - "PRO_SHOW_MAP": 0, - "PRO_SHOW_MESSAGE": 0, - "PRO_SUBPROCESS": 0, - "PRO_TRI_DELETED": "", - "PRO_TRI_CANCELED": "", - "PRO_TRI_PAUSED": "", - "PRO_TRI_REASSIGNED": "", - "PRO_SHOW_DELEGATE": 0, - "PRO_SHOW_DYNAFORM": 0, - "PRO_CATEGORY": "", - "PRO_SUB_CATEGORY": "", - "PRO_INDUSTRY": 0, - "PRO_HEIGHT": 5000, - "PRO_WIDTH": 10000, - "PRO_TITLE_X": 0, - "PRO_TITLE_Y": 0, - "PRO_DEBUG": 0, - "PRO_DYNAFORMS": "", - "PRO_DERIVATION_SCREEN_TPL": "", - "TASKS": [ - { - "TAS_UID": "6200372215228a3ff688846084339195", - "TAS_TITLE": "Task 3", - "TAS_DECSRIPTION": "", - "PRO_UID": "28814925552289251e5a8d5026402706", - "TAS_TYPE": "NORMAL", - "TAS_DURATION": 1, - "TAS_DELAY_TYPE": "", - "TAS_TEMPORIZER": 0, - "TAS_TYPE_DAY": "", - "TAS_TIMEUNIT": "DAYS", - "TAS_ALERT": "FALSE", - "TAS_PRIORITY_VARIABLE": "", - "TAS_ASSIGN_TYPE": "BALANCED", - "TAS_ASSIGN_VARIABLE": "@@SYS_NEXT_USER_TO_BE_ASSIGNED", - "TAS_GROUP_VARIABLE": "", - "TAS_MI_INSTANCE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCE", - "TAS_MI_COMPLETE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCES_COMPLETE", - "TAS_ASSIGN_LOCATION": "FALSE", - "TAS_ASSIGN_LOCATION_ADHOC": "FALSE", - "TAS_TRANSFER_FLY": "FALSE", - "TAS_LAST_ASSIGNED": 0, - "TAS_USER": "", - "TAS_CAN_UPLOAD": "FALSE", - "TAS_VIEW_UPLOAD": "FALSE", - "TAS_VIEW_ADDITIONAL_DOCUMENTATION": "FALSE", - "TAS_CAN_CANCEL": "FALSE", - "TAS_OWNER_APP": "FALSE", - "STG_UID": "", - "TAS_CAN_PAUSE": "FALSE", - "TAS_CAN_SEND_MESSAGE": "TRUE", - "TAS_CAN_DELETE_DOCS": "FALSE", - "TAS_SELF_SERVICE": "FALSE", - "TAS_START": "FALSE", - "TAS_TO_LAST_USER": "FALSE", - "TAS_SEND_LAST_EMAIL": "FALSE", - "TAS_DERIVATION": "NORMAL", - "TAS_POSX": 678, - "TAS_POSY": 413, - "TAS_WIDTH": 165, - "TAS_HEIGHT": 40, - "TAS_COLOR": "", - "TAS_EVN_UID": "", - "TAS_BOUNDARY": "", - "TAS_DERIVATION_SCREEN_TPL": "", - "TAS_SELFSERVICE_TIMEOUT": 0, - "TAS_SELFSERVICE_TIME": "", - "TAS_SELFSERVICE_TIME_UNIT": "", - "TAS_SELFSERVICE_TRIGGER_UID": "" - }, - { - "TAS_UID": "782789913522892553babf1063070108", - "TAS_TITLE": "Task 1", - "TAS_DECSRIPTION": "", - "PRO_UID": "28814925552289251e5a8d5026402706", - "TAS_TYPE": "NORMAL", - "TAS_DURATION": 1, - "TAS_DELAY_TYPE": "", - "TAS_TEMPORIZER": 0, - "TAS_TYPE_DAY": "", - "TAS_TIMEUNIT": "DAYS", - "TAS_ALERT": "FALSE", - "TAS_PRIORITY_VARIABLE": "", - "TAS_ASSIGN_TYPE": "BALANCED", - "TAS_ASSIGN_VARIABLE": "@@SYS_NEXT_USER_TO_BE_ASSIGNED", - "TAS_GROUP_VARIABLE": "", - "TAS_MI_INSTANCE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCE", - "TAS_MI_COMPLETE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCES_COMPLETE", - "TAS_ASSIGN_LOCATION": "FALSE", - "TAS_ASSIGN_LOCATION_ADHOC": "FALSE", - "TAS_TRANSFER_FLY": "FALSE", - "TAS_LAST_ASSIGNED": 0, - "TAS_USER": "", - "TAS_CAN_UPLOAD": "FALSE", - "TAS_VIEW_UPLOAD": "FALSE", - "TAS_VIEW_ADDITIONAL_DOCUMENTATION": "FALSE", - "TAS_CAN_CANCEL": "FALSE", - "TAS_OWNER_APP": "FALSE", - "STG_UID": "", - "TAS_CAN_PAUSE": "FALSE", - "TAS_CAN_SEND_MESSAGE": "TRUE", - "TAS_CAN_DELETE_DOCS": "FALSE", - "TAS_SELF_SERVICE": "FALSE", - "TAS_START": "TRUE", - "TAS_TO_LAST_USER": "FALSE", - "TAS_SEND_LAST_EMAIL": "FALSE", - "TAS_DERIVATION": "NORMAL", - "TAS_POSX": 678, - "TAS_POSY": 413, - "TAS_WIDTH": 165, - "TAS_HEIGHT": 40, - "TAS_COLOR": "", - "TAS_EVN_UID": "", - "TAS_BOUNDARY": "", - "TAS_DERIVATION_SCREEN_TPL": "", - "TAS_SELFSERVICE_TIMEOUT": 0, - "TAS_SELFSERVICE_TIME": "", - "TAS_SELFSERVICE_TIME_UNIT": "", - "TAS_SELFSERVICE_TRIGGER_UID": "" - }, - { - "TAS_UID": "97903733452289256a53683051807347", - "TAS_TITLE": "Task 2", - "TAS_DECSRIPTION": "", - "PRO_UID": "28814925552289251e5a8d5026402706", - "TAS_TYPE": "NORMAL", - "TAS_DURATION": 1, - "TAS_DELAY_TYPE": "", - "TAS_TEMPORIZER": 0, - "TAS_TYPE_DAY": "", - "TAS_TIMEUNIT": "DAYS", - "TAS_ALERT": "FALSE", - "TAS_PRIORITY_VARIABLE": "", - "TAS_ASSIGN_TYPE": "BALANCED", - "TAS_ASSIGN_VARIABLE": "@@SYS_NEXT_USER_TO_BE_ASSIGNED", - "TAS_GROUP_VARIABLE": "", - "TAS_MI_INSTANCE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCE", - "TAS_MI_COMPLETE_VARIABLE": "@@SYS_VAR_TOTAL_INSTANCES_COMPLETE", - "TAS_ASSIGN_LOCATION": "FALSE", - "TAS_ASSIGN_LOCATION_ADHOC": "FALSE", - "TAS_TRANSFER_FLY": "FALSE", - "TAS_LAST_ASSIGNED": 0, - "TAS_USER": "", - "TAS_CAN_UPLOAD": "FALSE", - "TAS_VIEW_UPLOAD": "FALSE", - "TAS_VIEW_ADDITIONAL_DOCUMENTATION": "FALSE", - "TAS_CAN_CANCEL": "FALSE", - "TAS_OWNER_APP": "FALSE", - "STG_UID": "", - "TAS_CAN_PAUSE": "FALSE", - "TAS_CAN_SEND_MESSAGE": "TRUE", - "TAS_CAN_DELETE_DOCS": "FALSE", - "TAS_SELF_SERVICE": "FALSE", - "TAS_START": "FALSE", - "TAS_TO_LAST_USER": "FALSE", - "TAS_SEND_LAST_EMAIL": "FALSE", - "TAS_DERIVATION": "NORMAL", - "TAS_POSX": 678, - "TAS_POSY": 413, - "TAS_WIDTH": 165, - "TAS_HEIGHT": 40, - "TAS_COLOR": "", - "TAS_EVN_UID": "", - "TAS_BOUNDARY": "", - "TAS_DERIVATION_SCREEN_TPL": "", - "TAS_SELFSERVICE_TIMEOUT": 0, - "TAS_SELFSERVICE_TIME": "", - "TAS_SELFSERVICE_TIME_UNIT": "", - "TAS_SELFSERVICE_TRIGGER_UID": "" - } - ], - "ROUTES": [ - { - "ROU_UID": "2186436575228a407513588098480328", - "ROU_PARENT": 0, - "PRO_UID": "28814925552289251e5a8d5026402706", - "TAS_UID": "6200372215228a3ff688846084339195", - "ROU_NEXT_TASK": "-1", - "ROU_CASE": 1, - "ROU_TYPE": "SEQUENTIAL", - "ROU_CONDITION": "", - "ROU_TO_LAST_USER": "FALSE", - "ROU_OPTIONAL": "FALSE", - "ROU_SEND_EMAIL": "TRUE", - "ROU_SOURCEANCHOR": 1, - "ROU_TARGETANCHOR": 0, - "ROU_TO_PORT": 1, - "ROU_FROM_PORT": 2, - "ROU_EVN_UID": "", - "GAT_UID": "" - }, - { - "ROU_UID": "2274341525228a5d5748c35053460377", - "ROU_PARENT": 0, - "PRO_UID": "28814925552289251e5a8d5026402706", - "TAS_UID": "97903733452289256a53683051807347", - "ROU_NEXT_TASK": "6200372215228a3ff688846084339195", - "ROU_CASE": 1, - "ROU_TYPE": "SEQUENTIAL", - "ROU_CONDITION": "", - "ROU_TO_LAST_USER": "FALSE", - "ROU_OPTIONAL": "FALSE", - "ROU_SEND_EMAIL": "TRUE", - "ROU_SOURCEANCHOR": 1, - "ROU_TARGETANCHOR": 0, - "ROU_TO_PORT": 1, - "ROU_FROM_PORT": 2, - "ROU_EVN_UID": "", - "GAT_UID": "" - }, - { - "ROU_UID": "57219386452289268043000062887695", - "ROU_PARENT": 0, - "PRO_UID": "28814925552289251e5a8d5026402706", - "TAS_UID": "782789913522892553babf1063070108", - "ROU_NEXT_TASK": "97903733452289256a53683051807347", - "ROU_CASE": 1, - "ROU_TYPE": "SEQUENTIAL", - "ROU_CONDITION": "", - "ROU_TO_LAST_USER": "FALSE", - "ROU_OPTIONAL": "FALSE", - "ROU_SEND_EMAIL": "TRUE", - "ROU_SOURCEANCHOR": 1, - "ROU_TARGETANCHOR": 0, - "ROU_TO_PORT": 1, - "ROU_FROM_PORT": 2, - "ROU_EVN_UID": "", - "GAT_UID": "" - } - ] - } -} -< 200 -{ "success": true, "message": "Updated successfully" } - -This resource allows you to delete a process - -*NOTE.- The process can't be deleted if it has a case with any status* -DELETE /process/{id} -< 200 -{ "success": true, "message": "Deleted successfully" } - --- -Process Properties - -The following is a section of resources related to ProcessMaker Components endpoints --- - -Getting Activity properties and extends (all) - -GET /process/{id}/activity/{id} -< 200 -< Content-Type: application/json -{ - "activity": +[ { - "act_name": "Task", - "act_type": "EMPTY", - "bou_x": 235, - "bou_y": 280, - "bou_width": 120, - "bou_height": 60, - "bou_container": "bpmnDiagram", - "bou_element_id": "pm_canvas", - "_extended": + "old_uid": "a5242da840064218638061532405176", + "new_uid": "146756055527ab40fca1f61040187521", + "object": "diagram", + }, + { + "old_uid":"278251934525d8ebbfb8565093239226", + "new_uid": "154619055527bbbbea27110004783861", + "object":"activity" + }, + { + "old_uid":"326395445525d8ec1fb8768023935580", + "new_uid": "44313230351ae0168e63669021546957", + "object":"activity" + }, + { + "old_uid":"588707952525d8ec4fb88c2038077596", + "new_uid": "44313230351ae0168e63669021546957", + "object":"activity" + }, + { + "old_uid":"960500897525d8eb8fb84b4013700338", + "new_uid": "157493645523b4c00067b67020029802", + "object": "event" + }, + { + "old_uid":"941908090525d8ec7fb8a07093841901", + "new_uid": "55151892151af5557de5414010032345", + "object": "event" + }, + { + "old_uid":"403208160525d8ebefb86a0059076243", + "new_uid": "60108982451ae53bc5786b3013937849", + "object": "gateway" + }, + { + "old_uid":"724155752525d8ec9fb8de2003171877", + "new_uid": "87474948551af4835e2cd45025472854", + "object": "flow" + }, + { + "old_uid":"891030650525d8eccfb92c9033321037", + "new_uid": "55151892151af5557de5414010032345", + "object": "flow" + }, + { + "old_uid":"785603906525d8ecffb9879037717215", + "new_uid": "88931079151af479d543650091554690", + "object": "flow" + }, + { + "old_uid":"531073186525d8ed2fb9d51058983227", + "new_uid": "9357304135242e2c7da7a59001869953", + "object": "flow" + } +] + + +Update a project `diagram` +PUT /project/{prj_uid}/diagram/{dia_uid} +> Content-Type: application/json +{ + "pro_uid": "8061532405176da5242da84006421863", + "laneset": [], + "lanes": [], + "activities": + [ { - "properties": - { - "definition": - { - "tas_priority_variable": "@@SYS_SYS", - "tas_derivation_screen_tpl": "MyTemplate.html" - }, - "assignment_rules": - { - "tas_assign_type": "SELF_SERVICE_EVALUATE", - "tas_assign_variable": "@@SYS_NEXT_USER_TO_BE_ASSIGNED", - "tas_group_variable": "@@SYS_GROUP_TO_BE_ASSIGNED", - "tas_selfservice_timeout": 0, - "tas_selfservice_time": "1", - "tas_selfservice_time_unit": "HOURS", - "tas_selfservice_trigger_uid": "00000000000000000000000000000001" - }, - "timing_control": - { - "tas_transfer_fly": "FALSE", - "tas_duration": "1", - "tas_timeunit": "HOURS", - "tas_type_day": "2", - "tas_calendar": "" - }, - "permissions": - { - "tas_type": "ADHOC" - }, - "case_labels": - { - "tas_def_title": "----- bla bla bla bla bla", - "tas_def_description": "----- bla bla bla bla bla" - }, - "notifications": - { - "send_email": "TRUE", - "tas_def_subject_message": "----- bla bla bla bla bla", - "tas_def_message_type": "text", - "tas_def_message": "----- bla bla bla bla bla", - "tas_def_message_template": "MyTemplate.html" - } - }, - "steps": - { - "steps": - [ - { - "step_uid": "800335382526013ee5406d6046561388", - "step_type_obj": "DYNAFORM", - "step_uid_obj": "480515388526013e03f5323091406324", - "step_position": 1, - "step_mode": "EDIT" - }, - { - "step_uid": "88095604352602cb5509565073250365", - "step_type_obj": "OUTPUT_DOCUMENT", - "step_uid_obj": "86369594352602caa32c5c3004407686", - "step_position": 2, - "step_mode": "" - } - ], - "conditions": - [ - { - "step_uid": "800335382526013ee5406d6046561388", - "step_type_obj": "DYNAFORM", - "step_uid_obj": "480515388526013e03f5323091406324", - "step_condition": "1 == 1", - "step_position": 1 - }, - { - "step_uid": "88095604352602cb5509565073250365", - "step_type_obj": "OUTPUT_DOCUMENT", - "step_uid_obj": "86369594352602caa32c5c3004407686", - "step_condition": "", - "step_position": 2 - } - ], - "triggers": - [ - { - "step_uid": "800335382526013ee5406d6046561388", - "step_type_obj": "DYNAFORM", - "step_uid_obj": "480515388526013e03f5323091406324", - "step_position": 1, - "before": - [ - { - "tri_uid": "287964159526013c6c64bb1071946215", - "st_condition": "'a' == 'a'", - "st_position": 1 - }, - { - "tri_uid": "502389187526013d4304108061369115", - "st_condition": "", - "st_position": 2 - } - ], - "after": [] - }, - { - "step_uid": "88095604352602cb5509565073250365", - "step_type_obj": "OUTPUT_DOCUMENT", - "step_uid_obj": "86369594352602caa32c5c3004407686", - "step_position": 2, - "before": [], - "after": [] - }, - { - "step_uid": "", - "step_type_obj": "", - "step_uid_obj": "", - "step_position": 3, - "before_assignment": - [ - { - "tri_uid": "287964159526013c6c64bb1071946215", - "st_condition": "", - "st_position": 1 - } - ], - "before_routing": - [ - { - "tri_uid": "287964159526013c6c64bb1071946215", - "st_condition": "", - "st_position": 1 - } - ], - "after_routing": - [ - { - "tri_uid": "287964159526013c6c64bb1071946215", - "st_condition": "", - "st_position": 1 - } - ] - } - ] - }, - "users": + "act_uid": "278251934525d8ebbfb8565093239226", + "act_name": "Task", + "act_type": "EMPTY", + "bou_x": 235, + "bou_y": 280, + "bou_width": 120, + "bou_height": 60, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + }, + { + "act_uid": "326395445525d8ec1fb8768023935580", + "act_name": "Task", + "act_type": "EMPTY", + "bou_x":611, + "bou_y":170, + "bou_width":120, + "bou_height":60, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + }, + { + "act_uid": "588707952525d8ec4fb88c2038077596", + "act_name": "Task", + "act_type": "EMPTY", + "bou_x":630, + "bou_y":404, + "bou_width":120, + "bou_height":60, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + } + ], + "events": + [ + { + "evn_uid": "960500897525d8eb8fb84b4013700338", + "evn_name":null, + "evn_type":null, + "evn_marker":null, + "evn_is_interrupting":true, + "evn_attached_to":null, + "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_condition":null, + "evn_message":null, + "evn_operation_name":null, + "evn_operation_implementation_ref":null, + "evn_time_date":null, + "evn_time_cycle":null, + "evn_time_duration":null, + "evn_behavior":null, + "bou_x":87, + "bou_y":261, + "bou_width":33, + "bou_height":33, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + }, + { + "evn_uid": "941908090525d8ec7fb8a07093841901", + "evn_name":null, + "evn_type":null, + "evn_marker":null, + "evn_is_interrupting":true, + "evn_attached_to":null, + "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_condition":null, + "evn_message":null, + "evn_operation_name":null, + "evn_operation_implementation_ref":null, + "evn_time_date":null, + "evn_time_cycle":null, + "evn_time_duration":null, + "evn_behavior":null, + "bou_x":903, + "bou_y":303, + "bou_width":33, + "bou_height":33, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + } + ], + "gateways": + [ + { + "gat_uid": "403208160525d8ebefb86a0059076243", + "gat_name":null, + "bou_x":481, + "bou_y":306, + "bou_width":45, + "bou_height":45, + "bou_container": "bpmnDiagram", + "bou_element_id": "pm_canvas" + } + ], + "flows": + [ + { + "flo_uid": "724155752525d8ec9fb8de2003171877", + "flo_type": "SEQUENCE", + "flo_name":null, + "flo_element_origin": "960500897525d8eb8fb84b4013700338", + "flo_element_origin_type": "bpmnEvent", + "flo_element_dest": "278251934525d8ebbfb8565093239226", + "flo_element_dest_type": "bpmnActivity", + "flo_is_inmediate":true, + "flo_condition":null, + "flo_state": [ - { - "usr_uid": "00000000000000000000000000000001", - "tu_type": 1, - "tu_relation": 1 - }, - { - "usr_uid": "232161377508595bd707c70063037530", - "tu_type": 1, - "tu_relation": 1 - }, - { - "usr_uid": "4494108395125254d622141027311419", - "tu_type": 1, - "tu_relation": 2 - } - ], - "users_adhoc": + {"x":104,"y":261}, + {"x":104,"y":241}, + {"x":168,"y":241}, + {"x":168,"y":309}, + {"x":233,"y":309} + ] + }, + { + "flo_uid": "891030650525d8eccfb92c9033321037", + "flo_type": "SEQUENCE", + "flo_name":null, + "flo_element_origin": "278251934525d8ebbfb8565093239226", + "flo_element_origin_type": "bpmnActivity", + "flo_element_dest": "403208160525d8ebefb86a0059076243", + "flo_element_dest_type": "bpmnGateway", + "flo_is_inmediate":true, + "flo_condition":null, + "flo_state": [ - { - "usr_uid": "00000000000000000000000000000001", - "tu_type": 2, - "tu_relation": 1 - }, - { - "usr_uid": "4494108395125254d622141027311419", - "tu_type": 2, - "tu_relation": 2 - } + {"x":294,"y":278}, + {"x":294,"y":258}, + {"x":387,"y":258}, + {"x":387,"y":329}, + {"x":481,"y":329} + ] + }, + { + "flo_uid": "785603906525d8ecffb9879037717215", + "flo_type": "SEQUENCE", + "flo_name":null, + "flo_element_origin": "403208160525d8ebefb86a0059076243", + "flo_element_origin_type": "bpmnGateway", + "flo_element_dest": "326395445525d8ec1fb8768023935580", + "flo_element_dest_type": "bpmnActivity", + "flo_is_inmediate":true, + "flo_condition":null, + "flo_state": + [ + {"x":504,"y":306}, + {"x":504,"y":199}, + {"x":609,"y":199} + ] + }, + { + "flo_uid": "531073186525d8ed2fb9d51058983227", + "flo_type": "SEQUENCE", + "flo_name":null, + "flo_element_dest": "588707952525d8ec4fb88c2038077596", + "flo_element_origin": "403208160525d8ebefb86a0059076243", + "flo_element_origin_type": "bpmnGateway", + "flo_element_dest_type": "bpmnActivity", + "flo_is_inmediate":true, + "flo_condition":null, + "flo_state": + [ + {"x":481,"y":329}, + {"x":461,"y":329}, + {"x":461,"y":433}, + {"x":628,"y":433} ] } - } + ], + "artifacts": [] } - - -Getting Activity properties - -GET /process/{id}/activity/{id}/properties -< 200 +< 201 < Content-Type: application/json -{ - "activity": +[ { - "act_name": "Task", - "act_type": "EMPTY", - "bou_x": 235, - "bou_y": 280, - "bou_width": 120, - "bou_height": 60, - "bou_container": "bpmnDiagram", - "bou_element_id": "pm_canvas" - } -} - -Getting Activity extended - -GET /process/{id}/activity/{id}/extended -< 200 -< Content-Type: application/json -{ - "activity": + "old_uid": "a5242da840064218638061532405176", + "new_uid": "146756055527ab40fca1f61040187521", + "object": "diagram", + }, { - "_extended": - { - "properties": - { - "definition": - { - "tas_priority_variable": "@@SYS_SYS", - "tas_derivation_screen_tpl": "MyTemplate.html" - }, - "assignment_rules": - { - "tas_assign_type": "SELF_SERVICE_EVALUATE", - "tas_assign_variable": "@@SYS_NEXT_USER_TO_BE_ASSIGNED", - "tas_group_variable": "@@SYS_GROUP_TO_BE_ASSIGNED", - "tas_selfservice_timeout": 0, - "tas_selfservice_time": "1", - "tas_selfservice_time_unit": "HOURS", - "tas_selfservice_trigger_uid": "00000000000000000000000000000001" - }, - "timing_control": - { - "tas_transfer_fly": "FALSE", - "tas_duration": "1", - "tas_timeunit": "HOURS", - "tas_type_day": "2", - "tas_calendar": "" - }, - "permissions": - { - "tas_type": "ADHOC" - }, - "case_labels": - { - "tas_def_title": "----- bla bla bla bla bla", - "tas_def_description": "----- bla bla bla bla bla" - }, - "notifications": - { - "send_email": "TRUE", - "tas_def_subject_message": "----- bla bla bla bla bla", - "tas_def_message_type": "text", - "tas_def_message": "----- bla bla bla bla bla", - "tas_def_message_template": "MyTemplate.html" - } - }, - "steps": - { - "steps": - [ - { - "step_uid": "800335382526013ee5406d6046561388", - "step_type_obj": "DYNAFORM", - "step_uid_obj": "480515388526013e03f5323091406324", - "step_position": 1, - "step_mode": "EDIT" - }, - { - "step_uid": "88095604352602cb5509565073250365", - "step_type_obj": "OUTPUT_DOCUMENT", - "step_uid_obj": "86369594352602caa32c5c3004407686", - "step_position": 2, - "step_mode": "" - } - ], - "conditions": - [ - { - "step_uid": "800335382526013ee5406d6046561388", - "step_type_obj": "DYNAFORM", - "step_uid_obj": "480515388526013e03f5323091406324", - "step_condition": "1 == 1", - "step_position": 1 - }, - { - "step_uid": "88095604352602cb5509565073250365", - "step_type_obj": "OUTPUT_DOCUMENT", - "step_uid_obj": "86369594352602caa32c5c3004407686", - "step_condition": "", - "step_position": 2 - } - ], - "triggers": - [ - { - "step_uid": "800335382526013ee5406d6046561388", - "step_type_obj": "DYNAFORM", - "step_uid_obj": "480515388526013e03f5323091406324", - "step_position": 1, - "before": - [ - { - "tri_uid": "287964159526013c6c64bb1071946215", - "st_condition": "'a' == 'a'", - "st_position": 1 - }, - { - "tri_uid": "502389187526013d4304108061369115", - "st_condition": "", - "st_position": 2 - } - ], - "after": [] - }, - { - "step_uid": "88095604352602cb5509565073250365", - "step_type_obj": "OUTPUT_DOCUMENT", - "step_uid_obj": "86369594352602caa32c5c3004407686", - "step_position": 2, - "before": [], - "after": [] - }, - { - "step_uid": "", - "step_type_obj": "", - "step_uid_obj": "", - "step_position": 3, - "before_assignment": - [ - { - "tri_uid": "287964159526013c6c64bb1071946215", - "st_condition": "", - "st_position": 1 - } - ], - "before_routing": - [ - { - "tri_uid": "287964159526013c6c64bb1071946215", - "st_condition": "", - "st_position": 1 - } - ], - "after_routing": - [ - { - "tri_uid": "287964159526013c6c64bb1071946215", - "st_condition": "", - "st_position": 1 - } - ] - } - ] - }, - "users": - [ - { - "usr_uid": "00000000000000000000000000000001", - "tu_type": 1, - "tu_relation": 1 - }, - { - "usr_uid": "232161377508595bd707c70063037530", - "tu_type": 1, - "tu_relation": 1 - }, - { - "usr_uid": "4494108395125254d622141027311419", - "tu_type": 1, - "tu_relation": 2 - } - ], - "users_adhoc": - [ - { - "usr_uid": "00000000000000000000000000000001", - "tu_type": 2, - "tu_relation": 1 - }, - { - "usr_uid": "4494108395125254d622141027311419", - "tu_type": 2, - "tu_relation": 2 - } - ] - } + "old_uid":"278251934525d8ebbfb8565093239226", + "new_uid": "154619055527bbbbea27110004783861", + "object":"activity" + }, + { + "old_uid":"326395445525d8ec1fb8768023935580", + "new_uid": "44313230351ae0168e63669021546957", + "object":"activity" + }, + { + "old_uid":"588707952525d8ec4fb88c2038077596", + "new_uid": "44313230351ae0168e63669021546957", + "object":"activity" + }, + { + "old_uid":"960500897525d8eb8fb84b4013700338", + "new_uid": "157493645523b4c00067b67020029802", + "object": "event" + }, + { + "old_uid":"941908090525d8ec7fb8a07093841901", + "new_uid": "55151892151af5557de5414010032345", + "object": "event" + }, + { + "old_uid":"403208160525d8ebefb86a0059076243", + "new_uid": "60108982451ae53bc5786b3013937849", + "object": "gateway" + }, + { + "old_uid":"724155752525d8ec9fb8de2003171877", + "new_uid": "87474948551af4835e2cd45025472854", + "object": "flow" + }, + { + "old_uid":"891030650525d8eccfb92c9033321037", + "new_uid": "55151892151af5557de5414010032345", + "object": "flow" + }, + { + "old_uid":"785603906525d8ecffb9879037717215", + "new_uid": "88931079151af479d543650091554690", + "object": "flow" + }, + { + "old_uid":"531073186525d8ed2fb9d51058983227", + "new_uid": "9357304135242e2c7da7a59001869953", + "object": "flow" + } +] + + +Delete a project `diagram` +DELETE /project/{prj_uid}/diagram/{dia_uid} +< 200 + + +-- +Project Activity Resources +-- + +Get ***properties & definition*** of a project `activity` +GET /project/{prj_uid}/activity/{act_uid} +< 200 +{ + "definition": {}, + "properties": + { + "tas_priority_variable": "@@SYS_SYS", + "tas_derivation_screen_tpl": "MyTemplate.html" + "tas_assign_type": "SELF_SERVICE_EVALUATE", + "tas_assign_variable": "@@SYS_NEXT_USER_TO_BE_ASSIGNED", + "tas_group_variable": "@@SYS_GROUP_TO_BE_ASSIGNED", + "tas_selfservice_timeout": 0, + "tas_selfservice_time": "1", + "tas_selfservice_time_unit": "HOURS", + "tas_selfservice_trigger_uid": "00000000000000000000000000000001" + "tas_transfer_fly": "FALSE", + "tas_duration": "1", + "tas_timeunit": "HOURS", + "tas_type_day": "2", + "tas_calendar": "" + "tas_type": "ADHOC" + "tas_def_title": "Sample Title", + "tas_def_description": "Sample Description" + "send_email": "TRUE", + "tas_def_subject_message": "Sample Subject", + "tas_def_message_type": "text", + "tas_def_message": "Sample Message", + "tas_def_message_template": "MyTemplate.html" } } - -Getting available Steps of an Activity - -GET /process/{id}/activity/available-steps +Get ***definition*** of a project activity +GET /project/{prj_uid}/activity/{act_uid}?filter=definition < 200 -< Content-Type: application/json { - "success": true, - "message": "Steps loaded successfully", - "data": { - "num_records": 3, - "data": [ - { - "step_uid": "2074240775261579834c597006169172", - "step_title": "frm9", - "step_type_obj": "DYNAFORM", - "step_mode": "" - }, - { - "step_uid": "14575240352617b977533a0093486441", - "step_title": "grd1", - "step_type_obj": "DYNAFORM", - "step_mode": "" - }, - { - "step_uid": "3505311805284f9155dc1f5020945175", - "step_title": "outputDoc2", - "step_type_obj": "OUTPUT_DOCUMENT", - "step_mode": "" - } - ] + "definition": {} +} + +Get ***properties*** of a project activity +GET /project/{prj_uid}/activity/{act_uid}?filter=properties +< 200 +{ + "properties": + { + "tas_priority_variable": "@@SYS_SYS", + "tas_derivation_screen_tpl": "MyTemplate.html" + "tas_assign_type": "SELF_SERVICE_EVALUATE", + "tas_assign_variable": "@@SYS_NEXT_USER_TO_BE_ASSIGNED", + "tas_group_variable": "@@SYS_GROUP_TO_BE_ASSIGNED", + "tas_selfservice_timeout": 0, + "tas_selfservice_time": "1", + "tas_selfservice_time_unit": "HOURS", + "tas_selfservice_trigger_uid": "00000000000000000000000000000001" + "tas_transfer_fly": "FALSE", + "tas_duration": "1", + "tas_timeunit": "HOURS", + "tas_type_day": "2", + "tas_calendar": "" + "tas_type": "ADHOC" + "tas_def_title": "Sample Title", + "tas_def_description": "Sample Description" + "send_email": "TRUE", + "tas_def_subject_message": "Sample Subject", + "tas_def_message_type": "text", + "tas_def_message": "Sample Message", + "tas_def_message_template": "MyTemplate.html" } } - -Getting available Users & User Groups of an Activity - -GET /process/{id}/activity/available-users?type=1 -< 200 -< Content-Type: application/json +Update a project activity +PUT /project/{prj_uid}/activity/{act_uid} +> Content-Type: application/json { - "success": true, - "message": "Users loaded successfully", - "data": { - "num_records": 3, - "data": [ - { - "label": "GROUP2 (3 Users)
", - "tas_uid": "3600770975176da52433621023964959", - "usr_uid": "57658616251252558b908e2087058134", - "tu_type": "1", - "tu_relation": 2 - }, - { - "label": "GROUP3 (0 Users)
", - "tas_uid": "3600770975176da52433621023964959", - "usr_uid": "18613931951263f3d33c080090189128", - "tu_type": "1", - "tu_relation": 2 - }, - { - "label": "user6 user6", - "tas_uid": "3600770975176da52433621023964959", - "usr_uid": "632490311509131bcbd4fe6082480294", - "tu_type": "1", - "tu_relation": 1 - } - ] + "definition": {}, + "properties": + { + "tas_priority_variable": "@@SYS_SYS", + "tas_derivation_screen_tpl": "MyTemplate.html" + "tas_assign_type": "SELF_SERVICE_EVALUATE", + "tas_assign_variable": "@@SYS_NEXT_USER_TO_BE_ASSIGNED", + "tas_group_variable": "@@SYS_GROUP_TO_BE_ASSIGNED", + "tas_selfservice_timeout": 0, + "tas_selfservice_time": "1", + "tas_selfservice_time_unit": "HOURS", + "tas_selfservice_trigger_uid": "00000000000000000000000000000001" + "tas_transfer_fly": "FALSE", + "tas_duration": "1", + "tas_timeunit": "HOURS", + "tas_type_day": "2", + "tas_calendar": "" + "tas_type": "ADHOC" + "tas_def_title": "Sample Title", + "tas_def_description": "Sample Description" + "send_email": "TRUE", + "tas_def_subject_message": "Sample Subject", + "tas_def_message_type": "text", + "tas_def_message": "Sample Message", + "tas_def_message_template": "MyTemplate.html" } } +< 200 -Getting available Users & User Groups (Ad hoc) of an Activity +Delete a project activity -GET /process/{id}/activity/available-users?type=2 +**This is used to delete an activity and its relations from a diagram.** +DELETE /project/{prj_uid}/activity/{act_uid} +< 200 + + +-- +Project Properties - Assignee Resources +-- + +List assignees of an `activity` + +###Optional Parameters +name | type | Description +:------------ | :------ | :----------- +start | integer | To specify a start index. +limit | integer | To delimit the numbers of records to return. +filter | string | To specify a search term to filter the list, the search term will be matched with all assignee fields. + +GET /project/{prj_uid}/activity/{act_uid}/assignee?filter=john&start=0&limit=50 +< 200 +< Content-Type: application/json +[ + { + "aas_uid": "4e2745a3fdbd977d1339862ae390ad13", + "aas_name": "Mark", + "aas_lastname": "Smith", + "aas_username": "mark", + "aas_type": "user" + }, + { + "aas_uid": "60108982451ae53bc5786b3013937849", + "aas_name": "John", + "aas_lastname": "Doe", + "aas_username": "jdoe", + "aas_type": "user" + }, + { + "aas_uid": "157493645523b4c00067b67020029802", + "aas_name": "Administrators", + "aas_lastname": "", + "aas_username": "", + "aas_type": "group" + } +] + +Get a list of available users and groups to be assigned to an `activity` + +###Optional Parameters +name | type | Description +:------------ | :------ | :----------- +start | integer | To specify a start index. +limit | integer | To delimit the numbers of records to return. +filter | string | To specify a search term to filter the list, the search term will be matched with all assignee fields. +GET /project/{prj_uid}/activity/{act_uid}/available-assignee?filter=john&start=0&limit=50 +< 200 +< Content-Type: application/json +[ + { + "aas_uid": "8f30daa78a440ab308727ca33381a545", + "aas_name": "James", + "aas_lastname": "Johnson", + "aas_username": "james", + "aas_type": "user" + }, + { + "aas_uid": "ae1e2034be750da53e48582cddc2ebc7", + "aas_name": "Robert", + "aas_lastname": "Williams", + "aas_username": "robert", + "aas_type": "user" + }, + { + "aas_uid": "184131195492c7a04cba5f9056989964", + "aas_name": "Mary", + "aas_lastname": "Rose", + "aas_username": "mary", + "aas_type": "user" + }, + { + "aas_uid": "1846526764c8905435c74e2028286704", + "aas_name": "Employees", + "aas_lastname": "", + "aas_username": "", + "aas_type": "group" + } + { + "aas_uid": "1846526764c8905435c74e2028286704", + "aas_name": "Plant Managers", + "aas_lastname": "", + "aas_username": "", + "aas_type": "group" + } +] + +Get a single user or group of an `activity` +GET /project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid} < 200 < Content-Type: application/json { - "success": true, - "message": "Users loaded successfully", - "data": { - "num_records": 3, - "data": [ - { - "label": "GROUP2 (3 Users)
", - "tas_uid": "3600770975176da52433621023964959", - "usr_uid": "57658616251252558b908e2087058134", - "tu_type": "2", - "tu_relation": 2 - }, - { - "label": "GROUP3 (0 Users)
", - "tas_uid": "3600770975176da52433621023964959", - "usr_uid": "18613931951263f3d33c080090189128", - "tu_type": "2", - "tu_relation": 2 - }, - { - "label": "user6 user6", - "tas_uid": "3600770975176da52433621023964959", - "usr_uid": "632490311509131bcbd4fe6082480294", - "tu_type": "2", - "tu_relation": 1 - } - ] + "aas_uid": "4e2745a3fdbd977d1339862ae390ad13", + "aas_name": "Mark", + "aas_lastname": "Smith", + "aas_username": "mark", + "aas_type": "user" +} + +Asign a user or group to an `activity` +POST /project/{prj_uid}/activity/{act_uid}/assignee +> Content-Type: application/json +{ + "aas_uid": "977d1339862ae390ad134e2745a3fdbd", + "aas_type": "user" +} +< 201 + + +Remove a assignee of an `activity` +DELETE /project/{prj_uid}/activity/{act_uid}/assignee/{aas_uid} +> Content-Type: application/json +< 200 + + +-- +Project Properties - Step Resources +-- + +List assigned `steps` to an Activity +GET /project/{prj_uid}/activity/{act_uid}/steps +< 200 +< Content-Type: application/json +[ + { + "step_uid": "25bd5127e1bfae143843382b12207b03", + "step_type_obj": "DYNAFORM", + "step_uid_obj": "e143843382b12207b0325bd5127e1bfa", + "step_condition": "", + "step_position": "", + "step_mode": "EDIT", + "obj_title": "dyn_1", + "obj_description": "Dynaform #1" + }, + { + "step_uid": "382b12207b0325bd5127e1bfae143843", + "step_type_obj": "DYNAFORM", + "step_uid_obj": "ac632c411a07bd64721ca7764311d437", + "step_condition": "", + "step_position": "", + "step_mode": "EDIT", + "obj_title": "dyn_2", + "obj_description": "Dynaform #2" } -} \ No newline at end of file +] + +List available `steps` to assign to an Activity +GET /project/{prj_uid}/activity/{act_uid}/available-steps +< 200 +< Content-Type: application/json +[ + { + "obj_uid": "051ec4c12ca5205436a337cf83f29881", + "obj_title": "dyn_3", + "obj_description": "Dynaform #3", + "obj_type": "DYNAFORM" + }, + { + "obj_uid": "833d579daf212fd4849b00b26063bf04", + "obj_title": "dyn_4", + "obj_description": "Dynaform #4", + "obj_type": "DYNAFORM" + }, + { + "obj_uid": "942fdcef9fdca48fbf88e3733cf66cea", + "obj_title": "outputdoc_1", + "obj_description": "Input Docucument #1", + "obj_type": "INPUT_DOCUMENT" + } +] + +Get a single `step` assigned to an Activity +GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid} +< 200 +< Content-Type: application/json +{ + "step_uid": "25bd5127e1bfae143843382b12207b03", + "step_type_obj": "DYNAFORM", + "step_uid_obj": "e143843382b12207b0325bd5127e1bfa", + "step_condition": "", + "step_position": "", + "step_mode": "EDIT", + "obj_title": "dyn_1", + "obj_description": "Dynaform #1" +} + +Assing a `step` to a Activity +POST /project/{prj_uid}/activity/{act_uid}/step +> Content-Type: application/json +{ + "step_uid": "25bd5127e1bfae143843382b12207b03", + "step_type_obj": "DYNAFORM", + "step_uid_obj": "e143843382b12207b0325bd5127e1bfa", + "step_condition": "", + "step_position": "", + "step_mode": "EDIT" +} +< 200 +< Content-Type: application/json +{ + "old_uid":"25bd5127e1bfae143843382b12207b03", + "new_uid": "82b12207b0325bd5127e1bfae1438433" +} + +Update a `step` assignation of an Activity +PUT /project/{prj_uid}/activity/{act_uid}/step/{step_uid} +> Content-Type: application/json +{ + "step_type_obj": "DYNAFORM", + "step_uid_obj": "e143843382b12207b0325bd5127e1bfa", + "step_condition": "@@var1 == 1", + "step_position": "2", + "step_mode": "VIEW" +} +< 200 + + +Unassign a `step` from an activity +DELETE /project/{prj_uid}/activity/{act_uid}/step/{step_uid} +< 200 + + +List assigned `triggers` to a Step +GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/triggers +< 200 +< Content-Type: application/json +[ + { + "step_uid": "38768199848d680986fed11033234711", + "tri_uid": "11249313348d67d3d7862a3048595231", + "st_type": "AFTER", + "st_condition": "", + "st_position": "1" + }, + { + "step_uid": "38768199848d680986fed11033234711", + "tri_uid": "3399325724ac11634a29294071887017", + "st_type": "BEFORE", + "st_condition": "@@sheetApproved == '1'", + "st_position": "1" + } +] + +List available `triggers` to assign to a Step +GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/available-triggers +< 200 +< Content-Type: application/json +[ + { + "tri_uid": "3399325724ac11634a29294071887017", + "tri_type": "SCRIPT", + "tri_webbot": " +$outputID=\"6873869084ac115856a8325014651845\"; +PMFGenerateOutputDocument($outputID);", + "tri_param": "" + }, + { + "tri_uid": "8488283114bffe914417cb5020528882", + "tri_type": "SCRIPT", + "tri_webbot": "@@average = (@@n1 + @@n2 + @@n3) / 3;", + "tri_param": "" + } +] + +Get a single `trigger` assigned to a Step +GET /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid} +< 200 +< Content-Type: application/json +{ + "tri_uid": "8488283114bffe914417cb5020528882", + "tri_type": "SCRIPT", + "tri_webbot": "@@average = (@@n1 + @@n2 + @@n3) / 3;", + "tri_param": "" +} + +Assign a `trigger` to a Step + +###Required Parameters +name | type | Description +:---------- | :----- | :------------ +tri_uid | string | The trigger UID + +###Optional Parameters +name | type | Description +:--------------- | :----- | :----------- +st_type | string | execution time, accepted values: **AFTER**, **BEFORE**. +st_condition | string | Trigger Condition, the trigger only will be executed if it is evaluated `true`. +st_position | integer| Position that especifies the trigger order execution, it starts in **1**. + +POST /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger +> Content-Type: application/json +{ + "tri_uid": "11249313348d67d3d7862a3048595231", + "st_type": "AFTER", + "st_condition": "@@APPROVED == 'Y'", + "st_position": "2" +} +< 201 + + +Update a `trigger` assignation of a Step +PUT /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid} +> Content-Type: application/json +{ + "st_type": "BEFORE", + "st_condition": "@@APPROVED == 'N'", + "st_position": "1" +} +< 200 + + +Remove a `trigger` assignation of a Step +DELETE /project/{prj_uid}/activity/{act_uid}/step/{step_uid}/trigger/{tri_uid} +< 200 + + +