Support for query selectors in query #205
-
Hi @ralphhanna, I tried to find the supported query selectors in the documentation but I couldn't find it. Could you please list the supported selectors? For eg: will the await server.datastore.findItems({
status: 'running',
'items.vars.myVar': { $in: [<my list of strings>] },
'items.status': 'wait',
'items.type': 'bpmn:ReceiveTask',
}); |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
@ralphhanna, I just found this being mentioned in |
Beta Was this translation helpful? Give feedback.
-
@MaheshkumarSundaram |
Beta Was this translation helpful? Give feedback.
-
I tried it against curl --location --request GET 'https://bpmn.omniworkflow.com/api/datastore/findItems' \
--header 'Content-Type: application/json' \
--header 'x-api-key: 12345' \
--header 'Cookie: connect.sid=s%3AYjEOLaDr50STLPhJQa14MZ4JwKGWBV6v.1wzdsMyPGAioaQHhSDQ%2FBKZRA3oGOEBX3Jt7b7WuodA' \
--data ' { "query":{ "items.elementId": "task_Buy" , "items.status": {"$in":["end","wait"]} } }
' Output: {"items":[{"id":"8bf5b324-2827-410e-83fa-e739426f46a0","seq":2,"itemKey":null,"tokenId":0,"elementId":"task_Buy","name":"Buy","status":"end",
"userName":null,"startedAt":"2024-06-22T04:30:00.967Z","endedAt":"2024-06-22T04:35:50.271Z","type":"bpmn:UserTask","timeDue":null,"vars":{},"instanceId":"39173f6b-0308-430b-8712-439908648cf7","messageId":null,"signalId":null,"assignee":null,"candidateGroups":["Employee","Manager"],"candidateUsers":["User1","User2"],"dueDate":"2024-06-27T04:30:00.967Z","followUpDate":"2023-10-31T00:00:00.000Z","priority":"5","processName":"Buy Used Car","data":{"caseId":3030,"claim":"abc","starterUserId":null,"startDate":null,"needsRepairs":"","needsCleaning":""},"instanceVersion":0},{"id":"8f470bc3-c239-4d70-8658-86368e050351","seq":2,"itemKey":null,"tokenId":0,"elementId":"task_Buy","name":"Buy","status":"wait","userName":null,"startedAt":"2024-06-22T04:34:29.608Z","endedAt":null,"type":"bpmn:UserTask","timeDue":null,"vars":{},"instanceId":"4e9a4702-4932-42b3-acbb-88d7d683a4fd","messageId":null,"signalId":null,"assignee":null,"candidateGroups":["Employee","Manager"],"candidateUsers":["User1","User2"],"dueDate":"2024-06-27T04:34:29.608Z","followUpDate":"2023-10-31T00:00:00.000Z","priority":"5","processName":"Buy Used Car","data":{"caseId":3030,"starterUserId":null,"startDate":null},"instanceVersion":0}]} |
Beta Was this translation helpful? Give feedback.
-
Opps, It seems no query works with Thanks |
Beta Was this translation helpful? Give feedback.
Opps, It seems no query works with
items.vars.varName
. Fixed in Latest release 2.2.8Thanks