Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

Introduced in v5, the API Domain Whitelist setting in General Settings needs to be configured to allow JSON API requests. If a request is from a non-whitelisted domain, the response will be a HTTP 400 Bad Request.

 

Table of Contents

App

web/json/app/(*:appId)/(~:version)/form/(*:formId)/columns

...

http://localhost:8080/jw/web/json/workflow/assignment/completecompleteWithVariable/879_223_crm_process1_approve_proposal?var_status=Sent

...

 

Code Block
{
    "data": [{
        "id": "hr_expense",
        "count": 2,
        "processVersion": "3",
        "packageName": "HR Expenses Claim App",
        "processId": "hr_expense#3#process1",
        "processName": "Expense Approval Process",
        "packageId": "hr_expense",
        "label": "HR Expenses Claim App",
        "url": "/json/workflow/process/list?packageId=hr_expense"
    }, {
        "id": "isr",
        "count": 1,
        "processVersion": "2",
        "packageName": "ISR",
        "processId": "isr#2#isr",
        "processName": "ISR Process",
        "packageId": "isr",
        "label": "ISR",
        "url": "/json/workflow/process/list?packageId=isr"
    }, {
        "id": "hrleave",
        "count": 2,
        "processVersion": "1",
        "packageName": "JINC Leave Solution",
        "processId": "hrleave#1#la",
        "processName": "Leave Application System",
        "packageId": "hrleave",
        "label": "JINC Leave Solution",
        "url": "/json/workflow/process/list?packageId=hrleave"
    }]
}

web/json/workflow/process/start/(*:processDefId)

Description
Starts a process based on process start whitelist

User Role

Anyone (Including anonymous)  

Method

HTTP POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • processDefId - Process Definition Id (Replace '#' with ':' in the id)
    • processInstanceId - (Optional) used to start the previous created but haven't start process instance
    • recordId - (Optional) used to start a process instance with existing record
    • var_* - (Optional) parameters prefixed with "var_" will be used to set workflow variable

Sample URL

http://localhost:8080/jw/web/json/workflow/process/start/crm:3:process1

Sample Result

Code Block
languagejs
{"activityId":"885_224_crm_process1_approve_proposal","processId":"224_crm_process1"}

web/json/workflow/process/variable/(*:processId)/(*:variable)

Description
Sets workflow variable of a process instance

User Role

Admin

Method

HTTP POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • processId - process instnace id
    • variable - workflow variable name 
    • value - value of workflow variable to be set

Sample URL

http://localhost:8080/jw/web/json/workflow/process/variable/208_crm_process1/status?value=test

Sample Result

Code Block
languagejs
{"status" : "variableSet"}

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

Description
Retrieves information of a process definition

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • processId - Process Definition Id (Replace '#' with ':' in the id)

Sample URL

http://localhost:8080/jw/web/json/workflow/process/view/crm:3:process1

Sample Result

Code Block
languagejs
{
    "packageName": "CRM",
    "processId": "crm#3#process1",
    "name": "Proposal Approval Process",
    "packageId": "crm",
    "version": "3"
}

web/json/workflow/variable/list/(*:processId)

Description
Retrieve first process with details of every packagesRetrieves all variables of a process instance

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
  • checkWhiteList - (Optional) Boolean value to return the list based on process white list
    • processId - process instance id

Sample URL

http://localhost:8080/jw/web/json/workflow/processvariable/list/package208_crm_process1

Sample Result

Code Block
languagejs
{
    "processId": "208_crm_process1",
    "variable": {
        "status": "approved"
    }
}

 

Monitoring

web/json/monitoring/activity/abort/(*:processId)/(*:activityDefId)

Description
Retrieve first process with details of every packagesAborts an activity of a process instance

User Role

Admin

Method

HTTP GET/ POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
  • checkWhiteList - (Optional) Boolean value to return the list based on process white list
    • processId - process instance id
    • activityDefId - activity definition id

Sample URL

http://localhost:8080/jw/web/json/monitoring/workflowactivity/process/list/packageabort/208_crm_process1/send_proposal

Sample Result

Code Block
languagejs
{"activityDefId":"send_proposal","status":"aborted","processId":"208_crm_process1"}

web/json/monitoring/activity/list

Description
Retrieve first process with details of every packagesRetrieves a list of all activities

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
  • checkWhiteList
    • processId - (Optional) process instance id for filtering
    • sort - (Optional) column name to be sorted

    • desc - (Optional) Boolean value

  • to return the list based on process white list
    • 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/workflowmonitoring/process/list/package

Sample Result

web/json/monitoring/activity/reassign

Description
Retrieve first process with details of every packages

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • checkWhiteList - (Optional) Boolean value to return the list based on process white list

