Project Endpoints

The current methods implemented for project resources in the ProcessMaker API designer end point are listed below:

Project resources:

Name Description Type Value
*prj_uid Project UID String “1598d2h3…”(String of 32 characters)
*prj_name Project name or title String “Name” (Alphanumeric string)
*prj_description Project description String “Description” (Alphanumeric string)
prj_target_namespace This attribute specifies the namespace associated with the definition and continues the conversion for the XML String “String” (Alphanumeric string)

prj_expresion_language This attribute identifies the formal language String “temp.html” (Valid template)
prj_type_language This attribute identifies the type of system the elements used in the language String “String” (Alphanumeric string)
prj_exporter This attribute identifies the tool the BPMN model file is exporting String “String” (Alphanumeric string)
prj_exporter_version This attribute identifies the tool version the BPMN model file is exporting String “String” (Alphanumeric string)
prj_create_date Project creation date DateTime “2015-01-01 12:00:00”(Datetime string)
prj_update_date Project update date DateTime “2015-01-01 12:00:00” (Datetime string)
prj_author Project author UID String
prj_author_version Value of the version of the project author String “String” (Alphanumeric string)
prj_original_source Original code of the project String “String” (Alphanumeric string)
*diagrams Diagram array
Available Version: Resources available as of ProcessMaker 3.2.2.
usr_settings Save the user settings. Specifically the Enable Grid setting of the canvas process designer. Json object {enabled_grid:(true or false)}

Process resources:

Name Description Type Value
prj_uid Project UID String "9541049475298f190420f51086854718" String of 32 characters
pro_uid Process UID String "9541049475298f190420f51086854718" String of 32 characters
pro_title Process title String "title..."
pro_description Process description String "Description..."
pro_parent Parent process UID (if the process does not have a parent this field is left empty) String "9541049475298f190420f51086854718" String of 32 characters
pro_time Set to 1 by default. Integer 1 (unique value)
pro_timeunit Unit of time used by PRO_TIME, which is generally "DAYS". String "DAYS" (unique value)
pro_status Process status String "ACTIVE", "INACTIVE" (unique values)
pro_type_day Type of day. By default set to "" (empty string). String ""
pro_type The process type, which is generally "NORMAL". String "NORMAL"
pro_assignment The process assignment, which is generally 0. Integer 0, 1 (unique values)
pro_show_map Set to 1 if showing the process map, otherwise 0 if not showing it. Integer 0
pro_show_message Hides the case number and the case title in the steps. Integer 0, 1 (unique values)
pro_subprocess This is a subprocess Integer 0, 1 (unique values)
pro_tri_create Trigger UID (Executes a trigger when the case is created) String "7261047365888f8e12e8174036437308" String of 32 characters
pro_tri_open Trigger UID (Executes a trigger when the case is opened) String "39979192352f11fa180f9a3046876080" String of 32 characters
pro_tri_deleted Trigger UID (Executes a trigger when the case is deleted) String "9541049475298f190420f51086854718" String of 32 characters
pro_tri_canceled Trigger UID (Executes a trigger when a case is canceled). String "9541049475298f190420f51086854718" String of 32 characters.
pro_tri_paused Trigger UID (Executes a trigger when a case is paused). String "9541049475298f190420f51086854718" String of 32 characters.
pro_tri_reassigned Trigger UID (Executes a trigger when a case is reassigned). String "9541049475298f190420f51086854718" String of 32 characters.
pro_tri_unpaused Trigger UID (Executes a trigger when a case is unpaused). String "32636698052efa15b2e75a9095960272" String of 32 characters.
pro_type_process Process type: "PUBLIC" or "PRIVATE". String "PUBLIC"
pro_show_delegate Set to 1 if showing task delegations, otherwise 0 if not showing it. Integer 0, 1 (unique values)
pro_show_dynaform Set to 1 if showing list of DynaForms, otherwise 0 if not showing it. Integer 0, 1 (unique values)
pro_category Process category UID String "9541049475298f190420f51086854718" String of 32 characters
pro_sub_category Unique ID of the process subcategory. This feature is not supported and is always set to "" (empty string). String ""
pro_industry The process' industry, which is no longer used and is always set to 0. Integer 0 (unique value)
pro_update_date Process update date Datetime "2017-01-25T19:17:53+00:00"
pro_create_date Process creation date. Datetime "2017-01-24T16:05:39+00:00"
pro_create_user Process user owner UID String "9541049475298f190420f51086854718" String of 32 characters
pro_debug Debug Integer 0, 1 (unique values)
pro_derivation_screen_tpl Routing screen template String "MyTemplate.html"
pro_cost Approximate amount of idle time in the execution of the process cost. Integer 10
pro_unit_cost The currency unit of the pro_cost field. String "$"
pro_itee By default set to 1. No longer supported. Integer 1
pro_bpmn Process type. "1" means that the BPM project uses the BPMN 2.0 notation, "0" means "classic" imported processes created in previous versions. Integer 0, 1 (unique values)
pro_summary_dynaform Dynaform UID (Dynaform to show a case summary) String "9541049475298f190420f51086854718" String of 32 characters
pro_calendar Calendar UID (Process calendar) String "9541049475298f190420f51086854718" String of 32 characters

Diagram Fields:

Name Description Type Value
*dia_uid Diagram UID String “1598d2h3…”(String of 32 characters)
*activities Activities array Array
*events Events array Array
*gateways Gateways array Array

*flows Flows array Array
*artifacts Artifacts array Array

Activity Fields:

