Assignments

This page details the Assignments endpoints and the actions they support. It provides sample URLs and results for quick reference, along with further instructions on how to use each endpoint.

web/json/workflow/assignment/accept/(*:activityId)

Accept an assigned assignment.

Deprecated  Since v3, the concept of accept & withdraw assignment is removed
  • User Role: Anyone (Including anonymous)
  • Method: HTTP POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • activityId - Activity instance id 
  • Sample URL: http://localhost:8080/jw/web/json/workflow/assignment/accept/879_223_crm_process1_approve_proposal
  • Sample Result:
{
    "assignment" : "879_223_crm_process1_approve_proposal"
    "status" : "accepted"
}

 

web/json/workflow/assignment/complete/(*:activityId)

Completes an assigned assignment.

  • User Role: Anyone (Including anonymous)
  • Method: HTTP POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • activityId - activity instance id
  • Sample URL: http://localhost:8080/jw/web/json/workflow/assignment/complete/879_223_crm_process1_approve_proposal
  • Sample Result: 
{
    "activityId": "879_223_crm_process1_approve_proposal",
    "nextActivityId": "882_223_crm_process1_send_proposal",
    "processId": "223_crm_process1",
    "status": "completed"
}

 

web/json/workflow/assignment/completeWithVariable/(*:activityId)

Completes an assigned assignment with the option to set workflow variables.

  • User Role: Anyone (Including anonymous)
  • Method: HTTP POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • activityId - activity instance id
    • var_* - (Optional) parameters prefixed with "var_" used to set workflow variable
  • Sample URL: http://localhost:8080/jw/web/json/workflow/assignment/completeWithVariable/879_223_crm_process1_approve_proposal?var_status=Sent
  • Sample Result: 
{
    "activityId": "879_223_crm_process1_approve_proposal",
    "nextActivityId": "882_223_crm_process1_send_proposal",
    "processId": "223_crm_process1",
    "status": "completed"
}

 

web/json/workflow/assignment/list

Retrieves all assignments of the current logged in user.

  • User Role: Anyone (Including anonymous)
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • packageId - (Optional) App Definition Id
    • processDefId - (Optional) Process definition Id with version
    • processId - (Optional) Process instance id
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/workflow/assignment/list?rows=3&packageId=crm
  • Sample Result: 
{
    "total": 10,
    "data": [{
        "id": "477_118_crm_process1_approve_proposal",
        "activityId": "477_118_crm_process1_approve_proposal",
        "processVersion": "1",
        "serviceLevelMonitor": "-",
        "processId": "118_crm_process1",
        "description": "",
        "processName": "Proposal Approval Process",
        "due": "-",
        "dateCreated": "21-07-2015 03:03 AM",
        "label": "Approve Proposal",
        "acceptedStatus": false,
        "activityName": "Approve Proposal"
    }, {
        "id": "479_119_crm_process1_approve_proposal",
        "activityId": "479_119_crm_process1_approve_proposal",
        "processVersion": "1",
        "serviceLevelMonitor": "-",
        "processId": "119_crm_process1",
        "description": "",
        "processName": "Proposal Approval Process",
        "due": "-",
        "dateCreated": "21-07-2015 03:03 AM",
        "label": "Approve Proposal",
        "acceptedStatus": false,
        "activityName": "Approve Proposal"
    }, {
        "id": "481_120_crm_process1_approve_proposal",
        "activityId": "481_120_crm_process1_approve_proposal",
        "processVersion": "1",
        "serviceLevelMonitor": "-",
        "processId": "120_crm_process1",
        "description": "",
        "processName": "Proposal Approval Process",
        "due": "-",
        "dateCreated": "21-07-2015 03:03 AM",
        "label": "Approve Proposal",
        "acceptedStatus": false,
        "activityName": "Approve Proposal"
    }]
}

 

web/json/workflow/assignment/list/count

Retrieves the number of assignments of the current logged in user.

  • User Role: Anyone (Including anonymous)
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • packageId - (Optional) App Definition Id
    • processDefId - (Optional) Process definition Id with version
    • processId - (Optional) Process instance id
  • Sample URL: http://localhost:8080/jw/web/json/workflow/assignment/list/count?packageId=crm
  • Sample Result: 
{"total":10}

 

web/json/workflow/assignment/list/accepted