Sample URL

http:/localhost/jw/web/json/workflow/process/list/package

Sample Result

web/json/monitoring/activity/reevaluate

Description
Retrieve first process with details of every packages

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • checkWhiteList - (Optional) Boolean value to return the list based on process white list

Sample URL

http:/localhost/jw/web/json/workflow/process/list/package

Sample Result

web/json/monitoring/activity/start/(*:processId)/(*:activityDefId)

Description
Retrieve first process with details of every packages

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • checkWhiteList - (Optional) Boolean value to return the list based on process white list

Sample URL

http:/localhost/jw/web/json/workflow/process/list/package

Sample Result

web/json/monitoring/activity/variable/(*:activityId)/(*:variable)

Description
Retrieve first process with details of every packages

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • checkWhiteList - (Optional) Boolean value to return the list based on process white list

Sample URL

http:/localhost/jw/web/json/workflow/process/list/package

Sample Result

web/json/monitoring/activity/view/(*:activityId)

activity/list?processId=116_hr_expense_process1

Sample Result

Code Block
languagejs
{
    "total": 3,
    "data": [{
        "id": "474_116_hr_expense_process1_approve_claim",
        "serviceLevelMonitor": "-",
        "name": "Approve Claim",
        "state": "open.not_running.not_started",
        "dateCreated": "15-07-2015 02:54 AM"
    }, {
        "id": "472_116_hr_expense_process1_new_claim",
        "serviceLevelMonitor": "-",
        "name": "Edit Claim",
        "state": "closed.completed",
        "dateCreated": "15-07-2015 02:53 AM"
    }, {
        "id": "473_116_hr_expense_process1_tool4",
        "serviceLevelMonitor": "-",
        "name": "Update Record Status to Submitted",
        "state": "closed.completed",
        "dateCreated": "15-07-2015 02:54 AM"
    }]
}

web/json/monitoring/activity/reassign

Description
Reassigns a user to replace another user assigned to an assignmentDescription
Retrieve first process with details of every packages

User Role

Admin

Method

HTTP GET/ POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
  • checkWhiteList - (Optional) Boolean value to return the list based on process white list

Sample URL

    • username - username that will replace the assigned user
    • replaceUser - username of an existing assignee of the assignment
    • activityId - activity instance id of the assignment

Sample URL

http://localhost:8080http:/localhost/jw/web/json/workflowmonitoring/process/list/packageSample Resultactivity/reassign?activityId=841_206_crm_process1_send_proposal&username=admin&replaceUser=cat

Sample Result

Code Block
languagejs
{"activityId":"841_206_crm_process1_send_proposal","username":"admin","replaceUser":"cat"}

web/json/monitoring/

...

activity/

...

reevaluate

Description
Retrieve first process with details of every packagesReevaluates an activity

User Role

Admin

Method

HTTP GET/ POST

Parameters

  • callback - (Optional) a function (in JavaScript) to call back after invoking this method
  • checkWhiteList - (Optional) Boolean value to return the list based on process white list
    • activityId - activity instance id to be reevaluate

Sample URL

http://localhost:8080/jw/web/json/workflow/process/list/package

Sample Result

...

monitoring/

...

activity/reevaluate?activityId=841_206_crm_process1_send_proposal

 

web/json/monitoring/activity/start/(*:processId)/(*:

...

activityDefId)

Description
Retrieve first process with details of every packagesStarts an activity in a running process instance

User Role

Admin

Method

HTTP GET/ POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
  • checkWhiteList
    • processId - process instance id
    • activityDefId - activity definition id
    • abortCurrent - (Optional)
  • Boolean
    • true of false value to
  • return the list based on process white list
    • abort all the running activities in the process instance

Sample URL

http://localhost:8080/jw/web/json/workflowmonitoring/activity/process/list/packagestart/116_hr_expense_process1/verify_claim

Sample Result

Code Block
languagejs
{"result":true,"activityDefId":"verify_claim","processId":"116_hr_expense_process1"}

web/json/monitoring/

...

activity/variable/(*:

...

activityId)/(*:variable)

Description
Retrieve first process with details of every packagesSets value to a workflow variable to a running activity instance

User Role

Admin

Method

HTTP GET/ POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
  • checkWhiteList - (Optional) Boolean value to return the list based on process white list
    • activityId - activity instance id
    • variable - workflow variable name
    • value - workflow variable value

Sample URL

http://localhost:8080/jw/web/json/workflowmonitoring/activity/process/list/packageSample Resultvariable/474_116_hr_expense_process1_approve_claim/status?value=test

Sample Result

Code Block
languagejs
{"status":"variableSet"}

web/json/monitoring/

...

