Versions Compared

Key

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

...

 

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)

说明
Starts a process based on process start whitelist

用户角色

任何人(包括匿名)  

Method

HTTP POST

参数

    • callback - (可选)调用此方法后调用的函数(在JavaScript中)
    • processDefId - Process Definition Id (Replace '#' with ':' in the id)
    • processInstanceId - (Optional) used to start the previous created but haven't start process instance

      Info
      titleObtaining Latest Published Process Version

      Instead of specifying crm:3:process1 in the call, we can use the keyword latest in the processDefId - crm:latest:process1 to automatically set to the published app's process version.

    • recordId - (Optional) used to start a process instance with existing record
    • var_* - (Optional) 参数 prefixed with "var_" will be used to set workflow variable

示例URL

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

示例结果

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

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

说明
Sets workflow variable of a process instance

用户角色

Admin

Method

HTTP POST

参数

    • callback - (可选)调用此方法后调用的函数(在JavaScript中)
    • processId - process instnace id
    • variable - workflow variable name 
    • value - value of workflow variable to be set

示例URL

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

示例结果

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

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

说明
Retrieves information of a process definition

用户角色

Admin

Method

HTTP GET/POST

参数

    • callback - (可选)调用此方法后调用的函数(在JavaScript中)
    • processId - Process Definition Id (Replace '#' with ':' in the id)

示例URL

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

示例结果

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

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

说明
Retrieves all variables of a process instance

用户角色

Admin

Method

HTTP GET/POST

参数

    • callback - (可选)调用此方法后调用的函数(在JavaScript中)
    • processId - process instance id

示例URL

http://localhost:8080/jw/web/json/workflow/variable/list/208_crm_process1

示例结果

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

 

...

Info
titleImportant Note

The returned attribute "total" will always give the the total number of records regardless of the filters applied unless the attribute "Consider filter value when get total size?" is checked in the datalist.


Code Block
languagejs
{
    "total": 5,
    "data": [{
        "country": "",
        "accountName": "001 Updated",
        "id": "001",
        "state": ""
    }, {
        "country": "",
        "accountName": "002",
        "id": "002",
        "state": ""
    }, {
        "country": "",
        "accountName": "003",
        "id": "003",
        "state": ""
    }]
}

...