Retrieves all accepted assignments of the current logged in user.

Deprecated  Since v3, the concept of accept & withdraw assignment is removed  

  • User Role: Anyone (Including anonymous)
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • processId - (Optional) Process instance id
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/workflow/assignment/list/accepted?rows=3
  • Sample Result: 
{
    "total": 10,
    "data": [{
        "id": "477_118_crm_process1_approve_proposal",
        "activityId": "477_118_crm_process1_approve_proposal",
        "processVersion": "1",
        "serviceLevelMonitor": "-",
        "processId": "118_crm_process1",
        "description": "",
        "processName": "Proposal Approval Process",
        "due": "-",
        "dateCreated": "21-07-2015 03:03 AM",
        "label": "Approve Proposal",
        "acceptedStatus": false,
        "activityName": "Approve Proposal"
    }, {
        "id": "479_119_crm_process1_approve_proposal",
        "activityId": "479_119_crm_process1_approve_proposal",
        "processVersion": "1",
        "serviceLevelMonitor": "-",
        "processId": "119_crm_process1",
        "description": "",
        "processName": "Proposal Approval Process",
        "due": "-",
        "dateCreated": "21-07-2015 03:03 AM",
        "label": "Approve Proposal",
        "acceptedStatus": false,
        "activityName": "Approve Proposal"
    }, {
        "id": "481_120_crm_process1_approve_proposal",
        "activityId": "481_120_crm_process1_approve_proposal",
        "processVersion": "1",
        "serviceLevelMonitor": "-",
        "processId": "120_crm_process1",
        "description": "",
        "processName": "Proposal Approval Process",
        "due": "-",
        "dateCreated": "21-07-2015 03:03 AM",
        "label": "Approve Proposal",
        "acceptedStatus": false,
        "activityName": "Approve Proposal"
    }]
}

 

web/json/workflow/assignment/list/accepted/count  

Retrieves the number of accepted assignments of current logged in user.

Deprecated  Since v3, the concept of accept & withdraw assignment is removed  

  • User Role: Anyone (Including anonymous) 
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
  • Sample URL: http://localhost:8080/jw/web/json/workflow/assignment/list/accepted/count
  • Sample Result: 
{"total":3}

 

web/json/workflow/assignment/list/accepted/process

Retrieves processes list based on accepted assignment of current logged in user.

Deprecated  Since v3, the concept of accept & withdraw assignment is removed  

  • User Role: Anyone (Including anonymous) 
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
  • Sample URL: http://localhost:8080/jw/web/json/workflow/assignment/list/accepted/process
  • Sample Result: 
{
    "data": [{
        "count": 3,
        "processVersion": "3",
        "processName": "Proposal Approval Process",
        "processDefId": "crm#3#process1",
        "label": "Proposal Approval Process ver 3 (3)",
        "url": "/json/workflow/assignment/list/accepted?processId=crm%233%23process1"
    }]
}

 

web/json/workflow/assignment/list/pending

Retrieves all pending assignments of the current logged in user. 

  • User Role: Anyone (Including anonymous) 
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • processId - (Optional) Process instance id
    • sort - (Optional) column name to be sorted
    • desc - (Optional) Boolean value to determine whether to sort by ascending or descending order (true equals to descending)
    • start - (Optional) where rows start from
    • rows - (Optional) number of rows per page
  • Sample URL: http://localhost:8080/jw/web/json/workflow/assignment/list/pending
  • Sample Result: 
{
    "total": 3,
    "data": [{
        "id": "841_206_crm_process1_send_proposal",
        "activityId": "841_206_crm_process1_send_proposal",
        "processVersion": "3",
        "serviceLevelMonitor": "-",
        "processId": "206_crm_process1",
        "description": "",
        "processName": "Proposal Approval Process",
        "due": "-",
        "dateCreated": "04-09-2015 11:05 AM",
        "label": "Send Proposal",
        "activityName": "Send Proposal"
    }, {
        "id": "842_207_crm_process1_approve_proposal",
        "activityId": "842_207_crm_process1_approve_proposal",
        "processVersion": "3",
        "serviceLevelMonitor": "-",
        "processId": "207_crm_process1",
        "description": "",
        "processName": "Proposal Approval Process",
        "due": "-",
        "dateCreated": "04-09-2015 11:05 AM",
        "label": "Approve Proposal",
        "activityName": "Approve Proposal"
    }, {
        "id": "843_208_crm_process1_send_proposal",
        "activityId": "843_208_crm_process1_send_proposal",
        "processVersion": "3",
        "serviceLevelMonitor": "-",
        "processId": "208_crm_process1",
        "description": "",
        "processName": "Proposal Approval Process",
        "due": "-",
        "dateCreated": "04-09-2015 11:05 AM",
        "label": "Send Proposal",
        "activityName": "Send Proposal"
    }]
}

 