Name Description Type Value
*act_uid Activity UID String “1598d2h3…”(String of 32 characters)
*act_name Activity name String “Name”(Alphanumeric string)
*act_type Activity type String “TASK” or “SUB_PROCESS” (Unique values)
act_is_for_compensation Shows the activity Integer 1 (Numeric value)
act_start_quantity Quantity of required tokens for the activity to be available Integer 1 (Numeric value)
act_completion_quantity Quantity of required tokens for the activity to be completed Integer 1 (Numeric value)
act_task_type Activity task type String “String” (Alphanumeric string)
act_implementation Activity implementation String “String” (Alphanumeric string)
act_instantiate Activity instance Integer 1 (Numeric string)
act_script_type Script type associated with the activity String "String" (Alphanumeric string)
act_script Script associated with the activity String "String" (Alphanumeric string)
act_loop_type Loop type of the activity String "String" (Alphanumeric string)
act_test_before Value to decide when the loop condition will be evaluated Integer 1 (Numeric value)
act_loop_maximum Maximum number of iterations of the loop Integer 1 (Numeric Value)
act_loop_condition Loop condition String "String" (Alphanumeric string)
act_loop_cardinality Number of cases to be generated with the loop Integer 1 (Numeric value)
act_loop_behavior Defines if and when an event is released with the loop String "String" (Alphanumeric string)
act_is_adhoc Verifies if the activity allows ad hoc transfer Integer 1 (Numeric value)
act_is_collapsed Verifies if the task can collapse Integer 1 (Numeric value)
act_completion_condition Condition for the activity to finish String "String" (Alphanumeric string)
act_ordering Sets the order type in the activity String "String" (Alphanumeric string)
act_cancel_remaining_instances This attribute is only used if the request is parallel. Determines if it executes cases, and cancels when the act_completion_condition is true Integer 1 (Numeric value)
act_protocol Activity protocol String "String" (Alphanumeric string)
act_method Activity method String "String" (Alphanumeric string)
act_is_global Value that specifies if the activity is global Integer 1 (Numeric value)
act_referer Activity reference String "String" (Alphanumeric string)
act_default_flow Flow that the activity uses by default String "String" (Alphanumeric string)
act_master_diagram Activity master diagram String "String" (Alphanumeric string)
*bou_x X-Coordinate of the element Integer 348 (Numeric value)
*bou_y Y-Coordinate of the element Integer 348 (Numeric value)
*bou_width Element width Integer 40(Numeric value)
*bou_height Element height Integer 28 (Numeric value)
bou_container Class of the element container String “bpmnDiagram”(Alphanumeric string)

Event Fields:

Name Description Type Value
*evn_uid Event UID String “1598d2h3…”(String of 32 characters)
*evn_name Event name String "name" (Alphanumeric string)
*evn_type Event type String “START” or “END”(Unique values)
*evn_marker Event marker type String “EMPTY” or “TIMER” o “MESSAGE” (Unique values)

evn_is_interrupting Value for the event to interrupt the case Integer 1 (Numeric value)
evn_cancel_activity Value for the event to cancel the activity Integer 1 (Numeric value)
evn_activity_ref Activity reference String "String" (Alphanumeric string)
evn_wait_for_completion Value that specifies the wait to complete a case Integer 1 (Numeric value)
evn_error_name Error name that may occur in the event String "String" (Alphanumeric string)
evn_error_code Error code that may occur in the event String "String" (Alphanumeric string)
evn_escalation_name Event escalation name String "String" (Alphanumeric string)
evn_escalation_code Event escalation code String "String" (Alphanumeric string)
evn_message Event message String "String" (Alphanumeric string)
evn_operation_name Event operation name String "String" (Alphanumeric string)
evn_operation_implementation_ref Event operation reference String "String" (Alphanumeric string)
evn_time_date Initial event time date String "String" (Alphanumeric string)
evn_time_cycle Event time cycle String "String" (Alphanumeric string)
evn_time_duration Event time duration String “String” (Alphanumeric string)
evn_behavior Event behaviour String "String" (Alphanumeric string)
*bou_x X-Coordinate of the element Integer 348 (Numeric Value)
*bou_y Y-Coordinate of the element Integer 348 (Numeric Value)
*bou_width Element width Integer 40 (Numeric Value)
*bou_height Element height Integer 28 (Numeric Value)
bou_container Class of the element container String “bpmnDiagram” (Alphanumeric string)

Note: * Web entry is now a start event, which is defined as a Message start event (evn_marker field).
* Case Scheduler is now a start event, which is defined as a Timer start event (evn_marker field)

Gateway Fields:

Name Description Type Value
*gat_uid Gateway UID String “1598d2h3…”(String of 32 characters)
*gat_name Gateway name String “String” (Alphanumeric string)
*gat_type Gateway Type String “EXCLUSIVE” or “INCLUSIVE” or “PARALLEL” or “COMPLEX” (Unique values)
*gat_direction Gateway direction String “DIVERGING” or “CONVERGING” (Unique values)

gat_instantiate Gateway instance Integer 1 (Numeric value)
gat_event_gateway_type Event gateway type String “String” (Alphanumeric string)
gat_default_flow Indicates the gateway default flow String “String” (Alphanumeric string)
*bou_x X-Coordinate of the element Integer 348 (Numeric value)
*bou_y Y-Coordinate of the element Integer 348 (Numeric value)
*bou_width Element width Integer 40 (Numeric value)
*bou_height Element height Integer 28 (Numeric value)
bou_container Class of the element container String “bpmnDiagram” (Alphanumeric string)

Artifact Fields:

Name Description Type Value
*art_uid Artifact UID String “1598d2h3…”(String of 32 characters)
*art_type Artifact type String “TEXT_ANNOTATION” or “VERTICAL_LINE” or “HORIZONTAL_LINE” (Unique values)
*art_name Activity name String “Name” (Alphanumeric string)
art_category_ref Reference of the artifact category String “String” (Alphanumeric string)
*bou_x X-Coordinate of the element Integer 348 (Numeric value)
*bou_y Y-Coordinate of the element Integer 348 (Numeric value)
*bou_width Element width Integer 40 (Numeric value)
*bou_height Element height Integer 28 (Numeric value)
bou_container Class of the element container String “bpmnDiagram” (Alphanumeric string)

Flow Fields:

Name Description Type Value
*flo_uid Flow UID String “1598d2h3…”(String of 32 characters)
*flo_type Flow type String “SEQUENCE” (Unique value)
*flo_name Flow name String “Name” (Alphanumeric string)
*flo_element_origin Value assigned to the relationship between the element and the source element of the flow. String “String” (Alphanumeric string)
*flo_element_origin_type Type of the source element of the flow, which can be "bpmnEvent" if the element is an event or "bpmnActivity" if the element is a task String “String” (Alphanumeric string)
*flo_element_dest Value assigned to the relationship between the element and the next element in the flow. String “String” (Alphanumeric string)
*flo_element_dest_type Type of the next element of the flow, which can be "bpmnEvent" if the element is an event or "bpmnActivity" if the element is a task. String “String” (Alphanumeric string)
flo_is_inmidiate Value to determine if the flow is inmediate Integer 1 (Numeric value)
*flo_condition Flow condition String “String” (Alphanumeric string)
*flo_x1 X-Coordinate of the origin element Integer 348 (Numeric value)
*flo_y1 Y-Coordinate of the origin element Integer 348 (Numeric value)
*flo_x2 X-Coordinate of the final element Integer 40 (Numeric value)
*flo_y2 Y-Coordinate of the final element Integer 28 (Numeric value)
*flo_state Point array where the flow generates an angle Array

NOTE: Only fields marked with an asterisk(*) are the fields currently implemented.

Get Projects List: GET project

Gets a list of the projects in the workspace.

Structure:

GET /api/1.0/{workspace}/project

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Parameters:

Name Type Description
workspace String Workspace name

Result:

Type Description
array Returns an array of objects

Example:

Response

 200 (OK)
 Content-Type: application/json
 [
    {
        "prj_uid": "655001588534fece2d46f86033751389",
        "prj_name": "Project_name",
        "prj_description": "",
        "prj_category": "",
        "prj_type": "bpmn",
        "prj_create_date": "2014-04-17 11:01:54",
        "prj_update_date": "2014-04-17 15:11:21"
        },
        {
            "prj_uid": "4437391625350213a013912065378061",
            "prj_name": "Project_name2",
            "prj_description": "",
            "prj_category": "",
            "prj_type": "classic",
            "prj_create_date": "2014-04-17 14:45:13",
            "prj_update_date": null
        }
    }
 ]

Get Project Definition: GET project/{prj_uid}

Gets the definition of a project.

Structure:

GET /api/1.0/{workspace}/project/{prj_uid}

Permission:

Users must have the PM_FACTORY or PM_CASES permission assigned to their role to perform this action.

Parameters:

Name Type Description
workspace String Workspace name
prj_uid String Project UID

Result:

Type Description
array Returns an array of objects

Example:

Response

 200 (OK)
 Content-Type: application/json
 {
    "prj_uid": "655001588534fece2d46f86033751389",
    "prj_name": "Project_name",
    "prj_description": "",
    "prj_target_namespace": "",
    "prj_expresion_language": null,
    "prj_type_language": null,
    "prj_exporter": null,
    "prj_exporter_version": null,
    "prj_create_date": "2014-04-17 11:01:54",
    "prj_update_date": "2014-04-21 08:46:17",
    "prj_author": "00000000000000000000000000000001",
    "prj_author_version": null,
    "prj_original_source": null,
    "diagrams": [
        {
            "dia_uid": "956446767534fece3179b54016939905",
            "prj_uid": "655001588534fece2d46f86033751389",
            "dia_name": "Diagram name",
            "dia_is_closable": 0,
            "pro_uid": "736054291534fece3342096012897456",
            "activities": [
                {
                    "act_uid": "569214945534fecfa8f0835033274864",
                    "act_name": "Task # 1",
                    "act_type": "TASK",
                    "act_is_for_compensation": "0",
                    "act_start_quantity": "1",
                    "act_completion_quantity": "0",
                    "act_task_type": "EMPTY",
                    "act_implementation": "",
                    "act_instantiate": "0",
                    "act_script_type": "",
                    "act_script": "",
                    "act_loop_type": "NONE",
                    "act_test_before": "0",
                    "act_loop_maximum": "0",
                    "act_loop_condition": "0",
                    "act_loop_cardinality": "0",
                    "act_loop_behavior": "0",
                    "act_is_adhoc": "0",
                    "act_is_collapsed": "0",
                    "act_completion_condition": "0",
                    "act_ordering": "0",
                    "act_cancel_remaining_instances": "0",
                    "act_protocol": "0",
                    "act_method": "0",
                    "act_is_global": "0",
                    "act_referer": "0",
                    "act_default_flow": "0",
                    "act_master_diagram": "0",
                    "bou_x": "486",
                    "bou_y": "101",
                    "bou_width": "161",
                    "bou_height": "42",
                    "bou_container": "bpmnDiagram"
                }
            ],
            "events": [
                {
                    "evn_uid": "259220802534fecfad49854013091940",
                    "evn_name": "Start # 1",
                    "evn_type": "START",
                    "evn_marker": "MESSAGE",
                    "evn_is_interrupting": "1",
                    "evn_cancel_activity": "0",
                    "evn_activity_ref": null,
                    "evn_wait_for_completion": "0",
                    "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": "517",
                    "bou_y": "19",
                    "bou_width": "33",
                    "bou_height": "33",
                    "bou_container": "bpmnDiagram"
                },
              {
                "evn_uid": "856003291534fecfae5dff7085708495",
                "evn_name": "End # 1",
                "evn_type": "END",
                "evn_marker": "EMPTY",
                "evn_is_interrupting": "1",
                "evn_cancel_activity": "0",
                "evn_activity_ref": null,
                "evn_wait_for_completion": "0",
                "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": "549",
                "bou_y": "181",
                "bou_width": "33",
                "bou_height": "33",
                "bou_container": "bpmnDiagram"
              }
            "gateways": [],
            "flows": [
                {
                    "flo_uid": "17092374253551306216a72013534569",
                    "flo_type": "SEQUENCE",
                    "flo_name": null,
                    "flo_element_origin": "569214945534fecfa8f0835033274864",
                    "flo_element_origin_type": "bpmnActivity",
                    "flo_element_dest": "856003291534fecfae5dff7085708495",
                    "flo_element_dest_type": "bpmnEvent",
                    "flo_is_inmediate": "1",
                    "flo_condition": null,
                    "flo_x1": "561",
                    "flo_y1": "193",
                    "flo_x2": "577"
                    "flo_y2": "193",
                    "flo_state": [
                {
                    "x": 566,
                    "y": 145
                },
                {
                    "x": 566,
                    "y": 171
                },
                {
                    "x": 602,
                    "y": 171
                },
                {
                    "x": 602,
                    "y": 198
                },
                {
                    "x": 582,
                    "y": 198
                }
            ]
        },
        {
            "flo_uid": "304762728534fecfaf3bf88040991913"
            "flo_type": "SEQUENCE",
            "flo_name": null,
            "flo_element_origin": "259220802534fecfad49854013091940",
            "flo_element_origin_type": "bpmnEvent",
            "flo_element_dest": "569214945534fecfa8f0835033274864",
            "flo_element_dest_type": "bpmnActivity",
            "flo_is_inmediate": "1",
            "flo_condition": null,
            "flo_x1": "529",
            "flo_y1": "95",
            "flo_x2": "556",
            "flo_y2": "95",
            "flo_state": [
                {
                    "x": 534,
                    "y": 52
                },
                {
                    "x": 534,
                    "y": 76
                },
                {
                    "x": 561,
                    "y": 76
                },
                {
                    "x": 561,
                    "y": 100
                }
            ]
        }
    ],
    "artifacts": [],
    "laneset": [],
    "lanes": []
    }
  ],
  "usr_settings": {
       enabled_grid: true
   }
 }

Create Project: POST project

Creates a new project.

Structure:

POST /api/1.0/{workspace}/project

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Parameters:

Name Type Description
workspace String Workspace name

Required fields:

Name Type Description
Required Fields for Projects
prj_name String Project name or title
prj_description String Project description

The following tables describe the fields needed to create elements inside a project. Remember that to create a project only the name and the description are required.

Name Type Description
Required Fields for Activities
act_name String Activity name
act_type String Activity type
bou_x Integer X-Coordinate of the element
bou_y Integer Y-Coordinate of the element
bou_width Integer Element width
bou_height Integer Element height
Required Fields for Events
evn_type String Event type
evn_marker String Event marker type
bou_x Integer X-Coordinate of the element
bou_y Integer Y-Coordinate of the element
bou_width Integer Element width
bou_height Integer Element height
Required Fields for Gateways
gat_name String Gateway name
gat_type String Gateway type
gat_direction String Gateway direction
bou_x Integer X-Coordinate of the element
bou_y Integer Y-Coordinate of the element
bou_width Integer Element width
bou_height Integer Element height
Required Fields for Artifacts
art_type String Artifact type
art_name String Activity name
bou_x Integer X-Coordinate of the element
bou_y Integer Y-Coordinate of the element
bou_width Integer Element width
bou_height Integer Element height
Required Fields for Flows
flo_type String Flow type
flo_name String Flow name
flo_element_origin_type String Type of the source element of the flow, which can be "bpmnEvent" if the element is an event or "bpmnActivity" if the element is a task.
flo_element_dest String Value assigned to the relationship between the element and the next element in the flow.
flo_element_dest_type String Type of the next element of the flow, which can be "bpmnEvent" if the element is an event or "bpmnActivity" if the element is a task.
flo_is_inmediate Integer Value that determines if the flow is immediate.
flo_condition String Flow condition
flo_x1 Integer X-Coordinate of the origin element
flo_y1 Integer Y-Coordinate of the origin element
flo_x2 Integer X-Coordinate of the final element
flo_y2 Integer Y-Coordinate of the final element

Optional fields:

Name Type Description
Optional Fields for Projects
prj_type String Type of project: "NORMAL", "BPMN"
prj_category String UID of the category of the project
diagrams Array Diagrams array
Optional Fields for Diagrams
activities Array Activities array
events Array Events array
gateways Array Gateways array
flows Array Flows array
Optional Fields for Flows
flo_element_origin String Value assigned to the relationship between the element and the source element of the flow.
flo_state Array Array of points where the flow generates an angle

Result:

Type Description
empty No return

Example:

Request

 Content-Type: application/json
 {
    "prj_uid": "655001588534fece2d46f86033751389",
    "prj_name": "Project_name",
    "prj_description": "",
    "prj_target_namespace": "",
    "prj_expresion_language": null,
    "prj_type_language": null,
    "prj_exporter": null,
    "prj_exporter_version": null,
    "prj_create_date": "2014-04-17 11:01:54",
    "prj_update_date": "2014-04-21 08:46:17",
    "prj_author": "00000000000000000000000000000001",
    "prj_author_version": null,
    "prj_original_source": null,
    "diagrams": [
        {
            "prj_uid": "655001588534fece2d46f86033751389",
            "dia_name": "Diagram name",
            "dia_is_closable": 0,
            "pro_uid": "736054291534fece3342096012897456",
            "activities": [
                {
                    "act_name": "Task # 1",
                    "act_type": "TASK",
                    "act_is_for_compensation": "0",
                    "act_start_quantity": "1",
                    "act_completion_quantity": "0",
                    "act_task_type": "EMPTY",
                    "act_implementation": "",
                    "act_instantiate": "0",
                    "act_script_type": "",
                    "act_script": "",
                    "act_loop_type": "NONE",
                    "act_test_before": "0",
                    "act_loop_maximum": "0",
                    "act_loop_condition": "0",
                    "act_loop_cardinality": "0",
                    "act_loop_behavior": "0",
                    "act_is_adhoc": "0",
                    "act_is_collapsed": "0",
                    "act_completion_condition": "0",
                    "act_ordering": "0",
                    "act_cancel_remaining_instances": "0",
                    "act_protocol": "0",
                    "act_method": "0",
                    "act_is_global": "0",
                    "act_referer": "0",
                    "act_default_flow": "0",
                    "act_master_diagram": "0",
                    "bou_x": "486",
                    "bou_y": "101",
                    "bou_width": "161",
                    "bou_height": "42",
                    "bou_container": "bpmnDiagram"
                }
            ],
            "events": [
                {
                    "evn_name": "Start # 1",
                    "evn_type": "START",
                    "evn_marker": "MESSAGE",
                    "evn_is_interrupting": "1",
                    "evn_cancel_activity": "0",
                    "evn_activity_ref": null,
                    "evn_wait_for_completion": "0",
                    "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": "517",
                    "bou_y": "19",
                    "bou_width": "33",
                    "bou_height": "33",
                    "bou_container": "bpmnDiagram"
                },
                {
                    "evn_uid": "856003291534fecfae5dff7085708495",
                    "evn_name": "End # 1",
                    "evn_type": "END",
                    "evn_marker": "EMPTY",
                    "evn_is_interrupting": "1",
                    "evn_cancel_activity": "0",
                    "evn_activity_ref": null,
                    "evn_wait_for_completion": "0",
                    "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": "549",
                    "bou_y": "181",
                    "bou_width": "33",
                    "bou_height": "33",
                    "bou_container": "bpmnDiagram"
                }
            ],
            "gateways": [],
            "flows": [
                {
                    "flo_type": "SEQUENCE",
                    "flo_name": null,
                    "flo_element_origin": "569214945534fecfa8f0835033274864",
                    "flo_element_origin_type": "bpmnActivity",
                    "flo_element_dest": "856003291534fecfae5dff7085708495",
                    "flo_element_dest_type": "bpmnEvent",
                    "flo_is_inmediate": "1",
                    "flo_condition": null,
                    "flo_x1": "561",
                    "flo_y1": "193",
                    "flo_x2": "577",
                    "flo_y2": "193",
                    "flo_state": [
                        {
                            "x": 566,
                            "y": 145
                        },
                        {
                            "x": 566,
                            "y": 171
                        },
                        {
                            "x": 602,
                            "y": 171
                        },
                        {
                            "x": 602,
                            "y": 198
                        },
                        {
                            "x": 582,
                            "y": 198
                        }
                    ]
                },
                {
                    "flo_type": "SEQUENCE",
                    "flo_name": null,
                    "flo_element_origin": "259220802534fecfad49854013091940",
                    "flo_element_origin_type": "bpmnEvent",
                    "flo_element_dest": "569214945534fecfa8f0835033274864",
                    "flo_element_dest_type": "bpmnActivity",
                    "flo_is_inmediate": "1",
                    "flo_condition": null,
                    "flo_x1": "529",
                    "flo_y1": "95",
                    "flo_x2": "556",
                    "flo_y2": "95",
                    "flo_state": [
                        {
                            "x": 534,
                            "y": 52
                        },
                        {
                            "x": 534,
                            "y": 76
                        },
                        {
                            "x": 561,
                            "y": 76
                        },
                        {
                            "x": 561,
                            "y": 100
                        }
                    ]
                }
            ],
            "artifacts": [],
            "laneset": [],
            "lanes": []
        }
    ],
  "usr_settings": {
       enabled_grid: true
   }
}

Response

 201 (Created)

Update Project: PUT project/{uid}

Updates a project.

Structure:

PUT /api/1.0/{workspace}/project/{uid}

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Parameters:

Name Type Description
workspace String Workspace name
uid String Project UID

Required fields:

Name Type Description
Required Fields for Projects
prj_name String Project name or title
prj_description String Project description
Required Fields for Activities
act_uid String Activity UID
act_name String Activity name
act_type String Activity type
bou_x Integer X-Coordinate of the element
bou_y Integer Y-Coordinate of the element
bou_width Integer Element width
bou_height Integer Element height
Required Fields for Events
evn_uid String Event UID
evn_name String Event name
evn_type String Event type
evn_marker String Event marker type
bou_x Integer X-Coordinate of the element
bou_y Integer Y-Coordinate of the element
bou_width Integer Element width
bou_height Integer Element height
Required Fields for Gateways
gat_uid String Gateway UID
gat_name String Gateway name
gat_type String Gateway type
gat_direction String Gateway direction
bou_x Integer X-Coordinate of the element
bou_y Integer Y-Coordinate of the element
bou_width Integer Element width
bou_height Integer Element height
Required Fields for Artifacts
art_uid String Artifact UID
art_type String Artifact type
art_name String Activity name
bou_x Integer X-Coordinate of the element
bou_y Integer Y-Coordinate of the element
bou_width Integer Element width
bou_height Integer Element height
Required Fields for Flows
flo_uid String Flow UID
flo_type String Flow type
flo_name String Flow name
flo_element_origin_type String Type of the source element of the flow, which can be "bpmnEvent" if the element is an event or "bpmnActivity" if the element is a task.
flo_element_dest String Value assigned to the relationship between the element and the next element in the flow.
flo_element_dest_type String Type of the next element of the flow, which can be "bpmnEvent" if the element is an event or "bpmnActivity" if the element is a task.
flo_is_inmediate Integer Value that determines if the flow is immediate
flo_condition String Flow condition
flo_x1 Integer X-Coordinate of the origin element
flo_y1 Integer Y-Coordinate of the origin element
flo_x2 Integer X-Coordinate of the final element
flo_y2 Integer Y-Coordinate of the final element

Optional fields:

Name Type Description
Optional Fields for Projects
prj_type String Type of project: "NORMAL", "BPMN"
prj_category String UID of the category of the project
diagrams Array Diagrams array
Optional Fields for Diagrams
dia_uid String Diagram UID
activities Array Activities array
events Array Events array
gateways Array Gateways array
flows Array Flows array
Optional Fields for Flows
flo_element_origin String Value assigned to the relationship between the element and the source element of the flow.
flo_state Array Array of points where the flow generates an angle

Result:

Type Description
empty No return

Example:

Request

 Content-Type: application/json
 {
    "prj_uid": "655001588534fece2d46f86033751389",
    "prj_name": "Project_name",
    "prj_description": "",
    "prj_target_namespace": "",
    "prj_expresion_language": null,
    "prj_type_language": null,
    "prj_exporter": null,
    "prj_exporter_version": null,
    "prj_create_date": "2014-04-17 11:01:54",
    "prj_update_date": "2014-04-21 08:46:17",
    "prj_author": "00000000000000000000000000000001",
    "prj_author_version": null,
    "prj_original_source": null,
    "diagrams": [
        {
            "dia_uid": "956446767534fece3179b54016939905",
            "prj_uid": "655001588534fece2d46f86033751389",
            "dia_name": "Diagram name",
            "dia_is_closable": 0,
            "pro_uid": "736054291534fece3342096012897456",
            "activities": [
                {
                    "act_uid": "569214945534fecfa8f0835033274864",
                    "act_name": "Task # 1",
                    "act_type": "TASK",
                    "act_is_for_compensation": "0",
                    "act_start_quantity": "1",
                    "act_completion_quantity": "0",
                    "act_task_type": "EMPTY",
                    "act_implementation": "",
                    "act_instantiate": "0",
                    "act_script_type": "",
                    "act_script": "",
                    "act_loop_type": "NONE",
                    "act_test_before": "0",
                    "act_loop_maximum": "0",
                    "act_loop_condition": "0",
                    "act_loop_cardinality": "0",
                    "act_loop_behavior": "0",
                    "act_is_adhoc": "0",
                    "act_is_collapsed": "0",
                    "act_completion_condition": "0",
                    "act_ordering": "0",
                    "act_cancel_remaining_instances": "0",
                    "act_protocol": "0",
                    "act_method": "0",
                    "act_is_global": "0",
                    "act_referer": "0",
                    "act_default_flow": "0",
                    "act_master_diagram": "0",
                    "bou_x": "486",
                    "bou_y": "101",
                    "bou_width": "161",
                    "bou_height": "42",
                    "bou_container": "bpmnDiagram"
                }
            ],
            "events": [
                {
                    "evn_uid": "259220802534fecfad49854013091940",
                    "evn_name": "Start # 1",
                    "evn_type": "START",
                    "evn_marker": "MESSAGE",
                    "evn_is_interrupting": "1",
                    "evn_cancel_activity": "0",
                    "evn_activity_ref": null,
                    "evn_wait_for_completion": "0",
                    "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": "517",
                    "bou_y": "19",
                    "bou_width": "33",
                    "bou_height": "33",
                    "bou_container": "bpmnDiagram"
                },
                  {
                      "evn_uid": "856003291534fecfae5dff7085708495",
                      "evn_name": "End # 1",
                      "evn_type": "END",
                      "evn_marker": "EMPTY",
                      "evn_is_interrupting": "1",
                      "evn_cancel_activity": "0",
                      "evn_activity_ref": null,
                      "evn_wait_for_completion": "0",
                      "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": "549",
                      "bou_y": "181",
                      "bou_width": "33",
                      "bou_height": "33",
                      "bou_container": "bpmnDiagram"
                  }
            "gateways": [],
            "flows": [
                {
                    "flo_uid": "17092374253551306216a72013534569",
                    "flo_type": "SEQUENCE",
                    "flo_name": null,
                    "flo_element_origin": "569214945534fecfa8f0835033274864",
                    "flo_element_origin_type": "bpmnActivity",
                    "flo_element_dest": "856003291534fecfae5dff7085708495",
                    "flo_element_dest_type": "bpmnEvent",
                    "flo_is_inmediate": "1",
                    "flo_condition": null,
                    "flo_x1": "561",
                    "flo_y1": "193",
                    "flo_x2": "577"
                    "flo_y2": "193",
                    "flo_state": [
                {
                    "x": 566,
                    "y": 145
                },
                {
                    "x": 566,
                    "y": 171
                },
                {
                    "x": 602,
                    "y": 171
                },
                {
                    "x": 602,
                    "y": 198
                },
                {
                    "x": 582,
                    "y": 198
                }
            ]
        },
        {
            "flo_uid": "304762728534fecfaf3bf88040991913"
            "flo_type": "SEQUENCE",
            "flo_name": null,
            "flo_element_origin": "259220802534fecfad49854013091940",
            "flo_element_origin_type": "bpmnEvent",
            "flo_element_dest": "569214945534fecfa8f0835033274864",
            "flo_element_dest_type": "bpmnActivity",
            "flo_is_inmediate": "1",
            "flo_condition": null,
            "flo_x1": "529",
            "flo_y1": "95",
            "flo_x2": "556",
            "flo_y2": "95",
            "flo_state": [
                {
                    "x": 534,
                    "y": 52
                },
                {
                    "x": 534,
                    "y": 76
                },
                {
                    "x": 561,
                    "y": 76
                },
                {
                    "x": 561,
                    "y": 100
                }
            ]
        }
    ],
    "artifacts": [],
    "laneset": [],
    "lanes": []
    }
  ],
  "usr_settings": {
       enabled_grid: true
   }
 }

Response

 200 (OK)

Delete Project: DELETE project/{uid}

Deletes a project.

Structure:

DELETE /api/1.0/{workspace}/project/{uid}

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Parameters:

Name Type Description
workspace String Workspace name
uid String Project UID

Result:

Type Description
empty No return

Example:

Response

 200 (OK)

If the project cannot be found or it was already deleted, the status code is set to 400 or higher and an error object is returned, such as:

{
  "error": {
    "code":    400,
    "message": "Bad Request: The project cannot be found or it was already deleted."
  }
}

Delete BPMN Processes in a Batch: POST project/bulk

Available Version: The following endpoint is available as of ProcessMaker version 3.2.2.

Deletes more than one BPMN process at a time. Note that only processes with no started cases will be deleted.

Structure:

POST /api/1.0/{workspace}/project/bulk

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Parameters:

Name Type Description
workspace String Workspace name

POST Body - Required Fields:

Name Type Description
type String The type of process. Currently, the endpoint only allows BPMN processes to be deleted, so this parameter must be set to "bpmn".
prj_uid String Process UID.

Result:
Returns an array of objects containing information about each process.

Example:

POST Request

{
    "data": [
        {
          "action": "delete",
          "data": [
            {
              "type": "bpmn",
              "prj_uid": "80631395059b930d019e9e4020705479"
            },
            {
              "type": "bpmn",
              "prj_uid": "53744888759b930fed3f9b1062729182"
            }
          ]
        }
    ]
}

Response

200 (OK)
{
    "data": [
        {
            "action": "delete",
            "data": [
                {
                    "type": "bpmn",
                    "prj_uid": "80631395059b930d019e9e4020705479",
                    "status": "200",
                    "result": true
                },
                {
                    "type": "bpmn",
                    "prj_uid": "53744888759b930fed3f9b1062729182",
                    "status": "200",
                    "result": true
                }
            ]
        }
    ]
}

Create BPMN Project: POST project/generate-bpmn

Creates a BPMN Project for a given process.

Structure:

POST /api/1.0/{workspace}/project/generate-bpmn

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Parameters:

Name Type Description
workspace String Workspace name

Required Fields:

Name Type Description
pro_uid String Process UID

Result:

Type Description
object Returns an object containing the data sent plus the "prj_uid" attribute

Example:

Request

 Content-Type: application/json
 {
    "pro_uid": "177459544536a7b17a4ead3036190234"
 }

Response

  201 (Created)
  {
     "prj_uid": "84880409353d7fdfec43975021914082",
     "pro_uid": "177459544536a7b17a4ead3036190234"
  }

Export Project

The following is the method for exporting a project from the ProcessMaker API.

1. Exports a project

Export Project:

Name Description Type Value
workspace Workspace name String “workflow”
prj_uid Project UID String “9541049475298f190420f51086854718” (String of 32 characters)

Export Project: GET project/{prj_uid}/export

Export a project.

Structure:

GET /api/1.0/{workspace}/project/{prj_uid}/export

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Parameters:

Name Type Description
workspace String Workspace name
prj_uid String Project UID

Result:

Type Description
XML Returns an xml file containing all the information about the process.

Example:

Response

Content-Type: xml
200 (OK)
<?xml version="1.0" encoding="utf-8"?>
<ProcessMaker-Project version="3.0">
   <metadata>
      <meta key="workspace">workflow</meta>
      <meta key="name">My Project</meta>
      <meta key="uid">4197736685367bbca5bee15040503918</meta>
      …
   </metadata>
   <definition class="BPMN">
      <table name="PROJECT">
         <record>
            <prj_uid>4197736685367bbca5bee15040503918</prj_uid>
            <prj_name>My Project</prj_name>
            ...
         </record>
      </table>
      <table name="PROCESS">
         <record>
            <pro_uid>5417674845367bbca675488032419039</pro_uid>
            <prj_uid>4197736685367bbca5bee15040503918</prj_uid>
            <pro_name>My Project</pro_name>
            ...
         </record>
      </table>
      …
   </definition>
   <definition class="workflow">
      <table name="process">
         <record>
            <pro_uid>4197736685367bbca5bee15040503918</pro_uid>
            <pro_title>My Project</pro_title>
            ...
         </record>
      </table>
      <table name="tasks"/>
      <table name="dynaforms"/>
      ...
   </definition>
   <workflow-files/>
</ProcessMaker-Project>

Import Project

Import Project: POST /project/import?option={option}&option_group={option_group}

Import a project.

Structure:

POST /api/1.0/{workspace}/project/import?option={option}&option_group={option_group}

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Parameters:

Name Description Type Value
workspace Workspace name String “workflow”
prj_uid Project UID String “9541049475298f190420f51086854718” (string of 32 characters)
option (Optional) Option that indicates what to do a project with the same unique ID already exists in the workspace. If not set, the default option will be CREATE. The available options are:
  • CREATE: Creates a new project and assign new unique IDs to all the objects in the imported project.
  • OVERWRITE: Overwrites the existing project, keeping the same unique IDs in the imported project.
  • DISABLE: Disables the existing project and create a new version of the project with new unique IDs assigned to all the objects in the imported project.
  • KEEP: Keeps the existing project and creates a completely new project with new unique IDs in all the objects of the imported project.
String "CREATE", "OVERWRITE", "DISABLE", "KEEP" (Unique values).
option_group (Optional) Group option that indicates what to do a if the imported project has group(s) of users with the same name of already existing group(s). If not set, the default option will be CREATE. The available options are:
  • CREATE: Imports/Creates the group(s).
  • RENAME: Renames the imported groups.
  • MERGE: Merges the imported groups, with the existing groups (no changes will be made to the local groups).
String "CREATE", "RENAME ", "MERGE" (unique values)

Required Fields:

Name Description Type Value
project_file “pmx” file String “MyProject.pmx”

Note.- Files are imported with the .pmx format, see example below. It is not possible to use those process in older versions of ProcessMaker and viceversa.

Result:

Type Description
object The return is an object and the prj_uid attribute

Example:

Request

 <?php
      $url  = "http://processmaker.example.com/api/1.0/workflow/project/import";
      $accessToken = "2443abcdef12345087362abcdef22458913";
      $projectFilePath = "/path/to/project/MyProject.pmx";
      $header = array(
            "Authorization: Bearer " . $accessToken
      );

      $aPost = array(
          "project_file" => new CURLFile($projectFilePath) //if using PHP 5.5.0 or later

          //Note: if using PHP 5.4.X or earlier, then access the project file this way:
          //"project_file" => "@" . $projectFilePath
      );
         
      //Send file
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
      curl_setopt($ch, CURLOPT_POSTFIELDS, $aPost);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      $arrayResponse = (array)(json_decode(curl_exec($ch)));
      curl_close($ch);
      var_dump($arrayResponse);

      //if failed to import because the project already exists, then resend the file
      //with options to create a new project and merge groups with existing groups
      if (!isset($arrayResponse["prj_uid"])) {
         $ch = curl_init();
         curl_setopt($ch, CURLOPT_URL, $url . "?option=keep&option_group=merge");
         curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
         curl_setopt($ch, CURLOPT_POSTFIELDS, $aPost);
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
         $arrayResponse = (array)(json_decode(curl_exec($ch)));
         curl_close($ch);
         var_dump($arrayResponse);
      }
?>

Response

 201 (Created)
 {
  "prj_uid": "8131652775363e959e5fdf4087993497"
  "prj_file": "MyProject.pmx"
 }

Get Process: GET project/{prj_uid}/process/

Gets information about a process.

Structure:

GET /api/1.0/{workspace}/project/{prj_uid}/process

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Parameters:

Name Type Description
workspace String Workspace name
prj_uid String Process UID

Result:

Type Description
object Returns an object containing information about the process.

Example:

Response

 200 (OK)
{
    "pro_uid": "14414793652a5d718b65590036026581",
    "pro_title": "Sample Project #1",
    "pro_description": "Description...",
    "pro_parent": "14414793652a5d718b65590036026581",
    "pro_time": 1,
    "pro_timeunit": "DAYS",
    "pro_status": "ACTIVE",
    "pro_type_day": "",
    "pro_type": "NORMAL",
    "pro_assignment": 0,
    "pro_show_map": 0,
    "pro_show_message": 1,
    "pro_subprocess": 1,
    "pro_tri_create": "7261047365888f8e12e8174036437308",
    "pro_tri_open": "",
    "pro_tri_deleted": "39979192352f11fa180f9a3046876080",
    "pro_tri_canceled": "32636698052efa15b2e75a9095960272",
    "pro_tri_paused": "32636698052efa15b2e75a9095960272",
    "pro_tri_reassigned": "32636698052efa15b2e75a9095960272",
    "pro_tri_unpaused": "",
    "pro_type_process": "PUBLIC",
    "pro_show_delegate": 0,
    "pro_show_dynaform": 0,
    "pro_category": "946156723508e864dbf85b9084284874",
    "pro_sub_category": "",
    "pro_industry": 0,
    "pro_update_date": "2017-01-25T19:17:53+00:00",
    "pro_create_date": "2017-01-24T16:05:39+00:00",
    "pro_create_user": "00000000000000000000000000000001",
    "pro_debug": 1,
    "pro_derivation_screen_tpl": "MyTemplate.html",
    "pro_cost": 10,
    "pro_unit_cost": "$",
    "pro_itee": 1,
    "pro_bpmn": 1,
    "pro_summary_dynaform": "77941473952b49c65a01a80041727578",
    "pro_calendar": "86431145652efa6f2413d29045495711"
}

Update Process: PUT project/{prj_uid}/process

Updates a process.

Structure:

PUT /api/1.0/{workspace}/project/{prj_uid}/process

Permission:

Users must have the PM_FACTORY permission assigned to their role to perform this action.

Parameters:

Name Type Description
workspace String Workspace name
prj_uid String Project UID

Required Fields

pro_uid String Process UID

Optional Fields

Name Type Description
pro_title String Process title
pro_description String Process description
pro_parent String Parent process UID (if the process does not have a parent this field is left empty)
pro_status String Process status
pro_show_message Integer Hides the case number and the case title in the steps
pro_subprocess Integer This is a subprocess
pro_tri_create String Trigger UID (Executes a trigger when the case is created)
pro_tri_open String Trigger UID (Executes a trigger when the case is opened)
pro_tri_deleted String Trigger UID (Executes a trigger when a case is deleted)
pro_tri_canceled String Trigger UID (Executes a trigger when a case is canceled)
pro_tri_paused String Trigger UID (Executes a trigger when a case is paused)
pro_tri_reassigned String Trigger UID (Executes a trigger when a case is reassigned)
pro_tri_unpaused String Trigger UID (Executes a trigger when a case is unpaused).
pro_type_process String Process type: "PUBLIC" or "PRIVATE".
pro_category String Process category UID
pro_debug Integer 0,1 (unique values)
pro_derivation_screen_tpl String Routing screen template
pro_summary_dynaform String Dynaform UID (Dynaform to show a case summary)
pro_cost Integer Approximate amount of idle time in the execution of the process cost.
pro_unit_cost String The currency unit of the pro_cost field.
pro_calendar String Calendar UID (Process calendar)

Result:

Type Description
empty No return

Example:

Request

Content-Type: application/json
{
   "pro_title": "Sample Project #1...",
   "pro_description": "Sample Project",
   "pro_parent": "14414793652a5d718b65590036026581",
   "pro_status": "ACTIVE",
   "pro_show_message": 1,
   "pro_subprocess": 1,
   "pro_tri_create": "7261047365888f8e12e8174036437308",
   "pro_tri_deleted": "39979192352f11fa180f9a3046876080",
   "pro_tri_canceled": "32636698052efa15b2e75a9095960272",
   "pro_tri_paused": "32636698052efa15b2e75a9095960272",
   "pro_tri_reassigned": "32636698052efa15b2e75a9095960272",
   "pro_category": "946156723508e864dbf85b9084284874",
   "pro_debug": 0,
   "pro_derivation_screen_tpl": "MyTemplate.html",
   "pro_unit_cost": "$us",
   "pro_summary_dynaform": "77941473952b49c65a01a80041727578",
   "pro_calendar": "86431145652efa6f2413d29045495711"
}

Response

200 (OK)