Please rate how useful you found this document: 
Average: 2.7 (3 votes)

Event Endpoints

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

Event resources:

NameDescriptionType Value
evn_uidEvent UIDStringString
evn_descriptionEvent descriptionStringString
evn_statusEvent statusString“ACTIVE” or “INACTIVE” (Unique values)
evn_actionVariable for the priority of the caseString“SEND_MESSAGE”, “EXECUTE_CONDITIONAL_TRIGGER” or “EXECUTE_TRIGGER” (Unique values)
evn_related_toTemplate of the routing screenString“SINGLE” or “MULTIPLE” (Unique values)
tas_uidTask UID, if it is an event with a single taskString“h3kj231…” (Task UID)
evn_tas_uid_fromInitial task UID, if it is an event with a range of tasksString“h3kj231…”(Task UID)
evn_tas_estimated_durationTime lapse for the completion of the tasks. (Type value of the variable "evn_time_unit")String2 (Numeric Value)
evn_time_unitValue type of the time lapse when performing a task or tasksString“DAYS” or “HOURS” (Unique values)
evn_whenValue in days of the time lapse of the execution of the event.Integer3 (Numeric Value)
evn_when_occursTime when the event will be held.Integer“AFTER_TIME” or “TASK_STARTED” (Numeric Value)
tri_uidUID of the trigger that will execute the eventInteger2 (Integer value)
evn_tas_uid_toFinal task UID, if it is an event with a range of tasksString“DAYS” or “HOURS” (Unique values)
evn_conditionsCondition that will execute the event if metString“@@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:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Result:

TypeDescription
arrayReturns an array of existing events in the process

Example:

Response

 200 (OK)
 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:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Optional Parameters:

NameTypeDescription
filterStringEvent type to be listed ("message")

Result:

TypeDescription
arrayReturns an array of existing events in the process

Example:

Response

 200 (OK)
 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:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Optional Parameters:

NameTypeDescription
filterStringEvent type to be listed ("conditional")

Result:

TypeDescription
arrayReturns an array of existing events in the process

Example:

Response

 200 (OK)
 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:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Optional Parameters:

NameTypeDescription
filterStringEvent type to be listed ("multiple")

Result:

TypeDescription
arrayReturns an array of existing events in the process

Example:

Response

 200 (OK)
 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:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
evn_uidStringEvent UID

Result:

TypeDescription
objectReturns an object containing the event data

Example:

Response

 200 (OK)
 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:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID

Required Fields:

NameTypeDescription
evn_descriptionStringEvent description
evn_statusStringEvent status
evn_actionStringVariable for the priority case
evn_related_toStringTemplate of the routing screen
tas_uidStringTask UID. Only if evn_related_to = "SINGLE"
evn_tas_uid_fromStringInitial task UID. Only if evn_related_to = "MULTIPLE"
evn_tas_estimated_durationStringTime lapse for the completion of the tasks
evn_time_unitStringValue type of the time lapse when performing a task or tasks
evn_whenIntegerValue in days of the time lapse for the execution of the event
evn_when_occursIntegerTime when the event will be held
tri_uidIntegerUID of the trigger that will execute the event
evn_tas_uid_toStringFinal task UID. Only if evn_related_to = "MULTIPLE"

Optional Fields:

NameTypeDescription
evn_conditionsStringCondition that will execute the event if met

Result:

TypeDescription
objectReturns an object containing data about the event created.

Example:

Request

 Content-Type: application/json
 {
    "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

  201 (Created)

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:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
evn_uidStringEvent UID

Required Fields:

NameTypeDescription
evn_descriptionStringEvent description
evn_statusStringEvent status
evn_actionStringVariable for the priority case
evn_related_toStringTemplate of the routing screen
tas_uidStringTask UID. Just if evn_related_to = "SINGLE"
evn_tas_uid_fromStringInitial task UID. Just if evn_related_to = "MULTIPLE"
evn_tas_estimated_durationStringTime lapse for the completion of the tasks
evn_time_unitStringValue type of the time lapse when performing a task or tasks
evn_whenIntegerValue in days of the time lapse for the execution of the event
evn_when_occursIntegerTime when the event will be held.
tri_uidIntegerUID of the trigger that will execute that event
evn_tas_uid_toStringFinal task UID. Just if evn_related_to = "MULTIPLE"

Optional Fields:

NameTypeDescription
evn_conditionsStringCondition that will execute the event if met

Result:

TypeDescription
emptyNo return

Example:

Request

 Content-Type: application/json
 {
    "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

  200 (OK)

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:

NameTypeDescription
workspaceStringWorkspace name
prj_uidStringProject UID
evn_uidStringEvent UID

Result:

TypeDescription
emptyNo return

Example:

Response

  200 (OK)