Event Endpoints
The current methods implemented for event resources in the ProcessMaker API designer end point are listed below:
- Event Endpoints
- Get Events List:
GET project/{prj_uid}/events
- Get Event Messages:
GET project/{prj_uid}/events?filter=message
- Get Event Condition:
GET project/{prj_uid}/events?filter=conditional
- Get Multiple Events List:
GET project/{prj_uid}/events?filter=multiple
- Get Event:
GET project/{prj_uid}/event/{evn_uid}
- Create Event:
POST project/{prj_uid}/event
- Update Event:
PUT project/{prj_uid}/event/{evn_uid}
- Delete Event:
DELETE project/{prj_uid}/event/{evn_uid}
Event resources:
Name | Description | Type | Value |
---|---|---|---|
evn_uid | Event UID | String | String |
evn_description | Event description | String | String |
evn_status | Event status | String | “ACTIVE” or “INACTIVE” (Unique values) |
evn_action | Variable for the priority of the case | String | “SEND_MESSAGE”, “EXECUTE_CONDITIONAL_TRIGGER” or “EXECUTE_TRIGGER” (Unique values) |
evn_related_to | Template of the routing screen | String | “SINGLE” or “MULTIPLE” (Unique values) |
tas_uid | Task UID, if it is an event with a single task | String | “h3kj231…” (Task UID) |
evn_tas_uid_from | Initial task UID, if it is an event with a range of tasks | String | “h3kj231…”(Task UID) |
evn_tas_estimated_duration | Time lapse for the completion of the tasks. (Type value of the variable "evn_time_unit") | String | 2 (Numeric Value) |
evn_time_unit | Value type of the time lapse when performing a task or tasks | String | “DAYS” or “HOURS” (Unique values) |
evn_when | Value in days of the time lapse of the execution of the event. | Integer | 3 (Numeric Value) |
evn_when_occurs | Time when the event will be held. | Integer | “AFTER_TIME” or “TASK_STARTED” (Numeric Value) |
tri_uid | UID of the trigger that will execute the event | Integer | 2 (Integer value) |
evn_tas_uid_to | Final task UID, if it is an event with a range of tasks | String | “DAYS” or “HOURS” (Unique values) |
evn_conditions | Condition that will execute the event if met | String | “@@VAL == 2” (Condition value) |
Get Events List: GET project/{prj_uid}/events
Gets a list of the events in a project.
GET /api/1.0/{workspace}/project/{prj_uid}/events
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Result:
-
Type Description array Returns an array of existing events in the process
Example:
Response
Content-Type: application/json
[
{
"evn_uid": "58444125052cc6b0763c9e7073755888",
"evn_action": "SEND_MESSAGE",
"evn_status": "ACTIVE",
"evn_when_occurs": "AFTER_TIME",
"evn_related_to": "SINGLE",
"evn_description": "change description",
"tas_uid": "97192372152a5c78f04a794095806311",
"evn_tas_uid_from": "",
"evn_tas_uid_to": "",
"evn_tas_estimated_duration": 1,
"evn_time_unit": "DAYS",
"evn_when": 1,
"evn_conditions": null,
"tri_uid": "75916963152cc6ab085a704081670580"
},
{
"evn_uid": "89509271952cc6a790edf82030863972",
"evn_action": "SEND_MESSAGE",
"evn_status": "ACTIVE",
"evn_when_occurs": "AFTER_TIME",
"evn_related_to": "SINGLE",
"evn_description": "change description",
"tas_uid": "97192372152a5c78f04a794095806311",
"evn_tas_uid_from": "",
"evn_tas_uid_to": "",
"evn_tas_estimated_duration": 1,
"evn_time_unit": "DAYS",
"evn_when": 1,
"evn_conditions": null,
"tri_uid": "95325847552af0c07792c15098680510"
}
]
Get Event Messages: GET project/{prj_uid}/events?filter=message
Gets the list of the event messages in a project.
GET /api/1.0/{workspace}/project/{prj_uid}/events?filter=message
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Optional Parameters:
-
Name Type Description filter String Event type to be listed ("message")
Result:
-
Type Description array Returns an array of existing events in the process
Example:
Response
Content-Type: application/json
[
{
"evn_uid": "58444125052cc6b0763c9e7073755888",
"evn_action": "SEND_MESSAGE",
"evn_status": "ACTIVE",
"evn_when_occurs": "AFTER_TIME",
"evn_related_to": "SINGLE",
"evn_description": "change description",
"tas_uid": "97192372152a5c78f04a794095806311",
"evn_tas_uid_from": "",
"evn_tas_uid_to": "",
"evn_tas_estimated_duration": 1,
"evn_time_unit": "DAYS",
"evn_when": 1,
"evn_conditions": null,
"tri_uid": "75916963152cc6ab085a704081670580"
},
{
"evn_uid": "89509271952cc6a790edf82030863972",
"evn_action": "SEND_MESSAGE",
"evn_status": "ACTIVE",
"evn_when_occurs": "AFTER_TIME",
"evn_related_to": "SINGLE",
"evn_description": "change description",
"tas_uid": "97192372152a5c78f04a794095806311",
"evn_tas_uid_from": "",
"evn_tas_uid_to": "",
"evn_tas_estimated_duration": 1,
"evn_time_unit": "DAYS",
"evn_when": 1,
"evn_conditions": null,
"tri_uid": "95325847552af0c07792c15098680510"
}
]
Get Event Condition: GET project/{prj_uid}/events?filter=conditional
Gets the list of the event conditions in a project.
GET /api/1.0/{workspace}/project/{prj_uid}/events?filter=conditional
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Optional Parameters:
-
Name Type Description filter String Event type to be listed ("conditional")
Result:
-
Type Description array Returns an array of existing events in the process
Example:
Response
Content-Type: application/json
[
{
"evn_uid": "11122125052cc6b0763c9e7073755888",
"evn_action": "EXECUTE_CONDITIONAL_TRIGGER",
"evn_status": "ACTIVE",
"evn_when_occurs": "AFTER_TIME",
"evn_related_to": "SINGLE",
"evn_description": "change description",
"tas_uid": "97192372152a5c78f04a794095806311",
"evn_tas_uid_from": "",
"evn_tas_uid_to": "",
"evn_tas_estimated_duration": 1,
"evn_time_unit": "DAYS",
"evn_when": 1,
"evn_conditions": null,
"tri_uid": "75916963152cc6ab085a704081670580"
},
{
"evn_uid": "asdf9271952cc6a790edf82030863972",
"evn_action": "EXECUTE_CONDITIONAL_TRIGGER",
"evn_status": "ACTIVE",
"evn_when_occurs": "AFTER_TIME",
"evn_related_to": "SINGLE",
"evn_description": "change description",
"tas_uid": "97192372152a5c78f04a794095806311",
"evn_tas_uid_from": "",
"evn_tas_uid_to": "",
"evn_tas_estimated_duration": 1,
"evn_time_unit": "DAYS",
"evn_when": 1,
"evn_conditions": null,
"tri_uid": "95325847552af0c07792c15098680510"
}
]
Get Multiple Events List: GET project/{prj_uid}/events?filter=multiple
Gets the list of the multiple events in a project.
GET /api/1.0/{workspace}/project/{prj_uid}/events?filter=multiple
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Optional Parameters:
-
Name Type Description filter String Event type to be listed ("multiple")
Result:
-
Type Description array Returns an array of existing events in the process
Example:
Response
Content-Type: application/json
[
{
"evn_uid": "ttyyu4125052cc6b0763c9e7073755888",
"evn_action": "EXECUTE_TRIGGER",
"evn_status": "ACTIVE",
"evn_when_occurs": "AFTER_TIME",
"evn_related_to": "SINGLE",
"evn_description": "change description",
"tas_uid": "97192372152a5c78f04a794095806311",
"evn_tas_uid_from": "",
"evn_tas_uid_to": "",
"evn_tas_estimated_duration": 1,
"evn_time_unit": "DAYS",
"evn_when": 1,
"evn_conditions": null,
"tri_uid": "75916963152cc6ab085a704081670580"
},
{
"evn_uid": "q34fd2471952cc6a790edf82030863972",
"evn_action": "EXECUTE_TRIGGER",
"evn_status": "ACTIVE",
"evn_when_occurs": "AFTER_TIME",
"evn_related_to": "SINGLE",
"evn_description": "change description",
"tas_uid": "97192372152a5c78f04a794095806311",
"evn_tas_uid_from": "",
"evn_tas_uid_to": "",
"evn_tas_estimated_duration": 1,
"evn_time_unit": "DAYS",
"evn_when": 1,
"evn_conditions": null,
"tri_uid": "95325847552af0c07792c15098680510"
}
]
Get Event: GET project/{prj_uid}/event/{evn_uid}
Gets information about an event.
GET /api/1.0/{workspace}/project/{prj_uid}/event/{evn_uid}
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID evn_uid String Event UID
Result:
-
Type Description object Returns an object containing the event data
Example:
Response
Content-Type: application/json
{
"evn_uid": "58444125052cc6b0763c9e7073755888",
"evn_action": "SEND_MESSAGE",
"evn_status": "ACTIVE",
"evn_when_occurs": "AFTER_TIME",
"evn_related_to": "SINGLE",
"evn_description": "change description",
"tas_uid": "97192372152a5c78f04a794095806311",
"evn_tas_uid_from": "",
"evn_tas_uid_to": "",
"evn_tas_estimated_duration": 1,
"evn_time_unit": "DAYS",
"evn_when": 1,
"evn_conditions": null,
"tri_uid": "75916963152cc6ab085a704081670580"
}
Create Event: POST project/{prj_uid}/event
Creates a new event.
Permission:
- Users must have the PM_FACTORY permission assigned to their role to perform this action.
Structure:
POST /api/1.0/{workspace}/project/{prj_uid}/event
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID
Required Fields:
-
Name Type Description evn_description String Event description evn_status String Event status evn_action String Variable for the priority case evn_related_to String Template of the routing screen tas_uid String Task UID. Only if evn_related_to = "SINGLE" evn_tas_uid_from String Initial task UID. Only if evn_related_to = "MULTIPLE" evn_tas_estimated_duration String Time lapse for the completion of the tasks evn_time_unit String Value type of the time lapse when performing a task or tasks evn_when Integer Value in days of the time lapse for the execution of the event evn_when_occurs Integer Time when the event will be held tri_uid Integer UID of the trigger that will execute the event evn_tas_uid_to String Final task UID. Only if evn_related_to = "MULTIPLE"
Optional Fields:
-
Name Type Description evn_conditions String Condition that will execute the event if met
Result:
-
Type Description object Returns an object containing data about the event created.
Example:
Request
{
"evn_description": "event 1",
"evn_status": "ACTIVE",
"evn_action": "SEND_MESSAGE",
"evn_related_to": "MULTIPLE",
"evn_tas_uid_from": "97192372152a5c78f04a794095806311",
"evn_tas_uid_to": "58444125052cc6b0763c9e7073755888",
"evn_tas_estimated_duration": 1,
"evn_time_unit": "DAYS",
"evn_when": 1,
"evn_when_occurs": "AFTER_TIME",
"tri_uid": "95325847552af0c07792c15098680510"
}
Response
Update Event: PUT project/{prj_uid}/event/{evn_uid}
Updates an event.
Permission:
- Users must have the PM_FACTORY permission assigned to their role to perform this action.
Structure:
PUT /api/1.0/{workspace}/project/{prj_uid}/event/{evn_uid}
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID evn_uid String Event UID
Required Fields:
-
Name Type Description evn_description String Event description evn_status String Event status evn_action String Variable for the priority case evn_related_to String Template of the routing screen tas_uid String Task UID. Just if evn_related_to = "SINGLE" evn_tas_uid_from String Initial task UID. Just if evn_related_to = "MULTIPLE" evn_tas_estimated_duration String Time lapse for the completion of the tasks evn_time_unit String Value type of the time lapse when performing a task or tasks evn_when Integer Value in days of the time lapse for the execution of the event evn_when_occurs Integer Time when the event will be held. tri_uid Integer UID of the trigger that will execute that event evn_tas_uid_to String Final task UID. Just if evn_related_to = "MULTIPLE"
Optional Fields:
-
Name Type Description evn_conditions String Condition that will execute the event if met
Result:
-
Type Description empty No return
Example:
Request
{
"evn_description": "change description",
"evn_status": "ACTIVE",
"evn_action": "SEND_MESSAGE",
"evn_related_to": "SINGLE",
"tas_uid": "97192372152a5c78f04a794095806311",
"evn_tas_estimated_duration": 1,
"evn_time_unit": "DAYS",
"evn_when": 1,
"evn_when_occurs": "AFTER_TIME",
"tri_uid": "95325847552af0c07792c15098680510"
}
Response
Delete Event: DELETE project/{prj_uid}/event/{evn_uid}
Deletes an event.
Permission:
- Users must have the PM_FACTORY permission assigned to their role to perform this action.
Structure:
DELETE /api/1.0/{workspace}/project/{prj_uid}/event/{evn_uid}
Parameters:
-
Name Type Description workspace String Workspace name prj_uid String Project UID evn_uid String Event UID
Result:
-
Type Description empty No return
Example:
Response