activity/view/(*:activityId)

Description
Retrieve first process with details of every packagesRetrieves information of an activity instance

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
  • checkWhiteList - (Optional) Boolean value to return the list based on process white list
    • activityId - activity instance id

Sample URL

http://localhost:8080/jw/web/json/workflowmonitoring/processactivity/list/packageview/474_116_hr_expense_process1_approve_claim

Sample Result

web/json/monitoring/running/activity/complete

Description
Retrieve first process with details of every packages

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • checkWhiteList - (Optional) Boolean value to return the list based on process white list

Sample URL

http:/localhost/jw/web/json/workflow/process/list/package

Sample Result

web/json/monitoring/running/activity/reassign

Description
Retrieve first process with details of every packages

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • checkWhiteList - (Optional) Boolean value to return the list based on process white list

Sample URL

http:/localhost/jw/web/json/workflow/process/list/package

Sample Result

web/json/monitoring/running/process/list

Description
Retrieve first process with details of every packages

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • checkWhiteList - (Optional) Boolean value to return the list based on process white list

Sample URL

http:/localhost/jw/web/json/workflow/process/list/package

Sample Result

web/json/monitoring/user/reevaluate

Description
Retrieve first process with details of every packages

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • checkWhiteList - (Optional) Boolean value to return the list based on process white list

Sample URL

http:/localhost/jw/web/json/workflow/process/list/package

Sample Result

SLA

web/json/workflow/activity/sla/list

Description
Retrieve first process with details of every packages

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • checkWhiteList - (Optional) Boolean value to return the list based on process white list

Sample URL

http:/localhost/jw/web/json/workflow/process/list/package

Sample Result

Code Block
languagejs
{
    "processId": "116_hr_expense_process1",
    "serviceLevelMonitor": "-",
    "createdTime": "Wed Jul 15 10:54:10 MYT 2015",
    "processName": "Expense Approval Process",
    "assignee": "admin",
    "activityId": "474_116_hr_expense_process1_approve_claim",
    "activityDefId": "approve_claim",
    "processVersion": "1",
    "processDefId": "hr_expense#1#process1",
    "participant": "approver",
    "finishTime": "",
    "variable": {
        "status": "test"
    },
    "activityName": "Approve Claim",
    "dueDate": ""
}

web/json/monitoring/completed/process/list

Description
Retrieves a list of all completed process instances

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • packageId - (Optional) App/ package id
    • processId - (Optional) process instance id for filtering
    • processName - (Optional) process name for filtering
    • 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/monitoring/completed/process/list?rows=3

Sample Result

Code Block
languagejs
{
    "total": 74,
    "data": [{
        "id": "133_hr_expense_process1",
        "serviceLevelMonitor": "-",
        "requesterId": "admin",
        "name": "Expense Approval Process",
        "state": "closed.aborted",
        "due": "-",
        "startedTime": "29-07-2015 01:46 AM",
        "version": "2"
    }, {
        "id": "135_crm_process1",
        "serviceLevelMonitor": "-",
        "requesterId": "admin",
        "name": "Proposal Approval Process",
        "state": "closed.aborted",
        "due": "-",
        "startedTime": "04-08-2015 09:28 AM",
        "version": "2"
    }, {
        "id": "136_crm_process1",
        "serviceLevelMonitor": "-",
        "requesterId": "admin",
        "name": "Proposal Approval Process",
        "state": "closed.aborted",
        "due": "-",
        "startedTime": "04-08-2015 09:31 AM",
        "version": "2"
    }]
}

web/json/monitoring/process/copy/(*:processId)/(*:processDefId)

Description
Copies the state and workflow variables of a running process instance to start a new process instance

User Role

Admin

Method

HTTP POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • processId - process instance id
    • processDefId - process definition id to start a new process (replace "#" to ":")
    • abortCurrent - (Optional) true or false value to abort the current running process instance after start a new process instance

Sample URL

http://localhost:8080/jw/web/json/monitoring/process/copy/116_hr_expense_process1/hr_expense:1:process1

Sample Result

Code Block
languagejs
{
    "processId": "228_hr_expense_process1",
    "processDefId": "hr_expense#1#process1",
    "activities": [ "896_228_hr_expense_process1_approve_claim" ]
}

web/json/monitoring/process/variable/(*:processId)/(*:variable)

Description
Sets a value to workflow variable of a process instance

User Role

Admin

Method

HTTP POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • processId - process instance id
    • variable - workflow variable name
    • value - workflow variable value

Sample URL

http://localhost:8080/jw/web/json/monitoring/process/variable/224_crm_process1/status?value=test

Sample Result

Code Block
languagejs
{"status":"variableSet"}

web/json/monitoring/process/view/(*:processId)

