https://github.com/dmarrazzo/kie-extension-query
https://github.com/dmarrazzo/kie-extension-query
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dmarrazzo/kie-extension-query
- Owner: dmarrazzo
- Created: 2020-01-07T20:03:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-05T22:38:12.000Z (over 1 year ago)
- Last Synced: 2025-01-22T20:51:19.292Z (5 months ago)
- Language: Java
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Kie server estension to retrieve tasks and process variables
New APIs:
**GET** `server/queries/variables`
- Query parameters: `vars` a list of variables to enquery
**POST** `server/queries/variables`
- Query parameters: `vars` a list of variables to enquery
- Payload: `org.kie.server.api.model.definition.QueryFilterSpec`example:
```json
{
"order-by" : null,
"order-asc" : false,
"query-params" : [ {
"cond-column" : "processinstanceid",
"cond-operator" : "GREATER_THAN",
"cond-values" : [ 9 ]
} ],
"result-column-mapping" : null,
"order-by-clause" : null
}
```In order to filter on a variable, that variable must be retrieved (defined in `vars` query parameter)
**WARNING** Process Variable are prefixed with `VAR_` to avoid confusion with the task informations.
## Examples
Retrieve a task where the process variable `lastname` is `bond`:
```sh
curl -u user:password -X POST "http://localhost:8080/kie-server/services/rest/server/queries/variables?vars=name&vars=lastname" -H "accept: application/json" -H "content-type: application/json" -d "{ \"order-by\" : null, \"order-asc\" : false, \"query-params\" : [ { \"cond-column\" : \"var_lastname\", \"cond-operator\" : \"EQUALS_TO\", \"cond-values\" : [ \"bond\" ] } ], \"result-column-mapping\" : null, \"order-by-clause\" : null}"
```