When use the REST connector to call a service, i got the response like below.
Now i need to extract the taskTodoList
into an array to the result expression, What should i do? the RETURN_DATA
is a escaped JSONObject.
The taskTodoList
will be used for another service task’s input variables.
{
"status": 200,
"headers": {
"date": "Fri, 12 Apr 2024 01:29:49 GMT",
"server": "nginx",
"transfer-encoding": "chunked",
"x-content-type-options": "nosniff",
"x-xss-protection": "1; mode=block",
"x-frame-options": "SAMEORIGIN",
"content-type": "application/json;charset=utf-8",
"connection": "keep-alive",
"strict-transport-security": "max-age=172800; includeSubDomains"
},
"body": {
"RESPONSE": {
"RETURN_CODE": "S",
"RETURN_DATA": "{\"taskTodoList\":[{\"activityDefId\":\"obj_ca954d098ba000018cd81cfdc2602910\",\"activityDefName\":\"startTask\",\"activityModelExt\":{\"customUniqueId\":\"\",\"extendProperty\":\"\",\"id\":\"obj_ca954d098ba000018cd81cfdc2602910\",\"name\":\"startTask\",\"no\":1,\"sequential\":-1},\"activityType\":\"userTask\",\"async\":false,\"beginEngineNode\":\"2406:440:600::16e0:10018\",\"beginTime\":1712885389000,\"claimResourceId\":\"\",\"claimType\":0,\"controlState\":\"active\",\"customUniqueId\":\"\",\"delayTimes\":0,\"delegateUser\":\"\",\"dispatchId\":\"4a9cf601-b664-4cda-8581-ead5814ac6a0\",\"eAITask\":false,\"ext1\":\"\",\"ext2\":\"\",\"ext3\":\"\",\"ext4\":\"\",\"ext5\":\"\",\"ext6\":\"\",\"ext7\":0,\"ext8\":0.0,\"historyTask\":false,\"iOBD\":\"\",\"iOC\":\"\",\"iOR\":\"\",\"iOS\":\"\",\"id\":\"2c8eebfa-7f16-4c14-8f70-bd660d65e510\",\"monitor\":false,\"owner\":\"admin\",\"ownerDepartmentId\":\"5bc3a2dc-3bd2-4376-bcc3-5612e28e55fe\",\"ownerName\":\"admin\",\"parentTaskInstId\":\"00000000-0000-0000-0000-000000000000\",\"priority\":1,\"processDefId\":\"obj_1b01dfade2fd4c408f6426ee290743d0\",\"processDefVerId\":\"obj_1b01dfade2fd4c408f6426ee290743d0\",\"processGroupId\":\"obj_f953af04fb5944ca8128e262d363f62c\",\"processInstId\":\"e4710d5c-9078-4a47-8868-4d43805d5d23\",\"readState\":0,\"remindTimes\":0,\"root\":true,\"scopeId\":\"00000000-0000-0000-0000-000000000000\",\"securityLevel\":0,\"state\":1,\"target\":\"admin\",\"targetCompanyId\":\"8911e732-b42a-4556-853f-ad32761bcbee\",\"targetDepartmentId\":\"5bc3a2dc-3bd2-4376-bcc3-5612e28e55fe\",\"targetName\":\"admin\",\"targetRoleId\":\"d102c89d-55f3-4865-9d5c-c00b7f47b803\",\"targetRoleNo\":\"\",\"taskInfo\":\"\",\"title\":\"Test Zeebe Rest connector\",\"trash\":true}],\"processInstId\":\"e4710d5c-9078-4a47-8868-4d43805d5d23\"}",
"RETURN_DESC": "sucess",
"RETURN_STAMP": "2024-04-12 09:29:49:022"
}
}
}