Description
Retrieves information of a process instance

User Role

Admin

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/monitoring/process/view/224_crm_process1

Sample Result

Code Block
languagejs
{
    "requester": "admin",
    "serviceLevelMonitor": "-",
    "processId": "224_crm_process1",
    "name": "Proposal Approval Process",
    "finishTime": "",
    "states": ["open.running", "open.running"],
    "packageId": "crm",
    "processDefId": "crm#3#process1",
    "dueDate": "",
    "startedTime": "",
    "version": "3"
}

web/json/monitoring/running/activity/complete

Description
Completes a running activity

User Role

Admin

Method

HTTP POST

Parameters

    • processDefId - process definition id (replace "#" to ":")
    • processId - process instance id
    • activityId - activity instance id

Sample URL

http://localhost:8080/jw/web/json/monitoring/running/activity/complete?processDefId=crm:3:process1&processId=224_crm_process1&activityId=885_224_crm_process1_approve_proposal

web/json/monitoring/running/activity/reassign

Description
Reassigns a user to replace another user assigned to an assignment 

User Role

Admin

Method

HTTP POST

Parameters

    • processDefId - process definition id (replace "#" to ":")
    • processId - process instance id
    • activityId - activity instance id
    • username - username that will replace the assigned user
    • replaceUser - username of an existing assignee of the assignment

Sample URL

http://localhost:8080/jw/web/json/monitoring/running/activity/reassign?processDefId=crm:3:process1&processId=227_crm_process1&activityId=890_227_crm_process1_approve_proposal&username=cat&replaceUser=admin

web/json/monitoring/running/process/list

Description
Retrieves a list of all running process instances

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • packageId - (Optional) app/package id
    • processId - (Optional) process instance id
    • processName - (Optional) process name
    • version - (Optional) process version
    • 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/monitoring/running/process/list?packageId=crm&rows=3

Sample Result

Code Block
languagejs
{
    "total": 16,
    "data": [{
        "id": "118_crm_process1",
        "serviceLevelMonitor": "-",
        "requesterId": "admin",
        "name": "Proposal Approval Process",
        "state": "open.running",
        "due": "-",
        "startedTime": "21-07-2015 03:03 AM",
        "version": "1"
    }, {
        "id": "119_crm_process1",
        "serviceLevelMonitor": "-",
        "requesterId": "admin",
        "name": "Proposal Approval Process",
        "state": "open.running",
        "due": "-",
        "startedTime": "21-07-2015 03:03 AM",
        "version": "1"
    }, {
        "id": "120_crm_process1",
        "serviceLevelMonitor": "-",
        "requesterId": "admin",
        "name": "Proposal Approval Process",
        "state": "open.running",
        "due": "-",
        "startedTime": "21-07-2015 03:03 AM",
        "version": "1"
    }]
}

web/json/monitoring/user/reevaluate

Description
Reevaluates all assignments of an user

User Role

Admin

Method

HTTP POST

Parameters

    • username - user to be reevaluate

Sample URL

http://localhost:8080/jw/web/json/monitoring/user/reevaluate?username=cat

SLA

web/json/workflow/activity/sla/list

Description
Retrieve first process with details of every packages

User Role

Admin

Method

HTTP GET/POST

Parameters

    • callback - (Optional) a function (in JavaScript) to call back after invoking this method
    • appId - (Optional) app defintion id
    • appVersion - (Optional) app definition version
    • processDefId - (Optional) process definition id without package id and version

Sample URL

http://localhost:8080/jw/web/json/workflow/activity/sla/list?appId=crm

Sample Result

Code Block
languagejs
{
    "total": 3,
    "data": [{
        "ratioOnTime": 100,
        "activityDefId": "approval",
        "serviceLevelMonitor": "<span class=\"dot_green\">&nbsp;<\/span>",
        "minDelay": 0,
        "ratioWithDelay": 0,
        "maxDelay": 0,
        "activityName": "Approval"
    }, {
        "ratioOnTime": 100,
        "activityDefId": "parallel",
        "serviceLevelMonitor": "<span class=\"dot_green\">&nbsp;<\/span>",
        "minDelay": 0,
        "ratioWithDelay": 0,
        "maxDelay": 0,
        "activityName": "Parallel"
    }, {
        "ratioOnTime": 100,
        "activityDefId": "route1",
        "serviceLevelMonitor": "<span class=\"dot_green\">&nbsp;<\/span>",
        "minDelay": 0,
        "ratioWithDelay": 0,
        "maxDelay": 0,
        "activityName": "Route 1"
    }]
}

Audit Trail

web/json/workflow/audittrail/list

...

Code Block
languagejs
{"success":true,"datasource":"default"}