web/json/workflow/assignment/list/pending/count

Retrieves the number of all pending assignments of the current logged in user.

  • User Role: Anyone (Including anonymous)  
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
  • Sample URL:  http://localhost:8080/jw/web/json/workflow/assignment/list/pending/count
  • Sample Result: 
{"total":3}

 

web/json/workflow/assignment/list/pending/process

Retrieves process list based on pending assignments of the current logged in user.

  • User Role: Anyone (Including anonymous) 
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
  • Sample URL: http:/localhost:8080/jw/web/json/workflow/assignment/list/pending/process
  • Sample Result: 
{
    "data": [{
        "count": 3,
        "processVersion": "3",
        "processName": "Proposal Approval Process",
        "processDefId": "crm#3#process1",
        "label": "Proposal Approval Process ver 3 (3)",
        "url": "/json/workflow/assignment/list/accepted?processId=crm%233%23process1"
    }]
}

 

web/json/workflow/assignment/process/view/(*:processId)

Retrieves process information based on available assignment of the current logged in user.

  • User Role: Anyone (Including anonymous) 
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • processId - Process instance id
  • Sample URL: http://localhost:8080/jw/web/json/workflow/assignment/process/view/208_crm_process1
  • Sample Result: 
{
    "activityId": "843_208_crm_process1_send_proposal",
    "processVersion": "3",
    "activityDefId": "send_proposal",
    "processId": "208_crm_process1",
    "assigneeId": "admin",
    "description": "",
    "processName": "Proposal Approval Process",
    "dateCreated": "04-09-2015 03:05 AM",
    "participant": "Requester",
    "processDefId": "crm#3#process1",
    "variable": {
        "status": "approved"
    },
    "activityName": "Send Proposal"
}

 

web/json/workflow/assignment/withdraw/(*:activityId)

Withdraws an accepted assignment.

Deprecated  Since v3, the concept of accept & withdraw assignment is removed  

  • User Role: Anyone (Including anonymous) 
  • Method: HTTP POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • activityId - activity instance id
  • Sample URL: http://localhost:8080/jw/web/json/workflow/assignment/withdraw/879_223_crm_process1_approve_proposal
  • Sample Result: 
{
    "activityId": "879_223_crm_process1_approve_proposal",
    "status": "withdrawn"
}

 

web/json/workflow/assignment/variable/(*:activityId)/(*:variable)

Sets value of workflow variable of an assignment.

This API only works when the current user is assigned to the specified activity.
  • User Role: Anyone (Including anonymous) 
  • Method: HTTP POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • activityId - activity instance id
    • variable - workflow variable to set value 
    • value - value of workflow variable
  • Sample URL: http://localhost:8080/jw/web/json/workflow/assignment/variable/843_208_crm_process1_send_proposal/status?value=test
  • Sample Result: 
{"status":"variableSet"}

 

web/json/workflow/assignment/view/(*:activityId)  

Retrieves information of an assignment.

  • User Role: Anyone (Including anonymous) 
  • Method: HTTP GET/POST
  • Parameters: 
    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • activityId - activity instance id
  • Sample URL: http://localhost:8080/jw/web/json/workflow/assignment/view/843_208_crm_process1_send_proposal
  • Sample Result:
{
    "activityId": "843_208_crm_process1_send_proposal",
    "processVersion": "3",
    "activityDefId": "send_proposal",
    "processId": "208_crm_process1",
    "assigneeId": "admin",
    "description": "",
    "processName": "Proposal Approval Process",
    "dateCreated": "04-09-2015 03:05 AM",
    "participant": "Requester",
    "processDefId": "crm#3#process1",
    "variable": {
        "status": "approved"
    },
    "activityName": "Send Proposal"
}

 

Created by Damian Last modified by Aadrian on Dec 13, 2024